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
In general, it's useful to be able to read record metadata without reading the signals.
For multi-segment records, however, rdheader just reads the MS header by default (rd_segments=False), which means it doesn't read any of the signal metadata (e.g. signal names and units).
With rd_segments=True, rdheader reads the signal metadata and also all of the segment headers, which are not always needed.
For some applications it would be useful to have a middle ground of reading the multisegment header and the layout header, but not any of the segment headers. (Note that this is what isigopen does.)
I think this might make sense as the default behavior, since reading the signal metadata is a very common use of rdheader.
Update: #770 adds read_multi_segment_headers(path) for the metadata-only middle ground described here. It reads the main multi-segment header plus the layout header for variable layout, or the first non-gap data segment header for fixed layout, without loading samples or the remaining segment headers.
We kept rdheader's default unchanged for compatibility and made the additional header read explicit. I am leaving this issue open for the separate question of whether the legacy rdheader default should change, but the two-header use case now has a direct API.
Correction to my update above: I do not think the rdheader default should change. The original suggestion addressed a missing middle ground, which #770 now provides through an explicit metadata-only read. Changing rdheader would make existing calls fetch another header, potentially over the network, and change their behavior without the caller asking for it. I am closing this issue as addressed by read_multi_segment_headers().
Activity
Read multi-segment channel metadata without samples (#770)
tompollard commentedon Nov 29, 2026
Update: #770 adds
read_multi_segment_headers(path)for the metadata-only middle ground described here. It reads the main multi-segment header plus the layout header for variable layout, or the first non-gap data segment header for fixed layout, without loading samples or the remaining segment headers.We kept
rdheader's default unchanged for compatibility and made the additional header read explicit. I am leaving this issue open for the separate question of whether the legacyrdheaderdefault should change, but the two-header use case now has a direct API.tompollard commentedon Nov 30, 2026
Correction to my update above: I do not think the
rdheaderdefault should change. The original suggestion addressed a missing middle ground, which #770 now provides through an explicit metadata-only read. Changingrdheaderwould make existing calls fetch another header, potentially over the network, and change their behavior without the caller asking for it. I am closing this issue as addressed byread_multi_segment_headers().