uafgeotools / rtm

A Python package for locating infrasound sources using reverse time migration
https://uaf-rtm.readthedocs.io/
MIT License
38 stars 13 forks source link

Need to apply anti-aliasing lowpass filter prior to Lanczos interpolation #60

Open liamtoney opened 2 years ago

liamtoney commented 2 years ago

As a pre-processing step, we resample waveforms using the Lanczos method. We do this here: https://github.com/uafgeotools/rtm/blob/6a163dbb3b1c1a0fd046b5dcedbcdbf7961603de/rtm/waveform.py#L90 And here: https://github.com/uafgeotools/rtm/blob/6a163dbb3b1c1a0fd046b5dcedbcdbf7961603de/rtm/waveform.py#L96

Currently we are not applying an anti-aliasing filter first — this can lead to bad results! We need to add code to apply an appropriate lowpass filter prior to the interpolate() method being called.

liamtoney commented 2 years ago

This is not as bad as I initially thought... interpolating occurs after filtering. So often (but not always) the user-defined bandpass will act as an AA filter. We still should fix!