LAL  7.5.0.1-8083555
ComputeDataQualityVector.h File Reference

Prototypes

int XLALComputeDQ (REAL4 *sv_data, int r_sv, REAL4 *lax_data, REAL4 *lay_data, int r_light, COMPLEX16 *gamma_data, int r_gamma, int t_bad_left, int t_bad_right, int wings, int missing, int *dq_data, int n_dq)
 Compute the Data Quality Vector as defined in https://www.lsc-group.phys.uwm.edu/daswg/wiki/S6OnlineGroup/CalibratedData. More...
 

Go to the source code of this file.

Function Documentation

◆ XLALComputeDQ()

int XLALComputeDQ ( REAL4 sv_data,
int  r_sv,
REAL4 lax_data,
REAL4 lay_data,
int  r_light,
COMPLEX16 gamma_data,
int  r_gamma,
int  t_bad_left,
int  t_bad_right,
int  wings,
int  missing,
int *  dq_data,
int  n_dq 
)

Compute the Data Quality Vector as defined in https://www.lsc-group.phys.uwm.edu/daswg/wiki/S6OnlineGroup/CalibratedData.

Copied for reference:

State vector channel: IFO:DMT-STATE_VECTOR

The data type is float(!) so they have to be first converted to int. Then, bits 0-4 define the states. Bits 5-15 are always set to 1, such that the word 0xffff means science mode:

bit0=SCI (operator set to go to science mode) bit1=CON conlog unsets this bit is non-harmless epics changes bit2=UP (set by locking scripts) bit3=!INJ Injections unset this bit bit4=EXC Unauthorized excitations cause this bit to be unset

Channel Name: IFO:DMT-DATA_QUALITY_VECTOR where IFO is one of (H1, H2, L1) Sample Rate: 1 Hz, for any state to be true, it must be true every sample of h(t) within the second Type: INT4

The quality channel will use the following bitmask definition

SCIENCE 1 // SV_SCIENCE & LIGHT INJECTION 2 // Injection: same as statevector UP 4 // SV_UP & LIGHT CALIBRATED 8 // SV_UP & LIGHT & (not TRANSIENT) BADGAMMA 16 // Calibration is bad (outside 0.8 < gamma < 1.2) LIGHT 32 // Light in the arms ok MISSING 64 // Indication that data was dropped in DMT

All the arrays must have been previously allocated. r_x is the number of x_value(s) that are in a single DQ sample (= x.length/n_dq). So it is the "rate" of x with respect to DQ samples.

Other special meanings: t_bad_left: time (in s) of the last NOT-UP event in the Data Quality t_bad_right: time (in s) of the next NOT-UP event in the Data Quality wings: duration (in s) of the wings used for calibration

If t_bad_left < wings then it doesn't matter how much less it is. Same thing for t_bad_right > wings.

Definition at line 71 of file ComputeDataQualityVector.c.