你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-06 04:26:52 +08:00
Corrected bug with time vector used in plotting scripts.
这个提交包含在:
@@ -20,7 +20,7 @@ if filename ~= 0
|
||||
header.nrx = h5readatt(fullfilename, '/', 'nrx');
|
||||
|
||||
% Time vector for plotting
|
||||
time = linspace(0, (header.iterations)*(header.dt), header.iterations)';
|
||||
time = linspace(0, (header.iterations - 1) * header.dt, header.iterations)';
|
||||
|
||||
% Initialise structure for field arrays
|
||||
fields.ex = zeros(header.iterations, header.nrx);
|
||||
|
@@ -17,8 +17,8 @@ if filename ~= 0
|
||||
field = input(prompt,'s');
|
||||
fieldpath = strcat('/rxs/rx1/', field);
|
||||
field = h5read(filename, fieldpath)';
|
||||
time = linspace(0, iterations*dt, iterations)';
|
||||
traces = 0:size(field,2);
|
||||
time = linspace(0, (iterations - 1) * dt, iterations)';
|
||||
traces = 0:size(field, 2);
|
||||
|
||||
fh1=figure('Name', filename);
|
||||
clims = [-max(max(abs(field))) max(max(abs(field)))];
|
||||
@@ -50,4 +50,4 @@ if filename ~= 0
|
||||
set(fh1,'PaperPosition', [xMargin yMargin xSize ySize])
|
||||
set(fh1,'PaperOrientation', 'portrait')
|
||||
|
||||
end
|
||||
end
|
||||
|
@@ -47,8 +47,9 @@ def mpl_plot(filename, outputs=Rx.defaultoutputs, fft=False):
|
||||
nrx = f.attrs['nrx']
|
||||
dt = f.attrs['dt']
|
||||
iterations = f.attrs['Iterations']
|
||||
time = np.linspace(0, 1, iterations)
|
||||
time *= (iterations * dt)
|
||||
time = np.linspace(0, (iterations - 1) * dt, num=iterations)
|
||||
print(time[0], time[1], time[-1])
|
||||
print(time.size)
|
||||
|
||||
# Check there are any receivers
|
||||
if nrx == 0:
|
||||
|
@@ -49,8 +49,7 @@ def calculate_antenna_params(filename, tltxnumber=1, tlrxnumber=None, rxnumber=N
|
||||
iterations = f.attrs['Iterations']
|
||||
|
||||
# Calculate time array and frequency bin spacing
|
||||
time = np.linspace(0, 1, iterations)
|
||||
time *= (iterations * dt)
|
||||
time = np.linspace(0, (iterations - 1) * dt, num=iterations)
|
||||
df = 1 / np.amax(time)
|
||||
|
||||
print('Time window: {:g} s ({} iterations)'.format(np.amax(time), iterations))
|
||||
|
@@ -73,8 +73,7 @@ def mpl_plot(w, timewindow, dt, iterations, fft=False):
|
||||
plt (object): matplotlib plot object.
|
||||
"""
|
||||
|
||||
time = np.linspace(0, 1, iterations)
|
||||
time *= (iterations * dt)
|
||||
time = np.linspace(0, (iterations - 1) * dt, num=iterations)
|
||||
waveform = np.zeros(len(time))
|
||||
timeiter = np.nditer(time, flags=['c_index'])
|
||||
|
||||
|
在新工单中引用
屏蔽一个用户