你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-06 04:26:52 +08:00
Added divide by zero ignore for s11, s21, zin, yin
这个提交包含在:
@@ -101,15 +101,19 @@ def calculate_antenna_params(filename, tltxnumber=1, tlrxnumber=None, rxnumber=N
|
||||
delaycorrection = np.exp(1j * 2 * np.pi * freqs * (dt / 2))
|
||||
|
||||
# Calculate s11 and (optionally) s21
|
||||
s11 = np.abs(np.fft.fft(Vref) / np.fft.fft(Vinc))
|
||||
with np.errstate(divide='ignore'):
|
||||
s11 = np.abs(np.fft.fft(Vref) / np.fft.fft(Vinc))
|
||||
if tlrxnumber or rxnumber:
|
||||
s21 = np.abs(np.fft.fft(Vrec) / np.fft.fft(Vinc))
|
||||
with np.errstate(divide='ignore'):
|
||||
s21 = np.abs(np.fft.fft(Vrec) / np.fft.fft(Vinc))
|
||||
|
||||
# Calculate input impedance
|
||||
zin = (np.fft.fft(Vtotal) * delaycorrection) / np.fft.fft(Itotal)
|
||||
with np.errstate(divide='ignore'):
|
||||
zin = (np.fft.fft(Vtotal) * delaycorrection) / np.fft.fft(Itotal)
|
||||
|
||||
# Calculate input admittance
|
||||
yin = np.fft.fft(Itotal) / (np.fft.fft(Vtotal) * delaycorrection)
|
||||
with np.errstate(divide='ignore'):
|
||||
yin = np.fft.fft(Itotal) / (np.fft.fft(Vtotal) * delaycorrection)
|
||||
|
||||
# Convert to decibels (ignore warning from taking a log of any zero values)
|
||||
with np.errstate(divide='ignore'):
|
||||
|
在新工单中引用
屏蔽一个用户