BADVECTORMASKED(3)
NAME
GoodMasked, BadMasked, StatusPair, GoodVectorMasked, BadVec-
torMasked, StatusPairVector
SYNOPSIS
#include <data_qual.h>
/* Single */
int GoodMasked(char *name, char *mask, TIME t);
int BadMasked(char *name, char *mask, TIME t);
Status *StatusPair(char *name, TIME t);
/* Vector */
SDS *GoodVectorMasked(char *name, char *mask, TIME start, TIME stop);
SDS *BadVectorMasked(char *name, char *mask, TIME start, TIME stop);
SDS *StatusPairVector(char *name, TIME start, TIME stop);
DESCRIPTION
binlogs are binary forms of the information in MDI ascii
quality logs. The following functions provide ways to
access the binlog information.
GoodMasked takes as arguments the name of an observable or
data series, a bit mask, and a time.
It returns a 1 if the quality of the data for the given time
can be determined to be good. It returns 0 in other cases,
including error conditions. The quality is considered good
only if all masked bits in the quality are 0 and all masked
bits in quality validity are 1.
The name of the data must be a string such as "fd_V" or
"fd_M_96m_01d" such that
/soidata/info/mdi_log/{lev1|lev1.4|lev1.5}/qual_{name}.fits
is a valid binlog.
If the mask string can be interpreted as an unsigned integer
(e.g. "0x7C) then the unsigned int is used. If not the mask
is interpreted as the name of a mask in the binlog (e.g.
BADMASK) and the unsigned int is taken from the binlog. If
this fails, the default mask of 0xffffffff is used.
The time is a time between the start and stop times of the
binlog, (e.g. sscan_time(1998.01.14_15:00:00_TAI).
BadMasked takes as arguments the name of an observable or
data series, a bit mask, and a time as described above.
It returns a 1 if the quality of the data for the given time
can be determined to be bad. It returns 0 in other cases,
including error conditions. The quality is considered bad
if any masked bit in the quality is 1 and the corresponding
bit in quality validity is 1.
StatusPair takes as arguments the name of an observable or
data series, and a time as described above. If it can find a
binlog entry for that data and time, it returns a pointer to
a malloc'd structure containing the quality and validity
values. Otherwise it returns a NULL pointer.
GoodVectorMasked is similar to GoodMasked except that it
accepts time interval arguments and returns a pointer to a
malloc'd data structure which contains a vector of 1's for
good, 0's otherwise. It returns a NULL pointer on error.
Uses sds_construct. The datatype is SDS_BYTE.
BadVectorMasked is similar to GoodVectorMasked but tests as
in BadMasked.
StatusPairVector is similar to StatusPair except that it
accepts time interval arguments and returns a pointer to a
malloc'd data structure which is a subset of the binlog.
Uses sds_slice. It returns a NULL pointer on error.
EXAMPLES
~CM/src/modules/binlog_test.c
FILES
/soidata/info/mdi_log/{level}/qual*.fits
SEE ALSO
http://soi.Stanford.EDU:80/production/QUALITY/QUALITY.html
binlog_upd(1)
sds_construct(3)
sds_slice(3)
sscan_time(3)
DIAGNOSTICS
Functions which return pointers return NULL on error.
BUGS