你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-05 20:16:52 +08:00
autopep8 code cleanups.
这个提交包含在:
@@ -47,11 +47,6 @@ class My_input_cmd_funcs_test(unittest.TestCase):
|
||||
rx(2, 1, 0, 'id', ['Ex', 'Ez'])
|
||||
self.assert_output(out, '#rx: 2 1 0 id Ex Ez')
|
||||
|
||||
def test_rx4(self):
|
||||
with captured_output() as (out, err):
|
||||
rx(2, 1, 0, 'id', ['Ex', 'Ez'])
|
||||
self.assert_output(out, '#rx: 2 1 0 id Ex Ez')
|
||||
|
||||
def test_rx_rotate_exception(self):
|
||||
with self.assertRaises(ValueError):
|
||||
rx(2, 1, 0, 'id', ['Ex', 'Ez'], polarisation='x', rotate90origin=(1, 1)) # no dxdy given
|
||||
|
@@ -113,5 +113,6 @@ if rxs:
|
||||
|
||||
# renderview.CameraParallelProjection = 1
|
||||
RenderAllViews()
|
||||
|
||||
# Show color bar/color legend
|
||||
# thresholdDisplay.SetScalarBarVisibility(renderview, False)
|
||||
|
@@ -261,7 +261,7 @@ def mpl_plot(filename, time, freqs, Vinc, Vincp, Iinc, Iincp, Vref, Vrefp, Iref,
|
||||
# ax.set_ylabel('Voltage [V]')
|
||||
# ax.set_xlim([0, np.amax(time)])
|
||||
# ax.grid()
|
||||
#
|
||||
|
||||
# Plot frequency spectra of reflected voltage
|
||||
# ax = plt.subplot(gs1[4, 1])
|
||||
# markerline, stemlines, baseline = ax.stem(freqs[pltrange], Vrefp[pltrange], '-.')
|
||||
@@ -273,7 +273,7 @@ def mpl_plot(filename, time, freqs, Vinc, Vincp, Iinc, Iincp, Vref, Vrefp, Iref,
|
||||
# ax.set_xlabel('Frequency [Hz]')
|
||||
# ax.set_ylabel('Power [dB]')
|
||||
# ax.grid()
|
||||
#
|
||||
|
||||
# Plot reflected (reflected) current
|
||||
# ax = plt.subplot(gs1[5, 0])
|
||||
# ax.plot(time, Iref, 'b', lw=2, label='Iref')
|
||||
@@ -282,7 +282,7 @@ def mpl_plot(filename, time, freqs, Vinc, Vincp, Iinc, Iincp, Vref, Vrefp, Iref,
|
||||
# ax.set_ylabel('Current [A]')
|
||||
# ax.set_xlim([0, np.amax(time)])
|
||||
# ax.grid()
|
||||
#
|
||||
|
||||
# Plot frequency spectra of reflected current
|
||||
# ax = plt.subplot(gs1[5, 1])
|
||||
# markerline, stemlines, baseline = ax.stem(freqs[pltrange], Irefp[pltrange], '-.')
|
||||
@@ -366,10 +366,10 @@ def mpl_plot(filename, time, freqs, Vinc, Vincp, Iinc, Iincp, Vref, Vrefp, Iref,
|
||||
# ax.set_title('Input admittance (magnitude)')
|
||||
# ax.set_xlabel('Frequency [Hz]')
|
||||
# ax.set_ylabel('Admittance [Siemens]')
|
||||
##ax.set_xlim([0.88e9, 1.02e9])
|
||||
##ax.set_ylim([0, 0.035])
|
||||
# ax.set_xlim([0.88e9, 1.02e9])
|
||||
# ax.set_ylim([0, 0.035])
|
||||
# ax.grid()
|
||||
#
|
||||
|
||||
# Plot input admittance (phase)
|
||||
# ax = plt.subplot(gs2[2, 1])
|
||||
# markerline, stemlines, baseline = ax.stem(freqs[pltrange], np.angle(yin[pltrange], deg=True), '-.')
|
||||
@@ -380,8 +380,8 @@ def mpl_plot(filename, time, freqs, Vinc, Vincp, Iinc, Iincp, Vref, Vrefp, Iref,
|
||||
# ax.set_title('Input admittance (phase)')
|
||||
# ax.set_xlabel('Frequency [Hz]')
|
||||
# ax.set_ylabel('Phase [degrees]')
|
||||
##ax.set_xlim([0.88e9, 1.02e9])
|
||||
##ax.set_ylim([-40, 100])
|
||||
# ax.set_xlim([0.88e9, 1.02e9])
|
||||
# ax.set_ylim([-40, 100])
|
||||
# ax.grid()
|
||||
|
||||
# Save a PDF/PNG of the figure
|
||||
|
@@ -25,7 +25,7 @@ outputfile = args.outputfile
|
||||
########################################
|
||||
# User configurable parameters
|
||||
|
||||
# Pattern type (E or H)
|
||||
# Pattern type (E or H)
|
||||
type = 'H'
|
||||
|
||||
# Antenna (true if using full antenna model; false for a theoretical Hertzian dipole
|
||||
|
@@ -26,7 +26,7 @@ patterns = np.load(args.numpyfile)
|
||||
########################################
|
||||
# User configurable parameters
|
||||
|
||||
# Pattern type (E or H)
|
||||
# Pattern type (E or H)
|
||||
type = 'H'
|
||||
|
||||
# Relative permittivity of half-space for homogeneous materials (set to None for inhomogeneous)
|
||||
|
@@ -58,7 +58,7 @@ def antenna_like_GSSI_1500(x, y, z, resolution=0.001, rotate90=False, **kwargs):
|
||||
# Values from http://hdl.handle.net/1842/4074
|
||||
excitationfreq = 1.71e9
|
||||
# sourceresistance = 4
|
||||
sourceresistance = 230 # Correction for old (< 123) GprMax3D bug
|
||||
sourceresistance = 230 # Correction for old (< 123) GprMax3D bug
|
||||
absorberEr = 1.58
|
||||
absorbersig = 0.428
|
||||
rxres = 925 # Resistance at Rx bowtie
|
||||
|
@@ -117,8 +117,8 @@ def xcorr(filename, args):
|
||||
# elif modeltime[-1] > reftime[-1]:
|
||||
# modeltime = np.arange(0, reftime[-1], f.attrs['dt'])
|
||||
# modelresp = modelresp[0:len(modeltime)]
|
||||
#
|
||||
# # Downsample the response with the higher sampling rate
|
||||
|
||||
# Downsample the response with the higher sampling rate
|
||||
# if len(modeltime) < len(reftime):
|
||||
# refresp = signal.resample(refresp, len(modelresp))
|
||||
# elif len(reftime) < len(modeltime):
|
||||
@@ -237,9 +237,9 @@ def compactness(filename, args):
|
||||
# Amplitude ratio of the 1st to 3rd peak - hopefully be a measure of a compact envelope
|
||||
compactness = np.abs(outputdata[peaks[0]]) / np.abs(outputdata[peaks[2]])
|
||||
|
||||
# # Percentage of maximum value to measure compactness of signal
|
||||
# Percentage of maximum value to measure compactness of signal
|
||||
# durationthreshold = 2
|
||||
# # Check if there is a peak/trough smaller than threshold
|
||||
# Check if there is a peak/trough smaller than threshold
|
||||
# durationthresholdexist = np.where(np.abs(outputdata[peaks]) < (peak * (durationthreshold / 100)))[0]
|
||||
# if durationthresholdexist.size == 0:
|
||||
# compactness = time[peaks[-1]]
|
||||
|
在新工单中引用
屏蔽一个用户