Repository navigation
Document multi-segment read behavior and provenance - #769
Conversation
tompollard
left a comment
There was a problem hiding this comment.
Thanks for documenting this behavior. Could we clarify what None and source_segments mean for a channel selection? A nonempty segment can have segments[i] is None when it contains none of the requested channels, and its name and range can still appear in the combined record's source_segments.
For example, selecting only ABP from frames 25740–25750 of the recording used in the new example gives seg_name[1] == "3234460_0001" and segments[1] is None. The combined record still has SourceSegment("3234460_0001", 0, 10), with missing values for ABP throughout. I would state that None can mean either a ~ gap or no selected channels, and that source_segments records overlapping time ranges, not necessarily segments that supplied selected signal values.
|
Agreed. I reproduced the ABP selection and updated the docs and test in dc71a1d. |
## Summary Prepare WFDB-Python 5.8.0 after the merged, additive metadata work in #767 and #770. This bumps the version to 5.8.0 and collects the two changelog fragments. #769 also clarified the existing multi-segment read contract. The legacy `rdrecord`, `rdheader`, and writer behavior remains unchanged. - `Record.metadata` provides an immutable snapshot of the current logical view and reports every loaded signal form. - `read_multi_segment_headers` reads the main multi-segment header plus the layout header (or first non-gap data segment header for fixed layout), without loading samples or all segment headers. ## Checks - `uv build` produced the 5.8.0 source distribution and wheel. - Sphinx HTML build passed with warnings treated as errors. - `git diff --check` passed. - The feature PRs passed CI before merging; this release PR will run CI again.
Summary
Document the current multi-segment read contract for #746.
rdrecordstill combines segments by default;m2s=Falsepreserves aMultiRecord. The guide now explainssource_segmentsranges relative to a selected view, zero-length layout segments, empty segments, channel alignment, and missing values. Therdrecorddocstring makes the default and provenance behavior explicit.Add an integration test across an empty segment and a data segment in a variable-layout recording. It checks both return forms, selected boundaries, aligned channels, missing values, and named segments with no selected channel data. This PR changes no runtime behavior or public API.
Checks