gwdetchar.saturation.core module¶
Utilies for analysing sensor saturations
- gwdetchar.saturation.core.find_limit_channels(channels, skip=None)[source]¶
Find all ‘LIMIT’ channels that have a matching ‘LIMEN’ or ‘SWSTAT’
- gwdetchar.saturation.core.find_saturations(timeseries, limit=65536, precision=1, segments=False)[source]¶
Find the times of software saturations of the given
TimeSeries
- Parameters:
- 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
- timeseries
- Returns:
- 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
- times
- gwdetchar.saturation.core.grouper(iterable, n, fillvalue=None)[source]¶
Separate an iterable into sub-sets of
n
elements
- gwdetchar.saturation.core.is_saturated(channel, cache, start=None, end=None, indicator='LIMEN', nproc=2)[source]¶
Check whether a channel has saturated its software limit
- Parameters:
- channel
str
, orlist
ofstr
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
- channel
- Returns:
- saturated
bool
,None
, orDataQualityFlag
, orlist
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, alist
of the above if alist
of channels was given in the first place
- saturated