gwdetchar.saturation module

Utilies for analysing sensor saturations

gwdetchar.saturation.find_limit_channels(channels, skip=None)[source]

Find all ‘LIMIT’ channels that have a matching ‘LIMEN’ or ‘SWSTAT’


channels : list of str

the list of channel names to search


limits : list or str

the list of channels whose name ends in ‘_LIMIT’ for whom a matching channel ending in ‘_LIMEN’ or ‘_SWSTAT’ was found

gwdetchar.saturation.find_saturations(timeseries, limit=65536, precision=1, segments=False)[source]

Find the times of software saturations of the given TimeSeries


timeseries : TimeSeries

the input data to search

limit : float, TimeSeries

the limit above which a saturation has occurred

precision : float in range (0, 1]

the precision of the check for saturation

segments : bool, default: False

return saturation segments, otherwise return times when saturations occur


times : numpy.ndarray

the array of times when this timeseries started saturating, OR

segments : DataQualityFlag

the flag containing segments during which this timeseries was actively saturating

gwdetchar.saturation.grouper(iterable, n, fillvalue=None)[source]

Separate an iterable into sub-sets of n elements

gwdetchar.saturation.is_saturated(channel, cache, start=None, end=None, indicator='LIMEN', nproc=4)[source]

Check whether a channel has saturated its software limit


channel : str, or list of str

either a single channel name, or a list of channel names

cache : list

a list of file paths, the cache must be contiguous

start : LIGOTimeGPS, int

the GPS start time of the check

end : LIGOTimeGPS, int

the GPS end time of the check

indicator : str

the suffix of the indicator channel, either 'LIMEN' or 'SWSTAT'

nproc : int

the number of parallel processes to use for frame reading


saturated : bool, None, or DataQualityFlag, or list of the same

one of the following given the conditions - None : if the channel doesn’t have a software limit - False : if the channel didn’t saturate - DataQualityFlag : otherwise OR, a list of the above if a list of channels was given in the first place