Glitches
The infrastructure for getting glitch data is provided by the glitches subpackage.
The high level interface is given by the ABC GlitchSource which provides methods to get glitch data for the various injection points. For a given MOSA, those methods return a FuncOfTime or FuncOfTimeConst with the Glitch signal for the corresponding link as function of time. There are different implementations. For the trivial case of no Gliches, one can use GlitchSourceZero.
The main use case is handled by GlitchSourceSplines which uses spline interpolation functions from the module lisainstrument.sigpro.chunked_splines. The data samples are read from a GlitchFile instance (see below) which has to be provided.
To get sample data from file, there is an interface GlitchFile. The main purpose is to read Glitch samples within a requested time window. Further, the interface provides some needed metadata. Most importantly, the data for the various injection points if optional and the interface allows to query the availability. There is an implementation for each supported glitch file format version, currently only GlitchFileV14 supporting file format v1.4. To load any supported file, there is a function glitch_file.
GlitchSourceSplines uses GlitchFile to query the presence of glitch data for an injection point. If no data is available, calling GlitchSourceSplines methods for obtaining the corresponding glitch signal will return a zero-valued FuncOfTimeConst. Otherwise, it will return a FuncOfTime that interpolates the data read from GlitchFile. There are two operation modes, chunked and global. For the chunked mode, every time glitch data is requested for given sample times, only the data within the time window required for interpolation is requested from GlitchFile, and directly interpolated. In global mode, all data from the GlitchFile is used to set up an interpolation spline once at the beginning. The chunked mode is intended for the use case were the glitches are evaluated successively on time intervals. It would become very inefficient for random order or repeated evaluation.
flowchart TB
glitchhdf5[(Glitch HDF5 file V1.4)]
subgraph pkg_glitches [glitches]
glitch_source[GlitchSource]
glitch_source_splines[GlitchSourceSplines]
glitch_source_zero[GlitchSourceZero]
glitch_file[GlitchFile]
glitch_file_v14[GlitchFileV14]
end
funcs[FuncOfTimeTypes]
glitch_source --> funcs
glitch_source_splines --> glitch_source
glitch_source_zero --> glitch_source
glitch_file --> glitch_source_splines
glitch_file_v14 --> glitch_file
glitchhdf5 --> glitch_file_v14