From 94ef30711d5e3c3bd83f2fc01ac910caff36872b Mon Sep 17 00:00:00 2001 From: Antonis Giannopoulos Date: Tue, 17 Nov 2015 12:31:34 +0000 Subject: [PATCH] fixed "gaussiandotdot", "gaussiandotdotnorm" and "ricker" formulae to produce the correct centre frequency wavelet as requested by the user. --- gprMax/waveforms.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/gprMax/waveforms.py b/gprMax/waveforms.py index 95139932..568935d6 100644 --- a/gprMax/waveforms.py +++ b/gprMax/waveforms.py @@ -43,11 +43,15 @@ class Waveform: Returns: waveform (float): Calculated value for waveform. """ - - chi = 1 / self.freq - zeta = 2 * np.pi * np.pi * self.freq * self.freq - delay = time - chi - + if self.type == 'gaussiandotdot' or self.type == 'gaussiandotdotnorm' or self.type == "ricker": + chi = np.sqrt(2) / self.freq + zeta = 2 * np.pi * np.pi * self.freq * self.freq /2 + delay = time - chi + else: + chi = 1 / self.freq + zeta = 2 * np.pi * np.pi * self.freq * self.freq + delay = time - chi + if self.type == 'gaussian': waveform = np.exp(-zeta * delay * delay)