The next four functions convert between analog-to-digital converter
(ADC) units and physical units, using as a conversion factor the gain
for the specified input signal. The first two (aduphys
and
physadu
) are general-purpose functions that convert absolute
levels (i.e., they account for non-zero baseline
values); the
last two (adumuv
and muvadu
) are for use with
millivolt-dimensioned signals only, and convert potential differences
(i.e., adumuv(s, 0)
= muvadu(s, 0)
= 0 for all
s, irrespective of the baseline
values specified in the
header file). Normally, these functions should be invoked after
isigopen
or dbinit
, either of which will determine the
gain from the `header' file. If this is not done, or if the
`header' file indicates that the gain is uncalibrated, or if the
specified input signal is not currently open, a gain of DEFGAIN
(defined in `<ecg/db.h>') ADC units per millivolt, and a baseline
of zero, are assumed. If the physical units
(see section Signal Information Structures)
are not millivolts, adumuv
and muvadu
convert to and from
thousandths of the defined physical units. Note that adumuv
and
muvadu
deal exclusively with integers, but aduphys
returns
and physadu
accepts double-precision floating point physical
values.
double aduphys(DB_Signal s, DB_Sample a)
Return:
This function converts the sample value a from ADC units to
physical units, based on the gain
and baseline
for input
signal s. (aduphys
was first introduced in DB library
version 6.0.)
DB_Sample physadu(DB_Signal s, double v)
Return:
This function converts the value v from physical units to ADC
units, based on the gain
and baseline
for input signal
s. (physadu
was first introduced in DB library version
6.0.)
int adumuv(DB_Signal s, DB_Sample a)
Return:
This function converts the potential difference a from ADC units to
microvolts, based on the gain
for input signal s.
DB_Sample muvadu(DB_Signal s, int v)
Return:
This function converts the potential difference v from microvolts
to ADC units, based on the gain
for input signal s.
Go to the first, previous, next, last section, table of contents.