Corrected path to custom pulse for optimised GSSI 1.5GHz antenna model. Corrected handling of custom waveform less then length of time window.

这个提交包含在:
Craig Warren
2019-04-03 12:06:34 +01:00
父节点 b35bb5ee02
当前提交 3f7f076d69
共有 2 个文件被更改,包括 6 次插入6 次删除

查看文件

@@ -160,7 +160,8 @@ def process_singlecmds(singlecmds, G):
G.dt = 1 / (c * np.sqrt((1 / G.dx) * (1 / G.dx) + (1 / G.dy) * (1 / G.dy) + (1 / G.dz) * (1 / G.dz)))
G.mode = '3D'
# Round down time step to nearest float with precision one less than hardware maximum. Avoids inadvertently exceeding the CFL due to binary representation of floating point number.
# Round down time step to nearest float with precision one less than hardware maximum.
# Avoids inadvertently exceeding the CFL due to binary representation of floating point number.
G.dt = round_value(G.dt, decimalplaces=d.getcontext().prec - 1)
if G.messages:
@@ -303,7 +304,9 @@ def process_singlecmds(singlecmds, G):
singlewaveformvalues = singlewaveformvalues[:len(waveformtime)]
# Zero-pad end of waveform array if it is shorter than time array
elif len(singlewaveformvalues) < len(waveformtime):
singlewaveformvalues = np.lib.pad(singlewaveformvalues, (0, len(singlewaveformvalues) - len(waveformvalues)), 'constant', constant_values=0)
tmp = np.zeros(len(waveformtime))
tmp[:len(singlewaveformvalues)] = singlewaveformvalues
singlewaveformvalues = tmp
# Interpolate waveform values
w.userfunc = interpolate.interp1d(waveformtime, singlewaveformvalues, **kwargs)

查看文件

@@ -5,13 +5,10 @@
#
# Please use the attribution at http://dx.doi.org/10.1190/1.3548506
import os
from gprMax.exceptions import CmdInputError
from gprMax.input_cmd_funcs import *
userlibdir = os.path.dirname(os.path.abspath(__file__))
def antenna_like_GSSI_1500(x, y, z, resolution=0.001, rotate90=False):
"""Inserts a description of an antenna similar to the GSSI 1.5GHz antenna. Can be used with 1mm (default) or 2mm spatial resolution. The external dimensions of the antenna are 170x108x45mm. One output point is defined between the arms of the receiver bowtie. The bowties are aligned with the y axis so the output is the y component of the electric field (x component if the antenna is rotated 90 degrees).
@@ -175,7 +172,7 @@ def antenna_like_GSSI_1500(x, y, z, resolution=0.001, rotate90=False):
elif optstate == 'GiannakisPaper':
# Optimised custom pulse
print('#excitation_file: {} linear extrapolate'.format(os.path.join(userlibdir, 'GSSI1p5optpulse.txt')))
print('#excitation_file: ../user_libs/antennas/GSSI1p5optpulse.txt linear extrapolate')
voltage_source('y', tx[0], tx[1], tx[2], sourceresistance, 'GSSI1p5optpulse', dxdy=(resolution, resolution), rotate90origin=rotate90origin)
# Output point - receiver bowtie