buffer¶
Models for a data stream from a miniscope device: header formats, containers, etc.
- pydantic model miniscope_io.models.buffer.BufferHeader¶
Container for the data stream’s header, structured by
MetadataHeaderFormatShow JSON schema
{ "title": "BufferHeader", "description": "Container for the data stream's header, structured by :class:`.MetadataHeaderFormat`", "type": "object", "properties": { "linked_list": { "title": "Linked List", "type": "integer" }, "frame_num": { "title": "Frame Num", "type": "integer" }, "buffer_count": { "title": "Buffer Count", "type": "integer" }, "frame_buffer_count": { "title": "Frame Buffer Count", "type": "integer" }, "timestamp": { "title": "Timestamp", "type": "integer" } }, "required": [ "linked_list", "frame_num", "buffer_count", "frame_buffer_count", "timestamp" ] }
- Fields:
- classmethod from_format(vals: Sequence, format: BufferHeaderFormat, construct: bool = False) _T¶
Instantiate a buffer header from linearized values (eg. in an ndarray or list) and an associated format that tells us what index the model values are found in that data.
- Parameters:
vals (list,
numpy.ndarray) – Indexable values to cast to the header modelformat (
BufferHeaderFormat) – Format used to index valuesconstruct (bool) – If
True, usemodel_construct()to create the model instance (ie. without validation, but faster). Default:False
- Returns:
- pydantic model miniscope_io.models.buffer.BufferHeaderFormat¶
Format model used to parse header at the beginning of every buffer.
Show JSON schema
{ "title": "BufferHeaderFormat", "description": "Format model used to parse header at the beginning of every buffer.", "type": "object", "properties": { "linked_list": { "title": "Linked List", "type": "integer" }, "frame_num": { "title": "Frame Num", "type": "integer" }, "buffer_count": { "title": "Buffer Count", "type": "integer" }, "frame_buffer_count": { "title": "Frame Buffer Count", "type": "integer" }, "timestamp": { "title": "Timestamp", "type": "integer" } }, "required": [ "linked_list", "frame_num", "buffer_count", "frame_buffer_count", "timestamp" ] }
- Fields: