|Next: COHERENCE(1) Up: WFDB Applications Guide Previous: BXB(1)||On This Page|
calsig (formerly known as calibrate) rewrites the header file for a WFDB record, setting the gain and baseline fields based on measurements it makes, and setting the units fields based on input from the user or from a calibration file. Normally, calsig is used by specifying a time interval for the measurements; best results will be achieved if the specified interval is restricted to one or more square-wave calibration pulses in each signal to be calibrated, although sine-wave pulses may be usable if the sampling frequency and/or ADC resolution is high enough.
The program constructs a smoothed amplitude histogram for each signal and identifies its two principal modes. Initially, each bin of the histogram counts the number of samples in the analysis interval for which the amplitude has a specified value. The histogram is smoothed by applying a low-pass filter that replaces the contents of each bin by a weighted sum of fifteen bins centered on the bin of interest. The two principal modes in the smoothed histogram must be separated by at least one bin with a count that is less than one-eighth the count of the larger mode. If this criterion is not satisfied for a given signal, calsig warns the user and does not adjust the gain or baseline for the affected signal.
If a signal list is specified using the -s option (see below), only the specified signals are calibrated, and the gain, baseline, and units fields for any other signals are left unchanged. Thus, if calibration pulses are not simultaneously available in all signals to be calibrated, calsig may be run repeatedly with different time intervals and signal lists.
It may be necessary to set and export the shell variables WFDB and WFDBCAL (see setwfdb(1) ).
Calibration files must be located in one of the directories named in WFDB, the database path. If the environment variable WFDBCAL is set, it names a calibration file that will be read unless the -c option is used to specify a different calibration file. At most one calibration file is read; if more than one -c option is given, only the last one is effective. If the calibration file does not contain an entry for the type of signal to be calibrated, calsig obtains the information from the user interactively. If the calibration file contains two or more entries for the same signal type, only the first entry is used.
Table of Contents
Up: WFDB Applications Guide
Please e-mail your comments and suggestions to firstname.lastname@example.org, or post them to:PhysioNet
Updated 26 January 2018