The issue that Benoit reports is that h(t) is corrupted 4 seconds before the bit 0 of the state vector goes down 12:54:18 UTC, h(t) is already bad at 12:54:14 UTC. The reason is that h(t) is not a time domain code, but a frequency domain one done in blocks of 8 seconds. If any data input data in that 8 seconds is not good, then all 8 seconds of h(t) are corrupted. So h(t) is not only bad after the unlock, but also before the unlock, because it doesn't know about the unlock. There are two solutions:
- Use better information in Hrec_hoft for knowing when an unlock happens. Hrec can't use the state vector as that is computed further down the DAQ chain. So probably additional checks would need to be implemented into Hrec.
- Acknowledge that Hrec can be corrupted in the last 8 seconds before an unlock, and remove the last 8 seconds instead of 5 seconds before an unlock using a CAT1 flag that is accessible to online pipelines (such as MBTA).