file: MIMIC.TXT G. Moody 5 November 1996 Reading MIMIC Database records using your own software ------------------------------------------------------ MIMIC Database records differ in several important ways from records included in our previous CD-ROM databases of ECGs and other physiologic signals: 1. They are `multi-frequency' records. In our previous databases, all signals have been sampled at the same frequency in any given record. 2. They include `multi-segment' (composite) records. Each multi-segment record is composed of a number of ordinary 10-minute records (recorded without gaps between them), which are accessible separately if desired. Any set of segments can easily be arranged to form a multi-segment record of any desired length (for details, see ../html/dbag/dbcollate.1.html). 3. They include skew corrections in the header files. If the first samples recorded for each signal are not simultaneous, these skew correction fields specify how many `extra' samples are present at the beginning of each signal. To accommodate these features, the DB library has been updated. In most cases, applications built using older versions of the DB library require no source modifications (only recompilation or relinking) in order to read the records on this disk. To support multiple sampling frequencies, we introduced the concept of a sample `frame' in DB library version 9.0. A frame contains at least one sample of each signal; a new DB library function, `getframe', reads an entire frame. To permit existing applications to read these records without modification, `getvec' now invokes `getframe', and then (in its default mode) averages all samples in the frame (separately for each signal). Hence applications continue to receive one sample per signal on each call to `getvec'. To read in `low resolution' mode, with all signals converted on-the-fly to 125 samples per second, you need make no changes to your programs. To read in `high resolution' mode, with all signals converted on-the-fly to 500 samples per second, include the line setgvmode(DB_HIGHRES); in your program at any point before invoking `getvec'. To read in multi- frequency mode, with neither interpolation nor decimation, use `getframe' rather than `getvec'. The applications `rdsamp', `xform', and `wave' all accept a `-H' command-line argument that causes them to operate in `high resolution' mode. To support composite records, we defined a new type of header file, which contains a list of the (ordinary) records that comprise the multi-segment record. To an application built using DB library version 9.1 or later, a multi-segment record of this type is indistinguishable from an ordinary record; reading and seeking (in either direction) works as always, with the DB library opening and closing signal files as needed to move among segments. To support skew correction, we added an optional field to the header file. DB library version 9.2 and later versions perform skew correction on-the-fly within `getframe', invisibly to the application, which receives frames from `getframe' or sample vectors from `getvec' containing simultaneous samples (provided that the skews have been correctly recorded in the header file). If you are using proprietary applications that cannot be recompiled or relinked, or if your applications were not built using the DB library, use `xform' (included on this disk) to reformat these recordings into a compatible binary format, or use `rdsamp' (also included on this disk) to convert any desired portions of them into text format. `xform' converts all signals to the same sampling frequency (you may choose any desired sampling frequency within reason -- you are not restricted to 125 or 500 Hz), concatenates the segments of multi-segment records, and performs skew correction. `xform' also allows you to demultiplex signal files, change storage formats, adjust signal gains and offsets, select a subset of signals, rearrange signals, and choose an interval to be copied. See xform(1) in the ECG Database Applications Guide (http://ecg.mit.edu/dbag/xform-1.htm) for details.