gwdetchar.omega.core module

Core utilities for implementing omega scans

gwdetchar.omega.core.conditioner(xoft, fftlength, overlap=None, resample=None, f_low=None, **kwargs)[source]

Condition some input data for an omega scan

Parameters:
xoftTimeSeries

the TimeSeries data to whiten

fftlengthfloat

FFT integration length (in seconds) for ASD estimation

overlapfloat, optional

seconds of overlap between FFTs, defaults to half the FFT length

resampleint, optional

desired sampling rate (Hz) of the output if different from the input, default: no resampling

f_lowfloat, optional

lower cutoff frequency (Hz) of the filter, default: None

**kwargsdict, optional

additional arguments to highpass()

Returns:
wxoftTimeSeries

a whitened version of the input data with zero mean and unit variance

hpxoftTimeSeries

high-passed version of the input data (returned only if f_low is not None)

xoftTimeSeries

original (possibly resampled) version of the input data

gwdetchar.omega.core.cross_correlate(xoft, hoft)[source]

Cross-correlate two TimeSeries by matched-filter

Parameters:
xoftTimeSeries

the TimeSeries data to analyze

hoftTimeSeries

a TimeSeries data to use as a matched-filter

Returns:
outTimeSeries

the output of a single phase matched-filter

gwdetchar.omega.core.highpass(series, f_low, order=12, analog=False, ftype='sos')[source]

High-pass a TimeSeries with a Butterworth filter

Parameters:
seriesTimeSeries

the TimeSeries data to high-pass filter

f_lowfloat

lower cutoff frequency (Hz) of the filter

orderint, optional

number of taps in the filter, default: 12

analogbool, optional

when True, return an analog filter, otherwise a digital filter is returned, default: False

ftypestr, optional

type of filter: numerator/denominator ('ba'), pole-zero ('zpk'), or second-order sections ('sos'), default: 'sos'

Returns:
hpseriesTimeSeries

the high-passed TimeSeries

Notes

This utility designs a Butterworth filter of order order with corner frequency f_low / 1.5, then applies this filter to the input.

gwdetchar.omega.core.primary(gps, length, hoft, fftlength, resample=None, f_low=None, **kwargs)[source]

Condition the primary channel for use as a matched-filter

Parameters:
gpsfloat

GPS time (seconds) of suspected transient

lengthfloat

length (seconds) of the desired matched-filter

hoftTimeSeries

the TimeSeries data to whiten

fftlengthfloat

FFT integration length (in seconds) for ASD estimation

resampleint, optional

desired sampling rate (Hz) of the output if different from the input, default: no resampling

f_lowfloat, optional

lower cutoff frequency (Hz) of the filter, default: None

**kwargsdict

additional keyword arguments to omega.conditioner

Returns:
outTimeSeries

the conditioned data stream

gwdetchar.omega.core.scan(gps, channel, xoft, fftlength, resample=None, fthresh=1e-10, search=0.5, nt=1400, nf=700, logf=True, **kwargs)[source]

Scan a channel for evidence of transients

Parameters:
gpsfloat

the GPS time (seconds) to scan

channelOmegaChannel

OmegaChannel object corresponding to this data stream

xoftTimeSeries

the TimeSeries data to analyze

fftlengthfloat

FFT integration length (in seconds) for ASD estimation

resampleint, optional

desired sampling rate (Hz) of the output if different from the input, default: no resampling

fthreshfloat, optional

threshold on false alarm rate (Hz) for this channel to be considered interesting, default: 1e-10

searchfloat, optional

time window (seconds) around gps in which to find peak energies, default: 0.5

ntint, optional

number of points on the time axis of the interpolated Spectrogram, default: 1400

nfint, optional

number of points on the frequency axis of the interpolated Spectrogram, default: 700

logfbool, optional

boolean switch to enable (True) or disable (False) use of log-sampled frequencies in the output Spectrogram, default: True

**kwargsdict, optional

additional arguments to omega.conditioner

Returns:
seriestuple

an ordered collection of intermediate data products from this scan, including: the resampled TimeSeries, high-passed TimeSeries, whitened TimeSeries, whitened QGram, high-passed QGram, interpolated whitened Spectrogram, and interpolated high-passed Spectrogram

gwdetchar.omega.core.whiten(series, fftlength, overlap=None, method='median', window='hann', detrend='linear')[source]

Whiten a TimeSeries against its own ASD

Parameters:
seriesTimeSeries

the TimeSeries data to whiten

fftlengthfloat

FFT integration length (in seconds) for ASD estimation

overlapfloat, optional

seconds of overlap between FFTs, defaults to half the FFT length

methodstr, optional

FFT-averaging method, default: 'median',

windowstr, numpy.ndarray, optional

window function to apply to timeseries prior to FFT, default: 'hann' see scipy.signal.get_window() for details on acceptable formats

detrendstr, optional

type of detrending to do before FFT, default: 'linear'

Returns:
wseriesTimeSeries

a whitened version of the input data with zero mean and unit variance