|[ < ]||[ > ]||[ << ]||[ Up ]||[ >> ]||[Top]||[Contents]||[Index]||[ ? ]|
These exercises are based on the material in the previous chapters. Answers to some of them are at the back of the book, but try to work through them first.
WFDB(see section The Database Path and Other Environment Variables). It is a good idea to include this step in your ‘.profile’, ‘.cshrc’, or ‘autoexec.bat’. As input, try record ‘100s’, input annotator ‘atr’, and output annotator ‘normal’. The program should finish in five seconds or less. The annotations will have been written into a file called ‘100s.nor’ in the current directory. Now type “
rdann -r 100s -a atr” and observe the output for a few seconds, then try “
rdann -r 100s -a nor” and notice the difference.
fname = "signal.dat" desc = "BP" units = "mmHg" gain = 10 initval = 80 group = 0 fmt = 212 spf = 1 bsize = 0 adcres = 12 adczero = 0 baseline = -300 nsamp = 1000000 cksum = 3109
For starters, convert a sample value of 280 into physical units.
your-program record 10:0 10:10
should skip the first ten minutes, then process the next ten seconds of signals from record.
isigsettimeon a format 8 signal introduces a random offset into the signal, since the contents of a format 8 signal file are first differences rather than amplitudes. For an AC-coupled signal such as an ECG, this is usually inconsequential, but a DC-coupled signal such as a blood pressure signal is usually useful only if absolute levels are known. If we store such a signal in format 8, we must read it sequentially from the beginning in order to get correct sample values. If we intend to do a lot of non-sequential processing of such a signal, it may be worthwhile to build a table containing the correct sample values at periodic intervals; then we can use
isigsettimeto skip to a sample in the table, and read forward sequentially from that point. Write a program to build such a table, and wrappers for
getvecto give random access to format 8 signal files without introducing offset errors. On your system, how many sample intervals should be allowed between table entries in order to obtain an
isigsettimeequivalent that executes in an average of 100 msec or less?
putvec(see section Example 7: A General-Purpose FIR Filter, for a model program). Try it out on MIT DB record ‘122’ (if you have a NETFILES-enabled WFDB library, use the default WFDB path, and open record ‘mitdb/122’; otherwise, download the record from http://physionet.org/physiobank/database/mitdb/.) Use your programs from the previous exercises to display your output and compare it with the original signals.
setifreq. Some useful constants (for adult human ECGs): average normal QRS duration = 80 milliseconds, average QRS amplitude = 1 millivolt, average R-R interval = 1 second; assume that upper and lower limits for these quantities are within a factor of 3 of the average values. Run your detector on MIT-BIH Arrhythmia Database record ‘200’. (If you have a NETFILES-enabled WFDB library, use the default WFDB path, and open record ‘mitdb/200’; otherwise, download the record from http://physionet.org/physiobank/database/mitdb/.) Read the documentation on the annotation comparator, ‘bxb’, and figure out how to use it to compare the annotation file produced by your program against the reference annotator ‘atr’. How does your detector compare to Example 10?
|[ < ]||[ > ]||[ << ]||[ Up ]||[ >> ]|
George B. Moody (email@example.com)