nwb-conversion-tools icon indicating copy to clipboard operation
nwb-conversion-tools copied to clipboard

Pre-select channels to load in `CEDRecordingInterface`

Open h-mayorquin opened this issue 2 years ago • 2 comments

PR catalystneuro/nwb-conversion-tools#582 introduced the following change:

 def __init__(self, file_path: FilePathType, smrx_channel_ids: list, verbose: bool = True):
  changed to -> def __init__(self, file_path: FilePathType, verbose: bool = True):

@bendichter would like to see the feature re-implemented. Getting all the channels as a class method and provide functionality to load only those.

A solution: Looking at the implementation in the old spikeextractors I think we can just copy their old method (as it relies on sonpy) as the new class method and use spikeinterface channel slice machinery to confine the recording extractor to those channels.

We can have smrx_channel_ids = None to load all the channels and make that default behavior.

This however does not seem to improve IO efficiency in any way as the file has to be opened twice (as it was with spikeextractors).

What do you guys think?

h-mayorquin avatar Jul 01 '22 17:07 h-mayorquin