gwdetchar.daq module

Utilities for analysing ADC or DAC overflows

gwdetchar.daq._ligo_model_overflow_channels_gwf(dcuid, ifo, frametype, gpstime)[source]
gwdetchar.daq._ligo_model_overflow_channels_nds(dcuid, ifo, gpstime, host)[source]
gwdetchar.daq.find_crossings(timeseries, threshold)[source]

Find the times that a timeseries crosses a specific value

Parameters:
timeseriesTimeSeries

the input data to test against a threshold

thresholdfloat

function will analyze input timeseries and find times when data crosses this threshold

Returns:
timesnumpy.ndarray

an array of GPS times (float64) at which the input data crossed the threshold

gwdetchar.daq.find_overflow_segments(timeseries, cumulative=True, round=False)[source]

Find the segments during which the given counter indicated an overflow

Parameters:
timeseriesTimeSeries

the input data from the cumulative overflow counter

cumulativebool, default: True

whether the timeseries contains a cumulative overflow counter or an overflow state [0/1]

Returns:
overflowsSegmentList

a list of overflow segments

gwdetchar.daq.find_overflows(timeseries, cumulative=True)[source]

Find the times of overflows from an overflow counter

Parameters:
timeseriesTimeSeries

the input data from the cumulative overflow counter

cumulativebool, default: True

whether the timeseries contains a cumulative overflow counter or an overflow state [0/1]

Returns:
timesnumpy.ndarray

an array of GPS times (float64) at which overflows were recorded

gwdetchar.daq.ligo_accum_overflow_channel(dcuid, ifo=None)[source]

Returns the channel name for cumulative overflows for this DCUID

Parameters:
dcuidint

the DCUID for the relevant front-end model

ifostr

the IFO prefix, defaults to the $IFO environment variable

Returns:
channelstr

the name of the cumulative overflow counter channel

gwdetchar.daq.ligo_model_overflow_channels(dcuid, ifo=None, frametype=None, gpstime=None, accum=True, nds=None)[source]

Find the CDS overflow channel names for a given DCUID

Parameters:
dcuidint

the ID of the front-end controller to search

ifostr, optional

the prefix of the interferometer to use

frametypestr, optional

the frametype to use, defaults to {ifo}_R

gpstimeint, optional

the GPS time at which to search

accumbool, optional

whether to retun the accumulated overflow channels (True) or not (False)

ndsstr, optional

the 'host:port' to use for accessing data via NDS, or None to use direct GWF file access

Returns:
nameslist of str

the list of channel names found