Displaying report 1-1 of 1.
Reports until 14:20, Sunday 24 April 2016
H1 INJ (INJ)
christopher.biwer@LIGO.ORG - posted 14:20, Sunday 24 April 2016 - last comment - 10:11, Tuesday 26 April 2016(26754)
checks on guardian hardware injection node logging and plus some more development
I did a set of tests with the guardian node. The codebase is in a state that should be ready for Jamie and I to set it up tomorrow on the guardian script machine. Going forward things to do are:
 * Update docstrings
 * Install glue, gracedb, and grid credentials on guardian machine
 * Plan out how to run the gracedb process and get robot certificate
 * Do series of injections with guardian node on guardian machine - test full injection pathway, test killing active injection, test reloading schedule, test multiple injections in a row, etc.

Below I outline the tests I did.

How to do command line tests with guardian daemon

Can now do the following tests on the command line at a LHO workstation:
 * To test reading schedule and finding the next injection: guardian INJ WAIT_FOR_NEXT_INJECT
 * To test gracedb event creation: guardian INJ CREATE_GRACEDB_EVENT
 * To test awg and inject a signal from schedule into the detector: guardian INJ CREATE_AWG_STREAM INJECT_CBC_ACTIVE
 * To test schedule validation script: PYTHONPATH=/opt/rtcds/userapps/release/cal/common/guardian:${PYTHONPATH}; python guardian_inj_schedule_validation.py --ifo H1 --schedule /opt/rtcds/userapps/release/cal/common/guardian/schedule/schedule_1148558052.txt --min-cadence 300

NOTE: You will need glue and gracedb python packages to run some of these tests, and these packages are not system-installed on workstations in the control room. And for gracedb upload testing you need the grid credential tools which are not on LHO workstations. And for gracedb upload test you need to make sure dev_mode is False.

Test injections

Injections from last night are in aLog 26749.

Today I continued with some more development tests. Injections that are constant amplitude of 1e-26 for 1 second duration into H1:CAL-PINJX_TRANSIENT_EXC; start time of the injections are:
 * 1145554100
 * 1145555100
 * 1145555700
 * 1145560262

(i) Call to awg works and injection goes into INJ-PINJX_TRANSIENT_EXC.

(ii) Injections logged correctly and meta-data is propagating through infrastructure to inform the searches. Can see the hardware injection tests done with the guardian node on the detchar summary pages. The first three not logged with a injection type, eg. BURST, because in initial tests just wanted to correctly use the awg module. Can see thereafter the injections were flagged with a type in ODC and this propagates to the low-latency frames for the online searches and the segment database for the offline searches. Can see attached plots for ODC segments and segment database segments.

(iii) Destroying a node with an open stream that has trasmitted data to the front end does not perform the injection.

(iv) The gracedb upload functions have already been tested. Today I re-checked the functions and here is an example gracedb event that was uploaded T235981. Adding messages to the event log on gracedb was also tested again, notice the "This is a test." message on the T235981 gracedb page.

(v) Schedule validation script updated and tested.

Codebase developments

Some more changes:
 * There is now a dev_mode in the code to run the tests mentioned in the section above. At the moment this does two things (i) ignores to check if the detector is locked, (ii) ignores gracedb for now until we get the robot certificate sorted out, and (ii) waits in the INJECT_CBC_ACTIVE state instead of the AWG_STREAM_OPEN_PREINJECT state because we need to avoid jump transitions for the command line test above.
 * Schedule validation script works again (https://redoubt.ligo-wa.caltech.edu/svn/cds_user_apps/trunk/cal/common/scripts/guardian_inj_schedule_validation.py).

One thing of note is that guardian does not allow subprocesses to be created by states so the subprocess managment that I had written will not work with guardian. So right now once the injection starts the code will wait for the injection to finish, this is just the implementation in the awg package (see awg.ArbitraryStream.close); it can only be killed by stopping the node.
Images attached to this report
Comments related to this report
christopher.biwer@LIGO.ORG - 11:59, Monday 25 April 2016 (26766)INJ
I've also renamed the base module (INJ.py) to something less generic, it is now CAL_PINJX.py.

See: https://redoubt.ligo-wa.caltech.edu/svn/cds_user_apps/trunk/cal/common/guardian/CAL_PINJX.py

So modify the examples in this aLog entry as appropriate, ie. guardian INJ becomes guardian CAL_PINJX.
christopher.biwer@LIGO.ORG - 18:08, Monday 25 April 2016 (26781)INJ
Chris B., Jamie R.

Started up the node with guardctrl start CAL_INJ.

Used guardmedm CAL_INJ to control the guardian node.

Did a variety of tests with the hardware injection guardian node, these all passed:
 * Tested killing injection before injection awg call is active by requesting KILL_INJECT.
 * Tested killing the injection during awg.ArbitraryStream.close call, ie. inject is in active state, by requesting KILL_INJECT.
 * Tested scheduling injections minimum number of seconds apart to make sure guardian picked the correct injection.
 * External alert happened while injection was scheduled, aborted injection successfully from AWG_STREAM_OPEN_PREINJECT to ABORT_INJECT_FOR_EXTTRIG. Commented out this check to continue working.
 * Tested out of order schedule file.
 * Tested FAILURE_READ_WAVEFORM, eg. waveform file does not exist.
 * Tested all injection states (INJECT_CBC_ACTIVE, INJECT_BURST_ACTIVE, INJECT_STOCHASTIC_ACTIVE, INJECT_DETCHAR_ACTIVE).
 * Tested that injection does not go into the detector if we turn off dev_mode so that it checks that detector is locked.
 * Injection start, injection end times, injection outcome values are all being set on MEDM screen.

Made another failure mode. If the call to awg.ArbitraryStream.close is too close in time to the start of the injection, then there is a error. Added FAILURE_DURING_ACTIVE_INJECT. awg returns a generic AwgStreamError so without doing some hacked parsing of the error message, there's not much to differentiate why it failed during the function call.

None of the gracedb functionality was tested during this, since we need to create a robot certificate still.
christopher.biwer@LIGO.ORG - 20:44, Monday 25 April 2016 (26784)INJ
After doing a few more tests, I've started scheduling a long series of injections. The schedule file is here:
https://redoubt.ligo-wa.caltech.edu/svn/cds_user_apps/trunk/cal/common/guardian/schedule/schedule_1148558052.txt
christopher.biwer@LIGO.ORG - 10:11, Tuesday 26 April 2016 (26790)INJ
Injections were still going this morning from last night as expected, every 400 seconds.

Attached is an hour of last nights injections. Also I've attached a zoomed in plot on the fast channel for one injection to check the timing of the start of the injection. Looks good.
Images attached to this comment
Displaying report 1-1 of 1.