diff -Naur --exclude Makefile --exclude info wfdb-10.4.7/conf/version.def wfdb-10.4.8/conf/version.def --- wfdb-10.4.7/conf/version.def 2008-04-15 12:11:06.000000000 -0400 +++ wfdb-10.4.8/conf/version.def 2008-07-23 16:16:15.000000000 -0400 @@ -1,11 +1,11 @@ # file: version.def G. Moody 24 May 2000 -# Last revised: 15 April 2008 +# Last revised: 23 July 2008 # Each release of the WFDB Software Package is identified by a three-part # version number, defined below. Be sure to leave a single space before # and after the "=" in each of the next three lines! MAJOR = 10 MINOR = 4 -RELEASE = 7 +RELEASE = 8 VERSION = $(MAJOR).$(MINOR).$(RELEASE) # RPMRELEASE can be incremented if changes are made between official diff -Naur --exclude Makefile --exclude info wfdb-10.4.7/convert/ahaecg2mit.c wfdb-10.4.8/convert/ahaecg2mit.c --- wfdb-10.4.7/convert/ahaecg2mit.c 1969-12-31 19:00:00.000000000 -0500 +++ wfdb-10.4.8/convert/ahaecg2mit.c 2008-07-23 15:03:14.000000000 -0400 @@ -0,0 +1,89 @@ +/* file: ahaecg2mit.c G. Moody 7 May 2008 + +Convert a *.ecg file from an AHA Database DVD to WFDB-compatible format +*/ + +#include +#include +#include + +main(int argc, char **argv) +{ + char *p, *record; + int i, sflag; + FILE *ifile; + void process(char *r, FILE *f); + + if (argc < 2 || strcmp(argv[1], "-h") == 0) { + fprintf(stderr, "usage: %s [-s] RECORD.ecg [RECORD.ecg]...\n", argv[0]); + fprintf(stderr, " (use -s to make short-format 35-minute records)\n"); + exit(1); + } + if (strcmp(argv[i = 1], "-s") == 0) { + sflag = 1; /* produce short-format (35-minute) records */ + i = 2; + } + for ( ; i < argc; i++) { + p = argv[i] + strlen(argv[i]) - 4; /* pointer to '.ecg' */ + if (strcmp(".ecg", p) && strcmp(".ECG", p)) { + fprintf(stderr, "%s: ignoring '%s'\n", argv[0], argv[i]); + continue; /* not an .ecg or .ECG file */ + } + if ((ifile = fopen(argv[i], "rb")) == NULL) { + fprintf(stderr, "%s: can't open '%s'\n", argv[0], argv[1]); + continue; + } + *p = '\0'; /* strip off extension */ + record = p - 4; /* AHA record names are 4 (ASCII) digits */ + if (sflag) {/* skip first 145 minutes if making a short-format record */ + fseek(ifile, 145L*60L*250L*5L, SEEK_SET); + record[1] += 2; /* fix record name (n0nn->n2nn, n1nn->n3nn) */ + } + process(record, ifile); + fclose(ifile); + } + exit(0); +} + +void process(char *record, FILE *ifile) +{ + char ofname[10], data[5]; + WFDB_Time t = -1; + static WFDB_Siginfo si[2]; + static WFDB_Anninfo ai; + static WFDB_Sample v[2]; + static WFDB_Annotation a; + + setsampfreq(250.0); /* AHA DB is sampled at 250 Hz for each signal */ + sprintf(ofname, "%s.dat", record); + si[0].fname = ofname; + si[0].desc = "ECG0"; + si[0].units = "mV"; + si[0].gain = 400; + si[0].fmt = 212; + si[0].adcres = 12; + si[1] = si[0]; + si[1].desc = "ECG1"; + ai.name = "atr"; + ai.stat = WFDB_WRITE; + if (osigfopen(si, 2) != 2 || annopen(record, &ai, 1) < 0) { + wfdbquit(); + return; + } + while (fread(data, 1, 5, ifile) == 5) { + v[0] = (data[0] & 0xff) | ((data[1] << 8) & 0xff00); + v[1] = (data[2] & 0xff) | ((data[3] << 8) & 0xff00); + (void)putvec(v); + if (data[4] != '.') { + a.anntyp = ammap(data[4]); + a.subtyp = (data[4] == 'U' ? -1 : 0); + a.time = t; + (void)putann(0, &a); + } + t++; + } + (void)newheader(record); + wfdbquit(); + fprintf(stderr, "wrote %s.atr, $s.dat, and %s.hea\n", record,record,record); + return; +} diff -Naur --exclude Makefile --exclude info wfdb-10.4.7/convert/Makefile.tpl wfdb-10.4.8/convert/Makefile.tpl --- wfdb-10.4.7/convert/Makefile.tpl 2008-04-04 14:35:47.000000000 -0400 +++ wfdb-10.4.8/convert/Makefile.tpl 2008-07-23 16:15:07.000000000 -0400 @@ -1,11 +1,11 @@ # file: Makefile.tpl G. Moody 24 May 2000 -# Last revised: 4 April 2008 +# Last revised: 23 July 2008 # This section of the Makefile should not need to be changed. -CFILES = a2m.c ad2m.c m2a.c md2a.c readid.c makeid.c edf2mit.c mit2edf.c \ - rdedfann.c wav2mit.c mit2wav.c revise.c -XFILES = a2m ad2m m2a md2a readid makeid edf2mit mit2edf rdedfann wav2mit \ - mit2wav revise +CFILES = a2m.c ad2m.c ahaecg2mit.c m2a.c md2a.c readid.c makeid.c edf2mit.c \ + mit2edf.c rdedfann.c wav2mit.c mit2wav.c revise.c +XFILES = a2m ad2m ahaecg2mit m2a md2a readid makeid edf2mit mit2edf rdedfann \ + wav2mit mit2wav revise SCRIPTS = ahaconvert MFILES = Makefile diff -Naur --exclude Makefile --exclude info wfdb-10.4.7/convert/README wfdb-10.4.8/convert/README --- wfdb-10.4.7/convert/README 2005-06-08 17:29:20.000000000 -0400 +++ wfdb-10.4.8/convert/README 2008-07-23 16:03:25.000000000 -0400 @@ -1,9 +1,11 @@ file: README G. Moody 28 July 1989 - Last revised: 8 June 2005 + Last revised: 23 July 2008 -This directory contains sources for WFDB applications that convert database -files in various unsupported formats to and from MIT format (also known as -WFDB or PhysioBank format), including to and from EDF and AHA DB formats. +This directory contains sources for WFDB applications that convert signal and +annotation files in various unsupported formats to and from WFDB format (also +known as PhysioBank or MIT format), including EDF/EDF+, WAV (audio), and AHA DB +formats. (Note that EDF input is supported by recent versions of the WFDB +library, however.) Note that many commonly used formats are supported by the WFDB library. The program `xform' (in the `app' directory) is a flexible application for @@ -16,20 +18,40 @@ supported (binary) formats and text; programs `rdann' and `wrann', also in the `app' directory, perform similar conversions for annotation files. -If you need to convert digital data to analog form, or vice versa, see program -`sample' (for MS-DOS only) in the `app' directory. - European Data Format (EDF) has been used for storage of multiparameter, multifrequency data (such as polysomnograms) since 1990. Program `edf2mit' -reads an EDF file and generates MIT-format header and signal files from it. -Program 'mit2edf' performs the inverse conversion. +reads an EDF file and generates WFDB-format header and signal files from it. +(Although this conversion is no longer needed since current versions of the +WFDB library can read EDF files directly, the native WFDB files produced by +'edf2mit' can be read more efficiently and with lower latency and memory +requirements than the EDF files.) Program 'mit2edf' performs the inverse +conversion. Program 'rdedfann' creates a WFDB annotation file from the +annotation stream embedded in an EDF+ file. (Although multi-segment WFDB +records can be discontinuous, there is currently no support for reading or +writing discontinuous EDF+ files using the WFDB library, or for writing an EDF+ +annotation stream, either natively or using a converter.) + +The popular .wav format used for audio files is readable by WFDB applications +once a short header (.hea) file that describes the format of the .wav file +has been created; 'wav2mit' does this. Note that there are many variants +of .wav format, and only the common ones are readable in this way. If you +encounter an incompatible .wav file, or a file in another audio format, an +audio format converter such as the open-source SoX (sox.sourceforge.net) may +be helpful. Program 'mit2wav' converts a WFDB record (signals only, not +annotations) into a .wav file. + +The AHA Database for Evaluation of Ventricular Arrhythmia Detectors (AHA DB) +is available on DVD from ECRI (www.ecri.org), in a format that is not compatible +with those previously used for the AHA DB on CDs, floppy disks, and tapes. +To convert this format to WFDB format, use 'ahaecg2mit.c'. (There is no support +for performing the inverse conversion.) AHA DB tape distribution format was used for both the AHA DB and the MIT-BIH DB between 1980 and 1990. AHA DB tape distribution format requires more space than the other formats supported by the WFDB library and applications, however, so it is not recommended for on-line storage. Programs `a2m' and `ad2m' can also convert AHA DB CD-ROM and diskette distribution format files into standard -WFDB files; the reverse conversion is not supported, however. +WFDB files; the inverse conversion is not supported, however. Once you have installed 'a2m' and 'ad2m', the shell script 'ahaconvert' can be used to create a set of AHA DB records in WFDB format from an AHA DB CD-ROM @@ -39,7 +61,7 @@ package from http://www.cygwin.com/) in order to run 'ahaconvert'. This directory also contains the program `revise', which converts obsolete MIT -header files into new-format MIT header files. (Unless you have very old +header files into new-format WFDB header files. (Unless you have very old header files, made before 1990, you will not need this program.) Contributions to this set of format converters are welcome. If you have @@ -71,15 +93,18 @@ Makefile.tpl Used by ../configure to construct Makefile (portable section) README this file -a2m.c Converts an AHA format annotation file to MIT format -ad2m.c Converts an AHA format signal file to MIT format -ahaconvert Converts an AHA DB CD-ROM to MIT format using a2m and ad2m -m2a.c Converts an MIT format annotation file to AHA format -md2a.c Converts an MIT format signal file to AHA format +edf2mit.c Converts an EDF file to a WFDB record +mit2edf.c Converts a WFDB record into an EDF file +rdedfann.c Converts an EDF+ annotation stream into a WFDB annotation file +wav2mit.c Makes .hea file so that a .wav file is readable as a WFDB record +mit2wav.c Converts a WFDB record into a .wav file +ahaecg2mit.c Converts an AHA DB DVD file to a WFDB record + +a2m.c Converts an AHA format annotation file to WFDB format +ad2m.c Converts an AHA format signal file to WFDB format +ahaconvert Converts an AHA DB CD-ROM to WFDB format using a2m and ad2m +m2a.c Converts a WFDB format annotation file to AHA format +md2a.c Converts a WFDB format signal file to AHA format readid.c Extracts record name and file lengths from AHA-format ID block makeid.c Makes an AHA-format ID block for a database record - -edf2mit.c Converts an EDF file to MIT format -mit2edf.c Converts an MIT format record into an EDF file - -revise.c Converts an obsolete MIT header to a new-format MIT header +revise.c Converts an obsolete WFDB header to a new-format WFDB header diff -Naur --exclude Makefile --exclude info wfdb-10.4.7/doc/wag-src/a2m.1 wfdb-10.4.8/doc/wag-src/a2m.1 --- wfdb-10.4.7/doc/wag-src/a2m.1 2003-02-23 11:57:33.000000000 -0500 +++ wfdb-10.4.8/doc/wag-src/a2m.1 2008-07-23 14:58:16.000000000 -0400 @@ -1,29 +1,125 @@ -.TH A2M 1 "23 February 2003" "WFDB 10.3.2" "WFDB Applications Guide" +.TH A2M 1 "23 July 2008" "WFDB 10.4.8" "WFDB Applications Guide" .SH NAME -a2m, ad2m, ahaconvert, m2a, md2a \- converting between MIT and AHA DB formats +a2m, ad2m, ahaconvert, ahaecg2mit, m2a, md2a \- converting between AHA DB and WFDB formats .SH SYNOPSIS -\fBa2m -i\fR \fIahafile\fR \fB-r\fR \fIrecord\fR \fB-a\fR \fIannotator\fR [ \fIoptions\fR ... ] + +To read from an AHA DB DVD: +.br + \fBahaecg2mit\fR [ \fB-s\fR ] \fIahafile\fB.ecg\fR ... +.br +To read from an AHA DB CD: +.br + \fBahaconvert\fR \fIahafile\fB.cmp\fR ... .br -\fBad2m -i\fR \fIahafile\fR \fB-r\fR \fIrecord\fR [ \fIoptions\fR ... ] +To read from an AHA DB floppy disk or 9-track tape: .br -\fBahaconvert\fR \fIahafile\fR ... + \fBa2m -i\fR \fIahafile\fR \fB-r\fR \fIrecord\fR \fB-a\fR \fIannotator\fR [ \fIoptions\fR ... ] .br -\fBm2a -r\fR \fIrecord\fR \fB-a\fR \fIMIT-annotator AHA-annotator\fR [ \fIoptions\fR ... ] + \fBad2m -i\fR \fIahafile\fR \fB-r\fR \fIrecord\fR [ \fIoptions\fR ... ] .br -\fBmd2a -o\fR \fIahafile\fR \fB-r\fR \fIrecord\fR [ \fIoptions\fR ... ] +To convert a WFDB record to AHA tape format: +.br + \fBm2a -r\fR \fIrecord\fR \fB-a\fR \fIWFDB-annotator AHA-annotator\fR [ \fIoptions\fR ... ] +.br + \fBmd2a -o\fR \fIahafile\fR \fB-r\fR \fIrecord\fR [ \fIoptions\fR ... ] .SH DESCRIPTION -These programs can be used to convert AHA DB distribution files from -half-inch 9-track tape, CD-ROMs, or floppy disks to MIT (PhysioBank) format -(i.e., formats that can be read directly by programs compiled with the -\fBwfdb\fR(3) library), or to convert files in MIT format into AHA DB -tape distribution format (conversion to AHA DB CD-ROM/floppy disk -distribution format is not supported). All of these programs -print a brief usage summary if invoked with no command-line arguments, -or with a \fB-h\fR option. +.PP +The AHA Database for Evaluation of Ventricular Arrhythmia Detectors (AHA DB) +has been distributed since 1983 by ECRI (http://www.ecri.org), in +at least three formats: +.TP +\fBsingle-file (.ecg) format\fR +Developed by ECRI for distributions of the AHA DB on DVDs (ca. 2008); this +format can be read by \fBahaecg2mit\fR. +.TP +\fBcompressed (.cmp and .ano) format\fR +Previously developed by ECRI for distributions of the AHA DB on floppy +disks (ca. 1990) and CDs (ca. 1995); this format can be read by \fBahaconvert\fR +(using \fBa2m\fR and \fBad2m\fR). +.TP +\fBtape format\fR +Originally specified by the creators of the AHA DB at the Biomedical +Computing Laboratory (BCL) at Washington University in St. Louis. +This format was also used for tape distributions of the MIT-BIH +Arrhythmia Database from 1980-1989; it can be read by \fBa2m\fR and +\fBad2m\fR, and written by \fBm2a\fR and \fBmd2a\fR. + +.PP +The AHA DB consists of a \fBdevelopment\fR set of 80 records (which +were created by the BCL between 1976 and 1983 and have been +distributed by ECRI since then) and a \fBtest\fR set of 75 records +(also created by the BCL between 1976 and 1983, but not distributed +until about 20 years later). Each record contains two simultaneous +ECG signals that have been digitized for three hours continuously, and +beat annotations for the final 30 minutes of the signals in each +record. The records have been distributed in two versions: a \fBlong +version\fR (records named n0nn and n1nn) containing the full three +hours of signals, and a \fBshort version\fR (records named n2nn and +n3nn) containing only the final 35 minutes of signals (including all +of the annotated beats). + +.PP +ECRI currently supplies the AHA DB only on DVDs, so the tape and +compressed formats are primarily of historical interest. The programs +described below convert these formats into WFDB (also known as +PhysioBank or MIT) format. Long version input files can be converted +in their entirety, or these programs can create short version records +from either long or short version inputs. The last two programs below +convert WFDB records to AHA tape format (conversion to AHA DB DVD and +CD/floppy disk distribution formats is not supported). All of these +programs print a brief usage summary if invoked with no command-line +arguments, or with a \fB-h\fR option. + +.PP +Note that records in WFDB format can be excerpted and reformatted in +more generally useful ways using \fBsnip\fR(1) or \fBxform\fR(1). + +.SH DVD FORMAT +.SS ahaecg2mit +.PP +Use \fBahaecg2mit\fR to convert .ecg files from the AHA DB DVD into +WFDB-compatible records. One or more input filenames may be supplied as +command-line arguments; each specified input file is converted into +a WFDB record, including a .hea (header) file, a .dat (signal) file, +and a .atr (reference annotation) file. If the first command-line +argument is \fB-s\fR, then \fBahaecg2mit\fR produces short-form records +with the correct (n2nn or n3nn) record names. + +If the .ecg files are not in the current directory, give their +full pathnames. The output files are always written to the current +directory, so be sure that the current directory is writeable (it +should not be the DVD) and that has sufficient free space (roughly +8 Mb per long version record, or 1.6 MB per short version record). + +If the DVD is accessible as \fB/media/dvd/\fR, the command +.br + \fBahaecg2mit -s /media/dvd/*.ecg\fR +.br +makes a complete set of short-version records in the current directory. +(Omit the \fB-s\fR to make a set of long-version records instead.) +Under Windows, within a Cygwin window, the DVD is accessible as +\fB/cygdrive/d/\fR (or \fB/cygdrive/e/\fR, etc., depending on the +drive letter that Windows has assigned), so the same task can be done +under Windows by +.br + \fBahaecg2mit -s /cygdrive/d/*.ecg\fR + +.SH OLDER FORMATS + +.SS ahaconvert +.PP +Use \fBahaconvert\fR to convert one or more records from an AHA DB CD-ROM +into WFDB format. Run \fBahaconvert\fR without any command-line arguments +for instructions, or see the examples below. Note: \fBahaconvert\fR is +a shell script; to use it successfully, you will need to have a shell +(standard with all versions of Unix, and included in the free Cygwin package +for MS-Windows) as well as \fBad2m\fR and \fBa2m\fR, which perform the +actual work of the conversion. + .SS a2m .PP -Use \fBa2m\fR to convert AHA-format annotation files into MIT format. Options -for \fBa2m\fR include: +Use \fBa2m\fR to convert AHA-format annotation files from tapes, floppy disks, +or CDs into WFDB format. Options for \fBa2m\fR include: .TP \fB-s\fR \fItime\fR Shift annotations forward by the specified \fItime\fR (default: no shift for @@ -41,11 +137,10 @@ contain annotation times in milliseconds, which are converted to sampling intervals based on an assumed sampling frequency of 250 Hz. Default: type 3 is assumed if \fIahafile\fR ends with \fB.ANO\fR or \fB.ano\fR; type -0 is assumed otherwise. -.SS ad2m +0 is assumed otherwise..SS ad2m .PP -Use \fBad2m\fR to convert AHA-format signal files into MIT format. Options -for \fBad2m\fR include: +Use \fBad2m\fR to convert AHA-format signal files from tapes, floppy disks, +or CDs into WFDB format. Options for \fBad2m\fR include: .TP \fB-c\fR Convert an AHA DB compressed (\fB.cmp\fR) floppy disk file (this is @@ -63,56 +158,51 @@ \fIrecord\fR is of the form \fIn\fR2\fInn\fR or \fIn\fR3\fInn\fR, 3 hours if \fIrecord\fR is of the form \fIn\fR0\fInn\fR or \fIn\fR1\fInn\fR, or the end of the input file, whichever comes first). -.SS ahaconvert -.PP -Use \fBahaconvert\fR to convert one or more records from an AHA DB CD-ROM -into MIT format. Run \fBahaconvert\fR without any command-line arguments -for instructions, or see the examples below. Note: \fBahaconvert\fR is -a shell script; to use it successfully, you will need to have a shell -(standard with all versions of Unix, and included in the free Cygwin package -for MS-Windows) as well as \fBad2m\fR and \fBa2m\fR, which perform the -actual work of the conversion. + .SS m2a .PP -Use \fBm2a\fR to convert MIT-format annotation files into AHA tape format. +Use \fBm2a\fR to convert WFDB-format annotation files into AHA tape format. Options for \fBm2a\fR include: .TP \fB-s\fR \fItime\fR Shift annotation times backward by the specified \fItime\fR, and convert them from sample intervals to milliseconds. + .SS md2a .PP -Use \fBmd2a\fR to convert MIT-format signal files into AHA tape format. +Use \fBmd2a\fR to convert WFDB-format signal files into AHA tape format. Options for \fBmd2a\fR include: .TP \fB-n\fR \fInew-record\fR Create a new header file for the AHA-format output signal file, so that it may be read as record \fInew-record\fR. -.PP -MIT-format files can be excerpted and reformatted in more generally useful ways -using \fBsnip\fR(1) or \fBxform\fR(1). + .SH ENVIRONMENT .PP It may be necessary to set and export the shell variable \fBWFDB\fR (see \fBsetwfdb\fR(1)). + .SH EXAMPLES -.SS "AHA Database CD-ROM" -AHA DB CD-ROMs contain two verisons of each record: a 35-minute "short-format" -version, and a 3-hour "long-format" version. In most cases, you will want to -convert only one version of each record. To convert the short-format records -only, if the contents of the CD-ROM are available at \fB/mnt/cdrom\fR, type: +.SS "AHA Database DVD" +See \fBahaecg2mit\fR above. + +.SS "AHA Database CD" +AHA DB CDs contain both long and short versions of each record. In +most cases, you will want to convert only one version of each record. +To convert the short-version records only, if the contents of the +CD-ROM are available at \fB/mnt/cdrom\fR, type: .br \fBahaconvert /mnt/cdrom/?[23]??.cmp\fR .br -(The pattern '\fB?[23]??\fR' matches the record names of the short-format +(The pattern '\fB?[23]??\fR' matches the record names of the short-version records.) .PP -To convert the long-format records only, type: +To convert the long-version records only, type: .br \fBahaconvert /mnt/cdrom/?[01]??.cmp\fR .SS "AHA DB floppy disk" -To make a version of AHA DB record 1201 in MIT format, given the distribution +To make a version of AHA DB record 1201 in WFDB format, given the distribution floppy disk, copy the files \fB1201.ano\fR and \fB1201.cmp\fR to the current directory, then type: .br @@ -128,9 +218,10 @@ redundant unless you have renamed the input files, since \fBad2m\fR and \fBa2m\fR recognize the record name and file types from the suffixes otherwise.) -.SS "AHA DB short format tape" + +.SS "AHA DB short version tape" .PP -To obtain the same files given a `short format' 9-track distribution tape, +To obtain the same files given a `short version' 9-track distribution tape, copy the second and third files from the tape into files \fB1201.tap\fR and \fB1201.ann\fR in the current directory, then type: .br @@ -146,10 +237,11 @@ WFDB Software Package) to verify the record name. Distribution tapes that contain more than one record contain additional sets of four files, always in the same order within each set. -.SS "AHA DB long format tape" + +.SS "AHA DB long version tape" .PP -To make a version of the three-hour AHA DB record 1001 in MIT format, -given the `long format' distribution tape, copy the second and third files +To make a version of the three-hour AHA DB record 1001 in WFDB format, +given the `long version' distribution tape, copy the second and third files from the tape into files \fB1001.tap\fR and \fB1001.ann\fR in the current directory, then type: .br @@ -159,9 +251,10 @@ .br The \fB-t 3:0:0\fR option is necessary to prevent \fBad2m\fR from truncating the signal file after the first 35 minutes. -.SS "Converting AHA DB long format to short format" + +.SS "Converting AHA DB long version tapes to short version records" .PP -To make a version of AHA DB record 1201 in MIT format, given a `long format' +To make a version of AHA DB record 1201 in WFDB format, given a `long version' 9-track distribution tape containing the corresponding three-hour record 1001, copy the second and third files from the tape into files \fB1001.tap\fR and \fB1001.ann\fR in the current directory, then type: @@ -171,19 +264,20 @@ \fBa2m -i 1001.ann -r 1201 -a atr -t 1\fR .br In this case, the \fB-f\fR option instructs \fBad2m\fR to skip the first -two hours and 25 minutes of the `long-format' AHA signal file, and to reformat -the remainder (equivalent to the 35-minute `short-format' record). The +two hours and 25 minutes of the `long-version' AHA signal file, and to reformat +the remainder (equivalent to the 35-minute `short-version' record). The \fB-t 1\fR option is used with \fBa2m\fR even though its input file comes from -a `long-format' tape, because the annotation times must be shifted only by -the amount necessary for a `short-format' tape in this case. -.SS "Sharing signal files for long format and short format AHA DB records" +a `long-version' tape, because the annotation times must be shifted only by +the amount necessary for a `short-version' tape in this case. + +.SS "Sharing signal files for long version and short version AHA DB records" .PP -To keep both versions (1001 and 1201) on-line, make the `long format' version +To keep both versions (1001 and 1201) on-line, make the long version first (see above), then type: .br \fBa2m -i 1001.ann -r 1201 -a atr -t 1\fR .br -to make a `short format' reference annotation file. Continue (under UNIX) by: +to make a short version reference annotation file. Continue (under UNIX) by: .br \fBcp 1001.hea 1201.hea\fR .br @@ -191,16 +285,18 @@ .br \fBcopy 1001.hea 1201.hea\fR .br -and edit \fB1201.hea\fR, replacing `1001' in the first line (only!) with -`1201', and replacing `212' in the second and third lines by +and edit \fB1201.hea\fR, replacing `1001' in the first line (only!) +with `1201', and replacing `212' in the second and third lines by `212+6525000' (see the description of the `byte offset' field in -\fBheader\fR(5)). Although two header and reference annotation files are -needed, both versions can share the same signal file, allowing a substantial -savings in storage requirements. Note that WFDB application -programs that read the `short format' record 1201 signal file may report -signal checksum errors at the end of the record, unless you also recalculate -the signal checksums (easily done using \fBsnip\fR(1) to copy the record; +\fBheader\fR(5)). Although each version needs its own header and +reference annotation files, the long-version signal file can be shared +with the short version, allowing a substantial savings in storage +requirements. Note that WFDB application programs that read the +`short version' record 1201 signal file may report signal checksum +errors at the end of the record, unless you also recalculate the +signal checksums (easily done using \fBsnip\fR(1) to copy the record; delete the copy once the checksums have been obtained). + .SH AVAILABILITY These programs are provided in the \fBconvert\fR directory of the WFDB Software Package. Run \fBmake\fR in that directory to compile and install them if they @@ -216,6 +312,8 @@ .br http://www.physionet.org/physiotools/wfdb/convert/ahaconvert .br +http://www.physionet.org/physiotools/wfdb/convert/ahaecg2mit.c +.br http://www.physionet.org/physiotools/wfdb/convert/m2a.c .br http://www.physionet.org/physiotools/wfdb/convert/md2a.c diff -Naur --exclude Makefile --exclude info wfdb-10.4.7/doc/wag-src/edf2mit.1 wfdb-10.4.8/doc/wag-src/edf2mit.1 --- wfdb-10.4.7/doc/wag-src/edf2mit.1 2006-08-23 15:26:13.000000000 -0400 +++ wfdb-10.4.8/doc/wag-src/edf2mit.1 2008-07-23 16:01:24.000000000 -0400 @@ -74,6 +74,14 @@ section titled "Multi-Frequency Records" in chapter 5 of the \fIWFDB Programmer's Guide\fR. +.PP +Note that applications built using version 10.4.5 and later versions of the +WFDB library can read EDF files directly, so that the conversion performed +by \fBedf2mit\fR is no longer necessary. The native WFDB files produced by +'edf2mit' can be read more efficiently and with lower latency and memory +requirements than the EDF files; in most cases, however, the difference +will not be noticeable. + .SH ENVIRONMENT .PP It may be necessary to set and export the shell variable \fBWFDB\fR (see @@ -83,7 +91,8 @@ Package. Run \fBmake\fR in that directory to compile and install them if they have not been installed already. .SH SEE ALSO -\fBa2m\fR(1), \fBsnip\fR(1), \fBxform\fR(1), \fBwfdb\fR(3), \fBheader\fR(5) +\fBa2m\fR(1), \fBrdedfann\fR(1), \fBsnip\fR(1), \fBxform\fR(1), \fBwfdb\fR(3), +\fBheader\fR(5) .HP Bob Kemp, Alpo V\[:a]rri, Agostinho C. Rosa, Kim D. Nielsen and John Gade. A simple format for exchange of digitized polygraphic recordings. diff -Naur --exclude Makefile --exclude info wfdb-10.4.7/doc/wag-src/Makefile.tpl wfdb-10.4.8/doc/wag-src/Makefile.tpl --- wfdb-10.4.7/doc/wag-src/Makefile.tpl 2008-02-19 09:47:27.000000000 -0500 +++ wfdb-10.4.8/doc/wag-src/Makefile.tpl 2008-07-23 12:33:52.000000000 -0400 @@ -1,5 +1,5 @@ # file: Makefile.tpl G. Moody 24 May 2000 -# Last revised: 19 February 2008 +# Last revised: 23 July 2008 # Change the settings below as appropriate for your setup. # D2PARGS is a list of options for dvips. Uncomment one of these to set the @@ -98,8 +98,9 @@ $(MAKE) MANDIR=/tmp/wfdb/$(MANDIR) install uninstall: - ../../uninstall.sh $(MAN1) *.1 ad2m.1 ann2rr.1 m2a.1 md2a.1 hrlomb.1 \ - hrmem.1 hrplot.1 plot3d.1 cshsetwfdb.1 rr2ann.1 + ../../uninstall.sh $(MAN1) *.1 ad2m.1 ahaconvert.1 ahaecg2mit.1 \ + ann2rr.1 m2a.1 md2a.1 hrlomb.1 hrmem.1 hrplot.1 plot3d.1 cshsetwfdb.1 \ + rr2ann.1 ../../uninstall.sh $(MAN3) *.3 ../../uninstall.sh $(MAN5) *.5 ../../uninstall.sh $(MAN7) *.7 @@ -144,6 +145,7 @@ ./maninst.sh $(MAN1) $(MAN3) $(MAN5) $(MAN7) "$(SETPERMISSIONS)" cd $(MAN1); $(LN) a2m.1 ad2m.1 cd $(MAN1); $(LN) a2m.1 ahaconvert.1 + cd $(MAN1); $(LN) a2m.1 ahaecg2mit.1 cd $(MAN1); $(LN) a2m.1 m2a.1 cd $(MAN1); $(LN) a2m.1 md2a.1 cd $(MAN1); $(LN) ann2rr.1 rr2ann.1 diff -Naur --exclude Makefile --exclude info wfdb-10.4.7/MANIFEST wfdb-10.4.8/MANIFEST --- wfdb-10.4.7/MANIFEST 2008-04-09 18:18:37.000000000 -0400 +++ wfdb-10.4.8/MANIFEST 2008-07-23 16:19:04.000000000 -0400 @@ -151,6 +151,7 @@ convert/a2m.c convert/ad2m.c convert/ahaconvert +convert/ahaecg2mit.c convert/edf2mit.c convert/m2a.c convert/Makefile diff -Naur --exclude Makefile --exclude info wfdb-10.4.7/NEWS wfdb-10.4.8/NEWS --- wfdb-10.4.7/NEWS 2008-07-14 11:59:07.000000000 -0400 +++ wfdb-10.4.8/NEWS 2008-07-23 16:12:46.000000000 -0400 @@ -1,3 +1,13 @@ +10.4.8: + New application convert/ahaecg2mit.c converts files from the AHA DB + DVD into WFDB records. (ECRI, distributors of the AHA DB, recently + began shipping it on DVDs in a format incompatible with its previous + formats.) + + Applications wrsamp and xform use rand() and srand() rather than the + POSIX rand48() and srand48() to generate dither (the POSIX functions + are not universally available). + 10.4.7: Yinqi Zhang reported and contributed a fix for a memory leak in make_vsd() (an internal WFDB library function defined in signal.c). diff -Naur --exclude Makefile --exclude info wfdb-10.4.7/wfdb.spec wfdb-10.4.8/wfdb.spec --- wfdb-10.4.7/wfdb.spec 2008-04-09 18:36:33.000000000 -0400 +++ wfdb-10.4.8/wfdb.spec 2008-07-31 14:19:13.000000000 -0400 @@ -129,6 +129,7 @@ %{_bindir}/a2m %{_bindir}/ad2m %{_bindir}/ahaconvert +%{_bindir}/ahaecg2mit %{_bindir}/ann2rr %{_bindir}/bxb %{_bindir}/calsig