gwcelery.tasks.detchar module¶
Flow Chart¶
The flow chart below shows the decision process for the application of DQOK and DQV labels.
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.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:
- 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>]
- (task)gwcelery.tasks.detchar.make_omegascan(ifo, t0, durs)[source]¶
Helper function to create a single omegascan image, with multiple durations.
- Parameters:
- Returns:
bytes of png of the omegascan, or None if no omegascan created.
- Return type:
bytes or None
- gwcelery.tasks.detchar.generate_table(title, high_bit_list, low_bit_list, unknown_bit_list)[source]¶
Make a nice table which shows the status of the bits checked.
- 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:
- Returns:
Tuple mapping iDQ channel to its minimum FAP.
- Return type:
Example
>>> check_idq(cache, 'H1:IDQ-FAP_OVL_100_1000', 1216496260, 1216496262) ('H1:IDQ-FAP_OVL_100_1000', 0.003)
- 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
.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, ligo_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.
- Parameters:
- Returns:
event – Details of the event, reflecting any labels that were added.
- Return type: