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

setgvmode

 
void setgvmode(int *mode)

This function sets the mode used by getvec when reading a multi-frequency record (see section 5.4 Multi-Frequency Records). If mode is WFDB_LOWRES, getvec decimates any signals sampled at multiples of the frame rate, so that one sample is returned per signal per frame (i.e., the oversampled signals are resampled by simple averaging of the samples for each signal within each frame). If mode is WFDB_HIGHRES, each sample of any oversampled signal is returned by successive invocations of getvec, and each sample of any signal sampled at a lower frequency is returned by two or more successive invocations of getvec (i.e., the less frequently sampled signals are resampled using zero-order interpolation). getvec operates in WFDB_LOWRES mode by default. WFDB_LOWRES and WFDB_HIGHRES are defined in `<wfdb/wfdb.h>'.

In WFDB library version 9.6 and later versions, setgvmode also affects how annotations are read and written. If setgvmode(WFDB_HIGHRES) is invoked before using annopen, wfdbinit, getvec, sampfreq, strtim, or timstr, then all WFDB_Time data (including the time attributes of annotations read by getann or written by putann) visible to the application are in units of the high-resolution sampling intervals. (Otherwise, WFDB_Time data are in units of frame intervals.)



George B. Moody (george@mit.edu)