Skip to content

Commit 56da71c

Browse files
committed
add some docs
1 parent a959b35 commit 56da71c

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

doc/how_to/process_by_channel_group.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,13 @@ to any preprocessing function.
9797
shifted_recordings = spre.phase_shift(split_recording_dict)
9898
filtered_recording = spre.bandpass_filter(shifted_recording)
9999
referenced_recording = spre.common_reference(filtered_recording)
100+
good_channels_recording = spre.detect_and_remove_bad_channels(filtered_recording)
100101
101102
We can then aggregate the recordings back together using the ``aggregate_channels`` function
102103

103104
.. code-block:: python
104105
105-
combined_preprocessed_recording = aggregate_channels(referenced_recording)
106+
combined_preprocessed_recording = aggregate_channels(good_channels_recording)
106107
107108
Now, when ``combined_preprocessed_recording`` is used in sorting, plotting, or whenever
108109
calling its :py:func:`~get_traces` method, the data will have been

doc/modules/preprocessing.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,18 @@ interpolated with the :code:`interpolate_bad_channels()` function (channels labe
247247
# Case 2 : interpolate then
248248
rec_clean = interpolate_bad_channels(recording=rec, bad_channel_ids=bad_channel_ids)
249249
250+
Once you have tested these functions and decided on your workflow, you can use the `detect_and_*`
251+
functions to do everything at once. These return a Preprocessor class, so are consistent with
252+
the "chain" concept for this module. For example:
253+
254+
.. code-block:: python
255+
256+
# detect and remove bad channels
257+
rec_only_good_channels = detect_and_remove_bad_channels(recording=rec)
258+
259+
# detect and interpolate the bad channels
260+
rec_interpolated_channels = detect_and_interpolate_bad_channels(remove_channel_ids=bad_channel_ids)
261+
250262
251263
* :py:func:`~spikeinterface.preprocessing.detect_bad_channels()`
252264
* :py:func:`~spikeinterface.preprocessing.interpolate_bad_channels()`

0 commit comments

Comments
 (0)