Summary Page Trigger States
Goal
By incorporating states into the 40m summary pages, we can exclude periods of time where certain channels output irrelevant data or restrict data visualization to periods only when the interferometer is locked. For example, we can set the MC2 Trans QPD (top right) plot on the IOO tab to only show data for times when C1:IOO-MC_TRANS_SUM is greater than 1e4. Throughout this wiki post, I will attempt to enumerate my trials of incorporating states into the summary pages.
Duncan's Instructions
As promised, you can define a state with a 'channel = value' condition as follows:
[state-GRD-ISC_LOCK-OK] key = GRD-ISC_LOCK name = Locked (GRD) definition = %(ifo)s:GRD-ISC_LOCK_OK = 1
This will return active segments whenever the L1:GRD-ISC_LOCK_OK channel has a value of 1 (note a single equals sign, not two together). Equally applicable are the operators in the dict defined here: https://github.com/gwpy/gwsumm/blob/master/gwsumm/state/core.py#L38
First Attempts
Following Duncan's instructions, I appended the following bit of code to the bottom of /home/eve.chase/summary/config/c1eve.ini:
[state-MC_LOCK] key = MC_LOCK name = Locked (MC) definition = C1:IOO-MC_TRANS_SUM >= 1e4
I then run the code from the directory /home/eve.chase/public_html/summary using the following command:
gw_summary day 20150630 --ifo c1 --config-file ~/summary/config/defaults.ini --config-file ~/summary/config/c1eve.ini
This runs, but I see no changes to the summary pages. By looking at the H1 summary pages, as an example, I added a "states" line to the header for the Eve tab:
[tab-Eve] name = Eve layout = 2 states = MC_LOCK
Which results in the error:
ValueError: No SummaryState registered with name 'MC_LOCK'
Again, following the example of H1 summary pages, I added the following line to defaults.ini:
[states] MC_LOCK = C1:IOO-MC_TRANS_SUM >= 1e4
This results in a very long and messy error message, similar to those that we often see for the actual summary pages. I added in an All state to see if this fixes the problem.
Here are the changes to c1eve.ini:
states = All, MC_LOCK
Here is the addition to defaults.ini:
[state-all] name = All description = All times
This works!
Summary of Changes
Header of c1eve.ini:
[tab-Eve] name = Eve layout = 2 states = All, MC_LOCK
Bottom of c1eve.ini:
[state-MC_LOCK] key = MC_LOCK name = Locked (MC) definition = C1:IOO-MC_TRANS_SUM >= 1e4
Additions to defaults.ini (I put this between the calendar and general sections):
[states] MC_LOCK = C1:IOO-MC_TRANS_SUM >= 1e4 [state-all] name = All description = All times
To require a plot to show all data for all states, add "1-all-states = True"
