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

WFDB 10.4

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

Changes in version 10.4.25 (21 January 2010)

In WFDB library versions 10.4.5 through 10.4.24, strtim("e") did not work properly when the open input record was an EDF file and high resolution input mode had not been selected. This problem has been corrected.

(WFDB library version 10.4.24 was identical to version 10.4.23.)

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

Changes in version 10.4.23 (7 August 2009)

Several changes in ‘lib/signal.c’ eliminate unintended interactions that occurred in previous versions between the input modes that can be selected using setgvmode(). The effects of these interactions were first observed in newly written code; existing WFDB applications were apparently unaffected.

On Cygwin/Windows, the WFDB library is now installed in both ‘/usr/bin’ and ‘/usr/lib’, to simplify building user applications that use the WFDB library and to simplify running compiled WFDB applications outside of the Cygwin environment.

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

Changes in version 10.4.22 (28 July 2009)

When reading multifrequency records in WFDB_LOWRES mode, invalid sample values occurring in signals that need to be decimated were not always handled properly in WFDB library function getvec(), resulting in spurious artifacts during intervals that contained a mixture of valid and invalid samples. This bug has been corrected; thanks to Omar Abdala for a report that brought this problem to light.

A declaration for WFDB library function findsig() has been added to ‘wfdb.h’. Thanks to Thomas Heldt for reporting a warning that resulted from its omission in previous versions.

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

Changes in version 10.4.21 (14 May 2009)

Changes in ‘lib/Makefile.tpl’ were needed in order to pass configuration constants to the functions added to ‘lib/wfdbio.c’ in 10.4.20, but were omitted from that release; they have been included in this version.

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

Changes in version 10.4.20 (4 May 2009)

Several new functions have been added to ‘lib/wfdbio.c’, to make configuration constants accessible at run time; these are needed by the WFDB Toolkit for Matlab.

(WFDB library version 10.4.19 was identical to version 10.4.18.)

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

Changes in version 10.4.18 (15 March 2009)

The WFDB library no longer reports spurious checksum errors when reading EDF files, which don’t have checksums.

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

Changes in version 10.4.17 (5 March 2009)

Internal WFDB library function wfdb_checkname now allows hyphens (-) within record and annotator names.

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

Changes in version 10.4.16 (3 March 2009)

WFDB library function strtim now rounds rather than truncating when the sampling frequency is not an integer.

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

Changes in version 10.4.15 (26 February 2009)

WFDB library function mstimstr now outputs time to the nearest millisecond, rather than truncating its calculation to the next lowest number of milliseconds.

A new WFDB library function, wfdbputprolog, can write a prolog at the beginning of a signal file. WFDB applications ignore embedded prologs.

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

Changes in version 10.4.14 (23 February 2009)

WFDB library function setwfdb() now exports the WFDB library environment variables (WFDB, WFDBCAL, WFDBANNSORT, and WFDBGVMODE) on all modern platforms, so that a process started by a WFDB application inherits the WFDB environment of its parent. (This is not possible on platforms that do not provide a working putenv() function, such as MacOS 9 and earlier, and 16-bit versions of MS-Windows.) Some previous versions also included this capability, but the older implementation caused a memory leak, and it was disabled in version 10.4.6. Thanks to Omar Abdala and Dan Scott for reporting the problem and help in identifying its cause.

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

Changes in version 10.4.13 (16 February 2009)

A new WFDB library function, tnextvec(), finds the next valid sample from a chosen signal, occurring at or after a specified time. This function is particularly useful when reading variable-layout multi-segment records that may have lengthy gaps in signals of interest.

For portability, the WFDB library has always stored parameters such as sampling frequency and gain as strings rather than as floating-point numbers. Although the resultant loss of precision has been almost always negligible, it has been observable in the specific case of converting very large time intervals from sample intervals to seconds, when the sampling frequency in Hz cannot be represented exactly in binary (e.g., if the sampling frequency is once per minute, or 1/60 Hz). This situation cannot be wholly avoided, but it can be minimized. Changes in this release, in setheader() and in functions that record time units in annotation files, increase the precision with which non-integer parameters are recorded, so that loss of precision as a result of converting them to and from strings should almost never be observable.

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

Changes in version 10.4.12 (20 January 2009)

The rule for sorting annotations within a file has been changed to allow a much larger number of simultaneous annotations (i.e., annotations in a given annotation file with identical time fields) than was previously possible. Since version 6.1, the WFDB library sorts simultaneous annotations according to the value of their chan fields, allowing for 256 simultaneous annotations at any given time. Beginning in version 10.4.12, the library sorts simultaneous annotations according to their num fields, then sorts those with identical num fields according to their chan fields, allowing up to 65,536 simultaneous annotations at any given time.

A new WFDB library function, findsig, returns the signal number of the input signal matching its string argument, or -1 if no such input signal exists. If the string argument could be interpreted as an input signal number, it is taken as such; otherwise, the string argument must be an exact match to a signal name (desc field in the siginfo structure).

Previous versions of WFDB library function setifreq entered an infinite loop if invoked (contrary to specifications) before opening an input record. setifreq now detects the error, emits an appropriate warning, and returns.

If a WFDB application that uses WFDB library version 10.4.5 through 10.4.11 attempted to read an annotation file before reading the sampling frequency of the associated record (for example, by invoking isigopen or sampfreq), the annotation times might all appear to be zero. This may occur when reading annotations created using WFDB 10.4.5 or later. The times supplied when creating the file are correctly written but may be incorrectly read in these cases. This problem was corrected in this release; thanks to Thomas Heldt for reporting it and providing a reproducible example of it.

(WFDB library version 10.4.11 was identical to version 10.4.10.)

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

Changes in version 10.4.10 (31 October 2008)

EDF digital maximum and minimum values are now read properly in 64-bit builds; previous versions had a bug in edfparse (an internal WFDB library function defined in ‘lib/signal.c’) that did not appear in 32-bit builds. Thanks to Joe Mietus for reporting the problem.

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

Changes in version 10.4.9 (10 October 2008)

The WFDB library once again correctly interprets a hyphen (-) (used in place of a record name, annotator name, signal file name, or calibration file name) as a reference to the standard input or output, for platforms that support POSIX standard I/O (see section Using Standard I/O for Database Files). This feature was broken in 10.4.5 as a side effect of changes in wfdb_open (an internal WFDB library function defined in ‘lib/wfdbio.c’).

(WFDB library version 10.4.8 was identical to version 10.4.7.)

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

Changes in version 10.4.7 (15 July 2008)

Yinqi Zhang reported and contributed a fix for a memory leak in make_vsd() (an internal WFDB library function defined in ‘signal.c’).

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

Changes in version 10.4.6 (9 April 2008)

The WFDB functions setafreq() and getafreq() (for setting and getting the time resolution of newly-created output annotation files in ticks per second) were new in version 10.4.5, but were undocumented. They are now described in this Guide, and wrappers for these functions are now included in ‘fortran/wfdbf.c’.

An important change in the WFDB library: memory allocation errors are now treated as fatal by default (in previous versions, the functions that encountered them returned error values that permitted the application to handle them). These errors occur when there is insufficient memory available to the WFDB library. To obtain the old behavior, in which the calling function will continue execution if possible after a memory allocation error, invoke wfdbmemerr(0). By default, however, such an error will cause the process to terminate. In either case, the WFDB library emits an appropriate error message to aid in troubleshooting.

New macros for handling dynamically allocated memory are defined in ‘lib/wfdblib.h’ and used throughout the WFDB library, eliminating most known memory leaks. Three known leaks remain (in setecgstr(), setannstr(), and setanndesc()); these are documented and harmless in current applications. Thanks to Yinqi Zhang for reporting a leak in copysi() (an internal WFDB library function defined in ‘signal.c’), which prompted the cleanup.

WFDB functions strecg(), setecgstr(), strann(), setannstr(), and setanndesc() now handle NULL string inputs properly. (Previous versions passed NULL strings to strcmp(), with undesirable results.)

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

Changes in version 10.4.5 (6 February 2008)

Bob Farrell and Tony Ricke chased down and provided fixes for memory leaks in several WFDB library functions, and also provided revisions to permit additional type checking and to avoid type mismatch warnings.

Changes in the build system make it easier to build WFDB using Cygwin gcc (with or without the Cygwin POSIX library).

When creating annotation files, if the input sampling frequency differs from the frame rate of the input record (either because of using WFDB_HIGHRES mode while reading a multifrequency record, or because of having used setifreq() to modify the sampling frequency), a comment is written to the beginning of the annotation file indicating the resolution of the annotation times in ticks per second (thus allowing the application to store its annotations with whatever time resolution is desired). When reading an annotation file, if such a resolution comment is found, getann adjusts the times of annotations to match the currently defined sampling frequency. The resolutions are kept independently for each annotation file, so (for example) bxb can compare two annotation files written with different resolutions.

The ability to set the time resolution of annotation files has required a minor change in the semantics of setifreq(). It is now necessary to invoke setifreq() before creating an annotation file that will have a resolution matching the (modified) input sampling frequency. Since setifreq() must be invoked after opening the input signals, this implies that wfdbinit() cannot be used to open both input signals and output annotation files if setifreq() is to be used; rather, the sequence should be isigopen(), setifreq(), and finally annopen().

If a string that includes a ‘.’ is supplied to a WFDB library function where a record name is expected, the WFDB library assumes that it is the name of a file located in the WFDB path. If the name ends in ‘.hea’, the file is assumed to be a WFDB-format header file, and its record name is assumed to be the first part of the string, exclusive of the ‘.hea'’.

This version also includes support for reading EDF files natively. If a string supplied as a record name contains a ‘.’ but does not end in ‘.hea’, it is assumed to be the record name of an EDF file of the same name.

(WFDB library versions 10.4.3 and 10.4.4 were identical to version 10.4.2.)

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

Changes in version 10.4.2 (4 May 2006)

Mathias Gruber reported a line in wfdbio.c that used void pointer arithmetic (permitted as an extension by gcc but not allowed by ANSI/ISO C or most other C compilers). This operation has been replaced by ANSI/ISO C-conformant code.

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

Changes in version 10.4.1 (6 April 2006)

A bug caused incorrect output from WFDB library function strtim() when called with the argument "i", following use of setifreq() to change the effective sampling frequency, resulting in incorrect output from example 10 in the WFDB Programmer’s Guide. This has now been corrected.

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

Changes in version 10.4.0 (2 March 2006)

Version 10.4.0 and later versions of the WFDB library are intended to be compiled using ANSI/ISO C (and C++) compilers only; previous versions also supported the use of traditional (K&R) C compilers. The most obvious change resulting from this decision is in the use of prototypes in function declarations, an innovation of ANSI C that permits better error-checking by compilers. The ANSI/ISO C standard is now more than 15 years old, and it has been over 10 years since a C compiler that does not support function prototypes was used for development of the WFDB library. Code in ‘wfdbio.c’ that provides limited support for compilers that do not provide an ANSI/ISO C library has been retained for now, and ‘wfdb.h’ still includes a set of K&R C function declarations; both of these features are deprecated, however, and may be removed in future versions of the WFDB library. Users who still need to use a K&R C compiler to compile the library itself may find ’unprotoize’ (included in the GNU gcc distribution) to be helpful.

The mapping of lowest expressible sample values to WFDB_INVALID_SAMPLE performed by getframe() (in ‘lib/signal.c’) did not work properly for signal formats 80 and 160 (in which samples are recorded as unsigned integers); this has now been corrected.

The symbol WFDB_GVPAD is newly defined in ‘<wfdb/wfdb.h>’. It may be added to WFDB_HIGHRES or WFDB_LOWRES and given as input to setgvmode(). The effect of doing so is that missing samples, and samples recognized as invalid, are replaced by getframe(), getvec(), and sample() with the most recently read valid values rather than by the special value WFDB_INVALID_SAMPLE. This behavior allows applications such as digital filters to remain ignorant of missing data without significant performance penalties.

sample() now checks that its signal number input is valid, and returns WFDB_INVALID_SAMPLE if not. In previous versions, sample returned a sample from signal 0 if the requested signal was unavailable.

sample_valid() now returns -1 in the case of a signal that becomes unavailable before the end of the record (previous versions returned 1 in this case).

The FIR filter example (see section Example 7: A General-Purpose FIR Filter) now works properly. The previous version always began processing the input at sample 0, regardless of start time specified in its argument list.

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

PhysioNet (wfdb@physionet.org)