Skip to content

Commit 3cf7f12

Browse files
committed
examples: Fix DC component in Ricker source
1 parent 06a4937 commit 3cf7f12

File tree

2 files changed

+22
-26
lines changed

2 files changed

+22
-26
lines changed

examples/seismic/source.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,8 @@ def wavelet(self):
274274
t0 = self.t0 or 1 / self.f0
275275
a = self.a or 1
276276
r = (np.pi * self.f0 * (self.time_values - t0))
277-
return a * (1-2.*r**2)*np.exp(-r**2)
277+
w = a * (1-2.*r**2)*np.exp(-r**2)
278+
return w - w.mean() # Remove DC component
278279

279280

280281
class GaborSource(WaveletSource):

0 commit comments

Comments
 (0)