gwcelery.tasks.detchar module¶
Data quality and detector characterization tasks.
These tasks are mostly focused on checking interferometer state vectors. By design, the [LIGO] and [Virgo] state vectors share the same definitions for the first 8 fields.
LIGO also has a [DMT] DQ vector that provides some additional instrumental checks.
References
-
gwcelery.tasks.detchar.
dmt_dq_vector_bits
¶ DMT DQ vector bits (LIGO only).
-
gwcelery.tasks.detchar.
state_vector_bits
¶ State vector bitfield definitions for LIGO and Virgo.
-
gwcelery.tasks.detchar.
no_dq_veto_pycbc_bits
¶ No DQ veto stream bitfield definitions for Virgo. NOTE: Since the results for these bits will be NOT()ed, the bit definitions are the NO_* versions of what the bit * actually is. This is an inelegant but the simplest solution since the logic used in these channels are opposite to those in all the other checked channels.
-
gwcelery.tasks.detchar.
create_cache
(ifo, start, end)[source]¶ Find .gwf files and create cache. Will first look in the llhoft, and if the frames have expired from llhoft, will call gwdatafind.
- Parameters
ifo (str) – Interferometer name (e.g.
H1
).end (start,) – GPS start and end times desired.
- Returns
- Return type
glue.lal.Cache
Example
>>> create_cache('H1', 1198800018, 1198800618) [<glue.lal.CacheEntry at 0x7fbae6b71278>, <glue.lal.CacheEntry at 0x7fbae6ae5b38>, <glue.lal.CacheEntry at 0x7fbae6ae5c50>, ... <glue.lal.CacheEntry at 0x7fbae6b15080>, <glue.lal.CacheEntry at 0x7fbae6b15828>]
-
gwcelery.tasks.detchar.
dqr_json
(state, summary)[source]¶ Generate DQR-compatible json-ready dictionary from process results, as described in
data-quality-report.design
.
-
gwcelery.tasks.detchar.
check_idq
(cache, channel, start, end)[source]¶ Looks for iDQ frame and reads them.
- Parameters
cache (
glue.lal.Cache
) – Cache from which to check.channel (str) – which idq channel (pglitch)
end (start,) – GPS start and end times desired.
- Returns
Tuple mapping iDQ channel to its maximum P(glitch).
- Return type
Example
>>> check_idq(cache, 'H1:IDQ-PGLITCH-OVL-100-1000', 1216496260, 1216496262) ('H1:IDQ-PGLITCH-OVL-100-1000', 0.87)
-
gwcelery.tasks.detchar.
check_vector
(cache, channel, start, end, bits, logic_type='all')[source]¶ Check timeseries of decimals against a bitmask. This is inclusive of the start time and exclusive of the end time, i.e. [start, …, end).
- Parameters
cache (
glue.lal.Cache
) – Cache from which to check.channel (str) – Channel to look at, e.g.
H1:DMT-DQ_VECTOR
.end (start,) – GPS start and end times desired.
bits (
gwpy.TimeSeries.Bits
) – Definitions of the bits in the channel.logic_type (str, optional) – Type of logic to apply for vetoing. If
all
, then all samples in the window must pass the bitmask. Ifany
, then one or more samples in the window must pass.
- Returns
Maps each bit in channel to its state.
- Return type
Example
>>> check_vector(cache, 'H1:GDS-CALIB_STATE_VECTOR', 1216496260, 1216496262, state_vector_bits) {'H1:HOFT_OK': True, 'H1:OBSERVATION_INTENT': True, 'H1:NO_STOCH_HW_INJ': True, 'H1:NO_CBC_HW_INJ': True, 'H1:NO_BURST_HW_INJ': True, 'H1:NO_DETCHAR_HW_INJ': True}
-
(task)
gwcelery.tasks.detchar.
check_vectors
(event, graceid, start, end)[source]¶ Perform data quality checks for an event and labels/logs results to GraceDb.
Depending on the pipeline, a certain amount of time (specified in
check_vector_prepost
) is appended to either side of the superevent start and end time. This is to catch DQ issues slightly before and after the event, such as that appearing in L1 just before GW170817.A cache is then created for H1, L1, and V1, regardless of the detectors involved in the event. Then, the bits and channels specified in the configuration file (
llhoft_channels
) are checked. If an injection is found in the active detectors, ‘INJ’ is labeled to GraceDb. If an injection is found in any detector, a message with the injection found is logged to GraceDb. If no injections are found across all detectors, this is logged to GraceDb.A similar task is performed for the DQ states described in the DMT-DQ_VECTOR, LIGO GDS-CALIB_STATE_VECTOR, and Virgo DQ_ANALYSIS_STATE_VECTOR. If no DQ issues are found in active detectors, ‘DQOK’ is labeled to GraceDb. Otherwise, ‘DQV’ is labeled. In all cases, the DQ states of all the state vectors checked are logged to GraceDb.
This skips MDC events.