Append the snr_series data to the coinc xml files.
This merge includes all the KAGRA changes so must be made after !36 (merged).
This merge implements #25 (closed).
In order to have the snr_series data available at graceDB submission, we must make a copy of the surrounding series and attach it to the postcoh state that we pass down to postcoh_finalsink.py (the final part of the gstreamer pipeline that collates the event data and determines whether or not to upload to graceDB).
Only significant triggers with an appropriately high FAR are uploaded to gracedb, though we want to save all possible detections to our zerolag log file.
In order to do this we keep all postcoh_table python objects in memory until they can be flushed into the zerolag log file at regular intervals.
Now that we are also sending the snr_series down to finalsink, we cannot just append the snr_series data to the postcoh_table python object, as it is a significant memory cost that would have to be kept in memory and is not even needed for the zerolag log file.
In fact it can be deleted as soon as it's associated trigger candidate has failed the submission tests.
For this reason the snr_series' are copied into a seperate python object that is freed as soon as can be.
While designing the snr_series python object, it felt appropriate to refactor the postcoh_table python object and move most of the IFO getter trickery to python, simplifying it greatly.
I've removed a duplicate definition of ifo_map from _postcohtable.c as IFO_MAP already exists in python.
The snr buffers coming out of multiratespiir are first indexed by template, and then by time.
So the snr value for all templates at timestamp 1 are in contiguous order, followed by all templates at timestamp 2, then all templates at timestamp 3, etc.
For this reason in order to get the snr for a certain template at a certain timestamp we multiply our timestamp index by the number of templates and then add the specific template ID.
To copy an snr_series for a specific template we increment by number of templates to get each subsequent snr value associated with that template.
Tests
/fred/oz996/ldavis/artifacts/HLVK-1187006000-300/spiir-O4-EW-development-83b998bba/
/fred/oz996/ldavis/artifacts/HLVK-1187006000-300/ldavis__snr_series-a5c6c28ca/