Skip to content
Snippets Groups Projects
Commit 6deeb04e authored by Jameson Rollins's avatar Jameson Rollins
Browse files

Merge branch 'bs_stage_2_tag' into 'master'

Tag locklosses that occur while SEI_BS is transitioning

Closes #149

See merge request !92
parents cb9680da 376ec745
No related branches found
No related tags found
No related merge requests found
......@@ -66,6 +66,7 @@ TAG_COLORS = {
'WINDY': ('springgreen', 'mediumblue'),
'SEISMIC': ('orange', 'black'),
'ADS_EXCURSION': ('mediumvioletred', 'plum'),
'SEI_BS_TRANS': ('sienna', 'orange'),
}
##################################################
......
......@@ -61,6 +61,9 @@ register_plugin(check_wind)
from .ads_excursion import check_ads
register_plugin(check_ads)
from .sei_bs_trans import check_sei_bs
register_plugin(check_sei_bs)
# add last since this needs to wait for additional data
from .seismic import check_seismic
register_plugin(check_seismic)
import logging
from gwpy.segments import Segment
from .. import config
from .. import data
WINDOW = [-3, 0]
CHANNEL = ['{}:GRD-SEI_BS_STATE_N'.format(config.IFO)]
##############################################
def check_sei_bs(event):
"""Checks if SEI_BS Guardian node is in transition state during lockloss and
creates a tag."""
if config.IFO == 'L1':
logging.info("followup is not configured or not applicable to LLO.")
return
mod_window = [WINDOW[0], WINDOW[1]]
segment = Segment(mod_window).shift(int(event.gps))
stage_2_channel = data.fetch(CHANNEL, segment)[0]
if any(stage_2_channel.data == -19):
event.add_tag('SEI_BS_TRANS')
else:
logging.info('SEI BS was not transitioning during lockloss')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment