Skip to content

Commit

Permalink
Added automated detection of filter type based on frequency parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
hornauerp committed Oct 15, 2024
1 parent de94144 commit 598c49f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion axon_tracking/template_extraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,13 @@ def extract_templates(recording, sorting, te_params, cutout_ms):
A numpy array containing the extracted templates.
"""

rec_centered = si.filter(recording, band=te_params["filter_band"])
# Filter recording
if isinstance(te_params["filter_band"], list):
btype = "bandpass"
else:
btype = "highpass"

rec_centered = si.filter(recording, btype=btype, band=te_params["filter_band"])

sorting = si.remove_excess_spikes(sorting, rec_centered)
sorting.register_recording(rec_centered)
Expand Down

0 comments on commit 598c49f

Please sign in to comment.