[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

Answers to Selected Exercises

3.

280 adu = (280 adu - (-300 adu)) / 10 adu/mmHg = 58 mmHg.

4.

120 mmHg = 120 mmHg * 10 adu/mmHg + (- 300 adu) = 900 adu.

5.

The range of sample values is -2047 to +2047 adu, or -174.7 to +234.7 mmHg. The special value -2048 adu, if found in the input, is replaced with WFDB_INVALID_SAMPLE (-32768) to indicate missing or out-of-range samples.

6.

We don’t know how big ‘signal.dat’ is, because we don’t know how many other signals are multiplexed with the BP signal. If there are no others, ‘signal.dat’ is 1,500,000 bytes (nsamp * 1.5 bytes/sample). One-third of the space occupied by ‘signal.dat’ could be saved if it were converted to format 8. The maximum slew rate representable in format 8 is 127 adu/sample interval * 100 sample intervals/sec / 10 adu/mmHg = 1270 mmHg/sec.

7.

One way to save a little space is to resample the signal at 120 Hz, and then change to format 8 (maximum slew rate = 1524 mmHg/sec). This can be done using ‘xform’; it reduces the storage requirement by one-fifth.

8.

If you have installed PhysioToolkit’s plt package, a simple solution is to write the sample numbers and values on the standard output in two-column ASCII format. The plotting is then performed by the pipeline:

 
your-program | plt 0 1

[ < ] [ > ]   [ << ] [ Up ] [ >> ]

George B. Moody (george@mit.edu)