Description
Here a proposal for small internal enhencement for rawio layer.
For getting analogsignal using rawio at the moment we have a parse_hedaer()
that discover "signal channels" and how they are grouped in distinct "signal stream".
The notion of stream was bit ambiguous. Normally it is a group of signal channel that have the same: "sampling rate" + "size" + "dtype". In short, very often acquired by the same sub device but the notion was left to the class.
Very often a stream used to be a set of channel in the same binary buffer of hdf5 buffer.
Sometimes channels are in the same buffer but not in the same stream for instance:
- In openephys binary format when we have 72 channels : 64 are ephys channels and 8 are AUX channels.
- In spikeGLX the last channel (SYNC) is in the same buffer be can be removed using a flag.
We should route this channel to a secondary stream instead.
Here a proposal in add a "signal_buffer" key in the rawio.header with a unique *id and then the "signal_stream" and "signal_channel" will have stream_id
Plan :
- Step 1 : add this buffer_id in all rawio classes
- Step 2 : clean some rawio (Spikeglx, ...) to sperated some streams that share the same buffer.
- Step 3 : rebase the PR buffer description api in neorawio and xarray reference API bridge #1513 top be build on top of this buffer_id concept instead of stream_id.