-
Notifications
You must be signed in to change notification settings - Fork 3
Description
I've been experiencing issues when trying to specify which channels to exclude from spikesorting. For recording maria/mec-social-nwb/actions/145-151021-7, channels 6 and 7 are broken.
When trying to input this in the processing tab (as channels 7 and 8, in accordance to axona nomenclature rather than openephys, I assume?) it either skips this step completely if the syntax is incorrect (e.g. if writing '7, 8', like the example text in the GUI suggests) and uses all channels, or I get the following error (here entering only CH7 as a bad channel):
Processing 145-151021-7
N JOBS 24
Cleaning up existing NWB file
Deleting main unit table
Removing LFP
Removing RawUnits-kilosort2
Preprocessing recording:
Num channels: 32
Duration: 913.74 s
ERROR: unable to process 145-151021-7
Traceback (most recent call last):
File "/fp/projects01/ec109/software/expipe-plugin-cinpla/src/expipe_plugin_cinpla/widgets/process.py", line 300, in on_run
process.process_ecephys(
File "/fp/projects01/ec109/software/expipe-plugin-cinpla/src/expipe_plugin_cinpla/scripts/process.py", line 161, in process_ecephys
recording_cmr = spre.common_reference(recording_bp, groups=groups, operator=reference)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/projects/ec109/conda-envs/cinpla/lib/python3.11/site-packages/spikeinterface/preprocessing/common_reference.py", line 130, in __init__
group_indices = [self.ids_to_indices(g) for g in groups]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/projects/ec109/conda-envs/cinpla/lib/python3.11/site-packages/spikeinterface/preprocessing/common_reference.py", line 130, in <listcomp>
group_indices = [self.ids_to_indices(g) for g in groups]
^^^^^^^^^^^^^^^^^^^^^^
File "/projects/ec109/conda-envs/cinpla/lib/python3.11/site-packages/spikeinterface/core/base.py", line 151, in ids_to_indices
raise ValueError(error_msg)
ValueError: IDs ['CH7'] are not channel ids of the extractor.
Available ids are ['CH1' 'CH2' 'CH3' 'CH4' 'CH5' 'CH6' 'CH8' 'CH25' 'CH26' 'CH27' 'CH28'
'CH29' 'CH30' 'CH31' 'CH32' 'CH33' 'CH34' 'CH35' 'CH36' 'CH37' 'CH38'
'CH39' 'CH40' 'CH57' 'CH58' 'CH59' 'CH60' 'CH61' 'CH62' 'CH63' 'CH64'] with dtype <U4
interestingly, entering CH8 as bad on the same recording gives me this:
ValueError: IDs ['CH8'] are not channel ids of the extractor.
Available ids are ['CH1' 'CH2' 'CH3' 'CH4' 'CH5' 'CH6' 'CH7' 'CH25' 'CH26' 'CH27' 'CH28'
'CH29' 'CH30' 'CH31' 'CH32' 'CH33' 'CH34' 'CH35' 'CH36' 'CH37' 'CH38'
'CH39' 'CH40' 'CH57' 'CH58' 'CH59' 'CH60' 'CH61' 'CH62' 'CH63' 'CH64'] with dtype <U4
and just to test a random (good) channel, entering CH64 gets me this:
ValueError: IDs ['CH64'] are not channel ids of the extractor.
Available ids are ['CH1' 'CH2' 'CH3' 'CH4' 'CH5' 'CH6' 'CH7' 'CH8' 'CH25' 'CH26' 'CH27'
'CH28' 'CH29' 'CH30' 'CH31' 'CH32' 'CH33' 'CH34' 'CH35' 'CH36' 'CH37'
'CH38' 'CH39' 'CH40' 'CH57' 'CH58' 'CH59' 'CH60' 'CH61' 'CH62' 'CH63'] with dtype <U4
so clearly something is not working correctly. So far I've adapted by adjusting auto threshold until I get reasonable a channel exclusion, but this is tedious and time consuming.