Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sebastian Heimann
lassie
Commits
1e254428
Commit
1e254428
authored
Jul 27, 2016
by
Marius
Browse files
ifc: use scipy fftconvolve instead of numpy convolve.
parent
a9b0c4b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/ifc.py
View file @
1e254428
import
sys
import
logging
import
numpy
as
num
from
scipy.signal
import
fftconvolve
from
pyrocko.guts
import
Object
,
String
,
Float
from
pyrocko
import
trace
,
autopick
,
util
from
lassie
import
shifter
,
common
...
...
@@ -60,13 +61,12 @@ class WavePacketIFC(IFC):
tr
.
highpass
(
4
,
self
.
fmin
,
demean
=
True
)
tr
.
lowpass
(
4
,
self
.
fmax
,
demean
=
False
)
tr
.
ydata
=
tr
.
ydata
**
2
n
=
int
(
num
.
round
(
1.
/
fsmooth
/
tr
.
deltat
))
taper
=
num
.
hanning
(
n
)
tr
.
set_ydata
(
num
.
convolve
(
tr
.
get_ydata
(),
taper
))
tr
.
set_ydata
(
fft
convolve
(
tr
.
get_ydata
(),
taper
))
tr
.
set_ydata
(
num
.
maximum
(
tr
.
ydata
,
0.0
))
tr
.
shift
(
-
(
n
/
2.
*
tr
.
deltat
))
try
:
tr
.
downsample_to
(
deltat_cf
,
snap
=
True
,
demean
=
False
)
except
util
.
UnavailableDecimation
as
e
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment