ikarosilva / wfdb-app-toolbox

The WFDB Toolbox for MATLAB/Octave is a collection of functions for reading, writing, and processing physiologic signals in the formats used by PhysioNet (see README for details).
http://physionet.org/physiotools/matlab/wfdb-app-matlab/
GNU General Public License v3.0
93 stars 46 forks source link

rdmat extra calculation 'issue' or preference for byte offset formats #125

Closed cx1111 closed 8 years ago

cx1111 commented 8 years ago

Aside from creating a map of nans for different formats, I changed the way byte offset format signals are converted into physical units.

Old: baseline=baseline+constant so when doing val=(val-baseline)/gain, you're actually subtracting the constant and getting the right value.

New chosen:

This gives an extra subtraction calculation/computation but is technically correct.

New alternate option:

This is faster but the key-value pairs for wfdbnan will be technically incorrect for format 80 and 160 and may confuse people?