Description
I'm now doing optotagging with Neuropixel probe. I'm now using red light and get a lot of light artifacts. The optic fiber stimulation site is far from the Neuropixel probe recording site. Therefore, I chose to use the median subtraction method to do so.
Specifically, below is my code:
### Preprocessing
## Phase shift
rec_shift = spre.phase_shift(recording=recording_oe)
## Bandpass filter
recording_f = spre.bandpass_filter(recording=rec_shift, freq_min=300, freq_max=6000)
## Detect and Remove Bad Channels
# detect
bad_channel_ids, channel_labels = spre.detect_bad_channels(recording=recording_f)
# Case 2 : interpolate then
rec_clean = spre.interpolate_bad_channels(recording=recording_f, bad_channel_ids=bad_channel_ids)
## Common Reference
recording_cmr = spre.common_reference(recording=rec_clean, operator="median")
##Remove light artifacts
rec_removed = spre.remove_artifacts(recording=recording_cmr, list_triggers=laser_on_times, mode='median')
It's promising, see attached figures, however the artifacts still exist. Recently I was reading the biorxiv paper https://www.biorxiv.org/content/10.1101/2025.02.04.636286v2. In the supplementary figure 4, they successfully removed the light artifacts in the red light pulses. "The artifact seen for red pulses is highly uniform across recording sites, allowing it to be completely removed by phase shifting and median subtraction (see Methods for details)." I think I did the same things.
I'm wondering whether you have better ideas of how to improve my preprocessing steps!