Skip to content

Commit 5534a7e

Browse files
committed
warn of the dangers of cmr
1 parent fa85e42 commit 5534a7e

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

examples/tutorials/forhowto/plot_1_working_with_tetrodes.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,16 +69,18 @@
6969
# Looks good! Now that the recording is aware of the probe geometry, we can
7070
# begin a standard spike sorting pipeline. First, we can apply preprocessing.
7171
# Note that we apply this preprocessing on the entire bundle of tetrodes.
72-
# This is appropriate for a common reference because the tetrodes
73-
# share the same background noise.
7472

75-
preprocessed_recording = spre.bandpass_filter(
76-
spre.common_reference(
77-
recording_with_probe
78-
)
79-
)
73+
preprocessed_recording = spre.bandpass_filter(recording_with_probe)
8074

8175
##############################################################################
76+
# WARNING: a very common preprocessing step is to apply a common median
77+
# reference. This subtracts the median signal from all channels to help
78+
# remove noise. However, for a tetrode, a spike is often seen on all
79+
# channels. So removing the median can remove the entire spike!
80+
# This is still a danger if you have two tetrodes in a bundle, which
81+
# might pick up the same spike, but becomes less dangerous
82+
# as the number of tetrodes in your bundle increases.
83+
#
8284
# Tetrodes often have dead channels, so it is advised to try and detect
8385
# and remove these. For tetrodes, we should use a detection method which
8486
# doesn't depend on the channel locations such as std or mad:

0 commit comments

Comments
 (0)