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

1.4 The Database Path and Other Environment Variables

WFDB applications make use of several environment variables, which are named WFDB, WFDBCAL, WFDBGVMODE, and WFDBANNSORT. If these variables have not been otherwise defined by the user, their values are those given by DEFWFDB, DEFWFDBCAL, DEFWFDBGVMODE, and DEFWFDBANNSORT (defined in ‘wfdblib.h’ at the time the WFDB library was compiled). Unless you have a non-standard setup, you may not need to set these variables, but it will be helpful to read this section to understand how they influence the behavior of WFDB applications.

When WFDB applications read database files, they must be able to find them in various locations that may vary from system to system. The WFDB library refers to a character string that consists of an ordered list of locations to be searched for input files. This string is called the database path, or the WFDB path.

On most systems, the environment variable WFDB, if set, specifies the value of the WFDB path, and overrides the default value. If you need to use a non-default WFDB path, you must set the WFDB environment variable appropriately before running any WFDB applications, so that the WFDB path can be examined by the running program. The WFDB software package includes easily customizable shell scripts (batch files) that illustrate how to do this for popular shells and command interpreters; see setwfdb(1), in the WFDB Applications Guide. (Under classic Mac OS, for which the concept of environment variables is foreign, the WFDB path may be set only by using DEFWFDB.) For further information, see section More About the WFDB Path.

The shell scripts that set WFDB also set the WFDBCAL environment variable, which is important if you make use of records that contain signals other than ECGs. WFDBCAL names a calibration file located in one of the directories named by WFDB. (The symbol DEFWFDBCAL is usually defined in ‘wfdblib.h’ to specify the name of a default calibration file, to be used by the WFDB library if WFDBCAL has not been set.) Each signal type may be represented by an entry in the calibration file. Entries specify the characteristics of any calibration pulses that may be present, and customary scales for plotting the signals.

The other environment variables are less frequently used than WFDB and WFDBCAL, and in most cases, the compiled-in defaults will be appropriate (see section Annotation Order, and see section Multi-Frequency Records, for details).

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

PhysioNet (wfdb@physionet.org)