You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Clarify the multi-segment record and flattening model #746
rdrecord() combines a multi-segment record by default and returns a Record; m2s=False preserves a MultiRecord whose segments list contains Record objects or None. Empty segments, variable-layout headers, and metadata available from rdheader() require special handling. A flattened record can carry source_segments, but the public contract for these forms is spread across options and attributes.
Decisions to make
What should represent an empty segment, its length, and a variable-layout specification?
Which signal metadata should be available from a multi-segment header without loading every segment or sample?
How should callers request a combined view versus segment-preserving view, and inspect the source segments of a combined result?
Can the logical data interface be independent of single- versus multi-segment storage, while header/layout descriptions retain the format-specific distinction?
Related: #402 (segment representation), #441 (multi-record signal metadata), #442 (multi-segment header reads), #376 (signal return API), and the design review on #417.
I think rdrecord() should continue to combine segments by default (m2s=True). Most callers want one continuous signal, and changing the default would break existing code.
The combined Record should make its segment provenance easy to inspect, including each source segment's name and boundaries in the returned view. The documentation should also explain that combining a variable-layout record aligns channels and fills intervals where a channel is absent with missing values. m2s=False remains the way to preserve the separate segments.
For a future read_record API, I would spell the option out as combine_segments. We should decide its exact return types and provenance contract here before introducing that API; this does not require changing rdrecord's current default.
Follow-up from #828: we now have SegmentReference for names and lengths in a source header, SourceSegment for ranges in a combined returned view, and SegmentView for ranges and roles in a preserved MultiRecord. These describe different coordinate systems, but we should review whether their shared fields and terminology can converge without confusing source layout with the returned selection.
Activity
Represent parsed single and multi-segment headers separately (#753)
Keep parsed segment names and lengths together (#759)
Keep multi-segment read selections together (#760)
Add logical Record metadata snapshot (#767)
tompollard commentedon Nov 29, 2026
I think
rdrecord()should continue to combine segments by default (m2s=True). Most callers want one continuous signal, and changing the default would break existing code.The combined
Recordshould make its segment provenance easy to inspect, including each source segment's name and boundaries in the returned view. The documentation should also explain that combining a variable-layout record aligns channels and fills intervals where a channel is absent with missing values.m2s=Falseremains the way to preserve the separate segments.For a future
read_recordAPI, I would spell the option out ascombine_segments. We should decide its exact return types and provenance contract here before introducing that API; this does not require changingrdrecord's current default.Document multi-segment read behavior and provenance (#769)
Read multi-segment channel metadata without samples (#770)
Add a common header-only channel metadata reader (#827)
tompollard commentedon Dec 1, 2026
Follow-up from #828: we now have
SegmentReferencefor names and lengths in a source header,SourceSegmentfor ranges in a combined returned view, andSegmentViewfor ranges and roles in a preservedMultiRecord. These describe different coordinate systems, but we should review whether their shared fields and terminology can converge without confusing source layout with the returned selection.Expose segment roles and frame ranges on MultiRecord (#828)