-
Notifications
You must be signed in to change notification settings - Fork 302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Read multi-frequency multi-segment records #331
Commits on May 3, 2022
-
Avoid keyword arguments to Record.check_field.
Since commit 21764cf, the optional parameter to wfdb.io.record.BaseRecord.check_field is called "required_channels", not "channels". The semantics appear equivalent. Several callers were still referring to the old name "channels", while most callers simply use positional arguments. Change all callers to use positional arguments for consistency.
Benjamin Moody committedMay 3, 2022 Configuration menu - View commit details
-
Copy full SHA for 89cfe76 - Browse repository at this point
Copy the full SHA 89cfe76View commit details -
multi_to_single: set samps_per_frame attribute.
When reading a multi-segment record, the samps_per_frame attribute must be copied from the layout segment into the resulting flattened record. (Unlike most other signal attributes, samples per frame must be uniform for a particular signal. The layout header must be used to determine the correct number of samples per frame for signals that are not present in the selected segments.)
Benjamin Moody committedMay 3, 2022 Configuration menu - View commit details
-
Copy full SHA for 5ff3563 - Browse repository at this point
Copy the full SHA 5ff3563View commit details -
multi_to_single: add expanded argument.
When reading a multi-segment record, the multi_to_single function is used to stitch the segments together into a virtual single-segment record. To enable this to work in expanded (non-smooth-frames) mode, we want to combine the 'e_p_signal' or 'e_d_signal' arrays from the individual segments, rather than 'p_signal' or 'd_signal'.
Benjamin Moody committedMay 3, 2022 Configuration menu - View commit details
-
Copy full SHA for 6cd18ba - Browse repository at this point
Copy the full SHA 6cd18baView commit details -
multi_to_single: rearrange for readability.
Benjamin Moody committedMay 3, 2022 Configuration menu - View commit details
-
Copy full SHA for d330a4a - Browse repository at this point
Copy the full SHA d330a4aView commit details -
rdrecord: allow smooth_frames=False for multi-segment records.
When reading a multi-segment, multi-frequency record, we want to have the option of reading each signal at its original sampling frequency, which requires using smooth_frames=False. Previously this simply wasn't allowed, either with or without multi-to-single conversion. To do this, we need to ensure each segment is loaded in the appropriate (smooth or non-smooth) mode (which formerly would have failed if certain segments *didn't* contain multiple samples per frame.) After loading the segments, we must invoke multi_to_single, if desired, in the appropriate mode.
Benjamin Moody committedMay 3, 2022 Configuration menu - View commit details
-
Copy full SHA for 8098338 - Browse repository at this point
Copy the full SHA 8098338View commit details -
Test reading fixed-layout multi-frequency signals.
This test case uses an excerpt of record mimicdb/041/, which is a fixed-layout record with three signals at 500 Hz (four samples per frame) and four signals at 125 Hz (one sample per frame).
Benjamin Moody committedMay 3, 2022 Configuration menu - View commit details
-
Copy full SHA for 90b8e3b - Browse repository at this point
Copy the full SHA 90b8e3bView commit details -
Test reading variable-layout signals in expanded format.
Modify the existing test case test_multi_variable_c to check that we can read a single-frequency variable-layout record using smooth_frames=False (which should retrieve the same data as smooth_frames=True, but represented as a list of arrays rather than a single array.)
Benjamin Moody committedMay 3, 2022 Configuration menu - View commit details
-
Copy full SHA for f1f805b - Browse repository at this point
Copy the full SHA f1f805bView commit details -
multi_to_single: reformat error message as f-string.
Benjamin Moody committedMay 3, 2022 Configuration menu - View commit details
-
Copy full SHA for f2044a9 - Browse repository at this point
Copy the full SHA f2044a9View commit details -
test_multi_fixed_d: add comments and use assertEqual.
Benjamin Moody committedMay 3, 2022 Configuration menu - View commit details
-
Copy full SHA for 4f06a06 - Browse repository at this point
Copy the full SHA 4f06a06View commit details