python-neo
python-neo copied to clipboard
Meaning of the "Block" and "Segment" objects.
In what case are there multiple blocks per the reader object?
What does it mean semantically when blocks = reader.read()
contains more than one Block
object?
In almost all cases a reader will only return one block. However, certain IO modules (I forget which ones) can in principle store more than one block in a file.
Neo deliberately attaches minimal semantics to the data structures, so a Block can represent whatever a user wishes; however in general a Block is used to represent data from one recording session.
Thank you!
I have a similar question about Segment
s - what are the conditions for multiple AnalogSignal
s to be put into the same Segment
? What's meant by a "common clock/time basis"?
![](https://user-images.githubusercontent.com/7578559/186258624-05cc9a83-c01e-4001-ba7c-a031bab439a5.png)
Having a common clock / time basis within a segment means that timestamps of objects in that segment (spiketrains, analogsignals) have the same reference time. E.g. you might have a recording that is interrupted after 5 minutes and the interruption leads to a reset of the clock of the recording system. In that case you would end up with two segments, both starting at time 0
. Here you can compare the data recorded between spiketrains and analogsignals within one segment, but the timestamps of spiketrains of different segments have a fix (and maybe unknown) time offset.