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
Writing a flattened record with both physical and digital arrays can write wrong values #774
Record.wrsamp can write wrong values for a flattened multi-segment record that holds both p_signal and d_signal.
When the channels of a flattened record share a signal file but have different formats, _prepare_flattened_write switches every channel to format 32 and recalculates adc_gain and baseline from p_signal. wrsamp then writes the existing d_signal, which was computed with the old calibration, under the new gains. No error or warning is raised.
Without the d_signal line, the record is written and read back with no error. An ordinary (not flattened) record with the same mismatched formats is rejected with Each file_name (dat file) specified must have the same fmt.
Possible fixes: when _prepare_flattened_write recalculates the calibration, regenerate d_signal (or e_d_signal) from the physical values, or raise an error when digital values are also present.
Activity