Hi,
the raw API could be improved, feel free to also add it in the futur
PR.
A the very begening of rawio only one global sample_rate and one
global length per segment were possible.
Then the concept of 'group_id' have been introduced for signal that
have '_common_sig_characteristics' to enable the case with several
sampling_rate/length for signals.
At
neo.io level all signal_channel with sharing the same group_id
will be grouped in the same ChannelIndex.
- In the BaseRawIO docstring, it is written that "Only one
channel set for AnalogSignal (aka ChannelIndex) stable
along Segment". If so, why is it that in many
functions, for example the _get_analogsignal_chunk, both
seg_index and channel_indexes have to be given as
parameters? How do Segment and ChannelIndex objects relate
to one another and how is their number and relationship
limited exactly in the cases where the RawIO is used?
In RawIO, signal_channel (aka ChannelIndex in neo.core) is supposed
to be stable along segment.
In short, a group of signal_channel (with same_id) is stable along
segment.
len(
ChannelIndex ) x len(segments) = total nomber of
AnalogSignal.
In legacy,
neo.io everything is possible even strange things.
- How exactly do the indexes of a ChannelIndex map to
signals? Say we have 3 AnalogSignals, in the same segment:
A1, A2, and A3:
1. If A1 contains two signals, can A2 and A3 contain
any number of signals or are they limited to the same
shape as A1?
A1, A2 and A3 come from different group_id so they can have
different length, nb_channel (so shape), sampling_rate, t_start, ...
2. If each have 2 signals, and they are all referenced
by a single ChannelIndex object, what does an index = [1]
refer to? Is it the first signal of each AnalogSignal
(A1[:, 0], A2[:, 0], A3[:, 0]) or just the first one? If
it's just the first one, does index = [3] then refer to
A2[:, 0]? Is it something else completely?
It do not make sens.
They won't have the same ChannelIndex even if they have 2 channels.
You will have 3 ChannelIndex.
3. Does the length of all signals need to be the same
for the RawIO to make sense?
Not necessary, even if it is a general case.
if you have different length inside a segment so you must declare
different group_id.