Skip to content

Commit

Permalink
Update src/spikeinterface/preprocessing/filter.py
Browse files Browse the repository at this point in the history
Co-authored-by: Alessio Buccino <[email protected]>
  • Loading branch information
JuanPimientoCaicedo and alejoe91 authored Jul 9, 2024
1 parent b5095ee commit 3f1024b
Showing 1 changed file with 0 additions and 57 deletions.
57 changes: 0 additions & 57 deletions src/spikeinterface/preprocessing/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,63 +327,6 @@ def __init__(self, recording, freq=3000, q=30, margin_ms=5.0, dtype=None):
self._kwargs = dict(recording=recording, freq=freq, q=q, margin_ms=margin_ms, dtype=dtype.str)


class CausalFilter(FilterRecording):
"""
Performs causal filtering using:
* scipy.signal.lfilt or scipy.signal.sosfilt
Parameters
----------
recording : Recording
The recording extractor to be re-referenced
band : float or list, default: [300.0, 6000.0]
If float, cutoff frequency in Hz for "highpass" filter type
If list. band (low, high) in Hz for "bandpass" filter type
margin_ms : float
Margin in ms on border to avoid border effect
dtype : dtype or None
The dtype of the returned traces. If None, the dtype of the parent recording is used
direction : "forward" | "backward", default: "forward"
when causal_mode = True, defines the direction of the filtering
Returns
-------
filter_recording : CausalFilterRecording
The causal-filtered recording extractor object
{}
"""

name = "causal_filter"

def __init__(
self,
recording,
band=[300.0, 6000.0],
margin_ms=5.0,
dtype=None,
direction="forward",
**filter_kwargs,
):
FilterRecording.__init__(
self,
recording,
band=band,
margin_ms=margin_ms,
dtype=dtype,
direction=direction,
**filter_kwargs,
)
dtype = fix_dtype(recording, dtype)
self._kwargs = dict(
recording=recording,
band=band,
margin_ms=margin_ms,
dtype=dtype.str,
direction=direction,
)
self._kwargs.update(filter_kwargs)


# functions for API
Expand Down

0 comments on commit 3f1024b

Please sign in to comment.