wfdb icon indicating copy to clipboard operation
wfdb copied to clipboard

WFDB invalid sample for format 24 and 32

Open cx1111 opened this issue 8 years ago • 0 comments

Currently invalid samples for <16 bit precision formats are interpreted to be equal to the minimum value stored by the format. These invalid samples are then converted to the constant WFDB_INVALID_SAMPLE defined in wfdb.h which is equal to -32768.

For formats with >=16 bit precision, including 24 and 32, there is no conversion. This means that fmts 24 and 32 currently cannot store actual values of -32768 and must store their invalid samples as that number as well.

Potentially in the next wfdb major release, WFDB_INVALID_SAMPLE should be redefined as 2^-31 instead.

cx1111 avatar Jul 14 '16 17:07 cx1111