你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-07 04:56:51 +08:00
Added warning of Anaconda/h5py bug for Win64 users.
Added check when plotting B-scan that there is more than one A-scan present.
这个提交包含在:
@@ -21,6 +21,8 @@ import h5py
|
||||
import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
from gprMax.exceptions import CmdInputError
|
||||
|
||||
"""Plots B-scan."""
|
||||
|
||||
# Parse command line arguments
|
||||
@@ -36,6 +38,10 @@ path = '/rxs/rx1'
|
||||
f = h5py.File(file, 'r')
|
||||
data = f[path + '/' + field]
|
||||
|
||||
# Check that there is more than one A-scan present
|
||||
if data.shape[1] == 1:
|
||||
raise raise CmdInputError('{} contains only a single A-scan.'.format(file))
|
||||
|
||||
# Plot B-scan image
|
||||
fig = plt.figure(num=file, figsize=(20, 10), facecolor='w', edgecolor='w')
|
||||
plt.imshow(data, extent=[0, data.shape[1], data.shape[0]*f.attrs['dt'], 0], interpolation='nearest', aspect='auto', cmap='seismic', vmin=-np.amax(np.abs(data)), vmax=np.amax(np.abs(data)))
|
||||
|
在新工单中引用
屏蔽一个用户