Skip to content

Commit

Permalink
add a default filter order to apply_bandpass
Browse files Browse the repository at this point in the history
  • Loading branch information
kkappler committed Jan 5, 2024
1 parent 63ddc4a commit 1c8bd1f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mth5/timeseries/ts_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,12 +447,16 @@ def apply_bandpass(self, ts):
:rtype: np.ndarray
"""
try:
filter_order = self.bandpass["order"]
except KeyError:
filter_order = 5
ts = butter_bandpass_filter(
ts,
self.bandpass["low"],
self.bandpass["high"],
1./self.sample_interval,
order=self.bandpass["order"],
order=filter_order,
)

if self.plot:
Expand Down

0 comments on commit 1c8bd1f

Please sign in to comment.