wfdb-python
wfdb-python copied to clipboard
Multi-frequency data with wfdb.wrsamp
If you have some multi-frequency data and are trying to save it as a WFDB record, currently the only way to do so is to create a Record object and call Record.wrsamp. This is laborious and error-prone because of all the auxiliary fields that Record.wrsamp requires.
It'd be nice to be able to pass an e_d_signal or e_p_signal parameter to wfdb.wrsamp instead, e.g.:
wfdb.wrsamp(
'example',
fs=125,
units=['mV', 'mmHg'],
sig_name=['ECG', 'ABP'],
samps_per_frame=[4, 1],
e_p_signal=[
numpy.array([0.282, 0.297, 0.304, 0.304,
0.311, 0.311, 0.333, 0.333]),
numpy.array([70.093, 75.623])])
Related warts:
-
set_d_features(expanded=True, do_adc=True)is broken (it stores the data incorrectly ind_signalrather thane_d_signal) -
adc(expanded=True)fails ifn_sigis unset (it doesn't do that withexpanded=False)