nwb-conversion-tools
nwb-conversion-tools copied to clipboard
Pre-select channels to load in `CEDRecordingInterface`
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?