From 5b7c36dcf6e9836cd5d02838decebb7096b65a8e Mon Sep 17 00:00:00 2001 From: Craig Warren Date: Wed, 13 Jan 2016 15:09:51 +0000 Subject: [PATCH] Corrected bug with calculating unnecessary factors when using custom excitation. --- gprMax/waveforms.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gprMax/waveforms.py b/gprMax/waveforms.py index 886a8a32..ffff0980 100644 --- a/gprMax/waveforms.py +++ b/gprMax/waveforms.py @@ -44,15 +44,17 @@ class Waveform: waveform (float): Calculated value for waveform. """ + # Coefficients for certain waveforms if self.type == 'gaussiandotdot' or self.type == 'gaussiandotdotnorm' or self.type == 'ricker': chi = np.sqrt(2) / self.freq zeta = np.pi * np.pi * self.freq * self.freq delay = time - chi - else: + elif self.type == 'gaussian' or self.type == 'gaussiandot' or self.type == 'gaussiandotnorm': chi = 1 / self.freq zeta = 2 * np.pi * np.pi * self.freq * self.freq delay = time - chi + # Waveforms if self.type == 'gaussian': waveform = np.exp(-zeta * delay * delay)