Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 5, 2024
1 parent 7c5956e commit b5095ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/spikeinterface/preprocessing/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class FilterRecording(BasePreprocessor):
* scipy.signal.iirfilter
* scipy.signal.filtfilt or scipy.signal.sosfiltfilt when direction = "forward-backward"
* scipy.signal.lfilt or scipy.signal.sosfilt
* scipy.signal.lfilt or scipy.signal.sosfilt
BandpassFilterRecording is built on top of it.
Expand Down Expand Up @@ -60,7 +60,7 @@ class FilterRecording(BasePreprocessor):
direction : "forward" | "backward" | "forward-backward", default: "forward-backward"
Direction of filtering:
- forward and backward filter in just one direction, creating phase shifts in the signal.
- forward-backward filters in both directions, a zero-phase filtering.
- forward-backward filters in both directions, a zero-phase filtering.
Returns
-------
Expand Down Expand Up @@ -192,7 +192,7 @@ def get_traces(self, start_frame, end_frame, channel_indices):
filtered_traces = scipy.signal.lfilt(b, a, traces_chunk, axis=0)

if self.direction == "backward":
filtered_traces = np.flip(filtered_traces, axis=0)
filtered_traces = np.flip(filtered_traces, axis=0)

if right_margin > 0:
filtered_traces = filtered_traces[left_margin:-right_margin, :]
Expand Down

0 comments on commit b5095ee

Please sign in to comment.