[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
There are four types of files supported by the WFDB library:
Header Files | contain signal file names and attributes. | |
Signal Files | contain signals. | |
Annotation Files | contain annotations. | |
Calibration Files | contain signal calibration specifications. | |
The other topics in this section deal with special types of database access: | ||
---|---|---|
EDF Files | a popular format readable by WFDB 10.4.5 and later. | |
AHA Format Files | not used for on-line WFDB records. | |
5.2 Using Standard I/O for Database Files | pipes and I/O redirection for WFDB files. | |
5.3 Multiplexed Signal Files | signal groups. | |
5.4 Multi-Frequency Records | signals sampled at different frequencies within within a given record. | |
5.5 Multi-Segment Records | concatenated records. | |
5.6 Simultaneous Access to Multiple Records | how to have more than one record open. | |
5.7 Signals That Are Not Stored in Disk Files | signal I/O using block and character devices. | |
5.8 Piped and Local Records | records for use with user-created signals. | |
5.9 NETFILES | input directly from web and FTP servers. | |
5.10 Annotation Order | the canonical order for annotations: how and why to break the rules, and how to deal with the consequences of doing so. |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Header files have names of the form ‘record.hea’, where
record is the record name. (MIT DB records are named 100–124 and
200–234 with some numbers missing. AHA DB records are named
1001–1010, 2001–2010, 3001–3010, 4001–4010, 5001–5010, 6001–6010,
7001–7010, and 8001–8010. ESC DB records are named e0103–e1304, with
many numbers missing.) Header files are text files, with lines
terminated by ASCII carriage-return/line-feed pairs, created by
newheader
, setheader
, or setmsheader
, from which
isigopen
, osigopen
, and wfdbinit
read the names of
the signal files and their attributes as given in the array of
WFDB_Siginfo
objects; sampfreq
also reads a header
file to determine the sampling frequency used for a record.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Signal files usually have names of the form
‘record.dat’. (The .dat
suffix is conventional, but
not required; any file name acceptable to the operating system is
permissible.) Signal files are binary, and usually contain either
16-bit amplitudes (format 16), pairs of 12-bit amplitudes bit-packed
into byte triplets (format 212), or 8-bit first differences (format 8).
(See ‘<wfdb/wfdb.h>’ for information about other formats that are
supported.) The functions that read and write signal files perform
appropriate transformations so that the samples visible to the
application program are always amplitudes of type int
(at least
16 bits), regardless of the signal file format.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Annotation files have names of the form ‘record.annotator’. Those named ‘record.atr’ are reference annotation files (assumed to be correct). Annotation files are binary, and contain records of variable length that average slightly over 16 bits per annotation.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Unlike header, signal, and annotation files, calibration files are
not associated with individual records. A calibration file is needed
only if you have records containing signals other than ECGs; in this
case, it is likely that a single calibration file will be adequate for use
with all of your records. Calibration files are text files, with lines
terminated by ASCII carriage-return/line-feed pairs, created by
newcal
, from which calopen
reads the calibration list
(see section Calibration Information Structures).
The WFDB Software Package includes a standard calibration file,
‘wfdbcal’, in the ‘data’ directory.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
European Data Format (EDF) was defined in 1990, and it has become a very widely supported open format for exchange of recorded physiologic signals, especially polysomnograms. EDF files encapsulate functional equivalents of header and signal files, and EDF+ files can also include annotation streams (stored as signals).
EDF files begin with an embedded (text) header containing specifications of the signals and a limited amount of demographic information, followed by the binary samples of the signals. Within each block of samples, typically one second to one minute in length, all samples of the first signal are stored consecutively, followed by all samples of the second signal, etc.
EDF files can be read directly using WFDB library version 10.4.5 and later. The name of the file, which must include a ’.’ and cannot end in ’.hea’, can be passed as a record name to any WFDB library function that accepts record names. Although the WFDB library does not support EDF as an output format, the ‘mit2edf’ application included in the WFDB Software Package can convert anything readable by the WFDB library into EDF.
EDF+, defined in 2003, is backwards-compatible with EDF (any EDF reader, including the WFDB library, can read EDF+), but the additional features of EDF+, including methods for reading annotations and recognizing signal discontinuities (which are marked by annotations), are available only from EDF+-specific readers. The WFDB library does not currently include built-in support for the additional features of EDF+, but annotation streams are available as signals, so it is possible for an application using the WFDB library to provide its own means of decoding annotation streams as they are read.
Further information about EDF and EDF+ is available at http://www.edfplus.info/.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The “AHA Format” was defined in 1980 for storage of database records
on 9-track digital tape. Signal files in AHA format are in format 16,
with two signals multiplexed into one file (see section Multiplexed Signal Files),
and may be read and written using getvec
and putvec
.
AHA-format annotation files are binary, and contain fixed-length
(16-byte) annotation records. An annotation file in AHA format may be
read or written using getann
or putann
, if the stat
field of the WFDB_Anninfo
object is set to WFDB_AHA_READ
or
WFDB_AHA_WRITE
before opening the file. annopen
recognizes the
format of input annotation files automatically and prints a warning if
the format does not match what was expected on the basis of stat
.
AHA format annotation files may be converted to standard format without
loss of information, and doing so reduces the storage requirement by a
factor of eight.
Yet another format has been used more recently for distribution of AHA DB files on floppy diskettes and CDROMs. This format is compatible with neither the original AHA format nor with any of the formats supported directly by the WFDB library. Programs ‘a2m’ and ‘ad2m’, supplied with the WFDB Software Package, can convert files in this format (as well as those in the original AHA format) to the standard formats.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] |
PhysioNet (wfdb@physionet.org)