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:

xoft : TimeSeries

the TimeSeries data to whiten

fftlength : float

FFT integration length (in seconds) for ASD estimation

overlap : float, optional

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

resample : int, optional

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

f_low : float, optional

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

**kwargs : dict, optional

additional arguments to omega.highpass

Returns:

wxoft : TimeSeries

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

hpxoft : TimeSeries

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

xoft : ``~gwpy.timeseries.TimeSeries`

original (possibly resampled) version of the input data

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

Cross-correlate two TimeSeries by matched-filter

Parameters:

xoft : TimeSeries

the TimeSeries data to analyze

hoft : TimeSeries

a TimeSeries data to use as a matched-filter

Returns:

out : TimeSeries

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:

series : TimeSeries

the TimeSeries data to high-pass filter

f_low : float

lower cutoff frequency (Hz) of the filter

order : int, optional

number of taps in the filter, default: 12

analog : bool, optional

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

ftype : str, optional

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

Returns:

hpseries : TimeSeries

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:

gps : float

GPS time (seconds) of suspected transient

length : float

length (seconds) of the desired matched-filter

hoft : TimeSeries

the TimeSeries data to whiten

fftlength : float

FFT integration length (in seconds) for ASD estimation

resample : int, optional

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

f_low : float, optional

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

**kwargs : dict

additional keyword arguments to omega.conditioner

Returns:

out : TimeSeries

the conditioned data stream

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

Scan a channel for evidence of transients

Parameters:

gps : float

the GPS time (seconds) to scan

channel : OmegaChannel

OmegaChannel object corresponding to this data stream

xoft : TimeSeries

the TimeSeries data to analyze

fftlength : float

FFT integration length (in seconds) for ASD estimation

resample : int, optional

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

fthresh : float, optional

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

search : float, optional

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

nt : int, optional

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

nf : int, optional

number of points on the (log-sampled) frequency axis of the interpolated Spectrogram, default: 700

**kwargs : dict, optional

additional arguments to omega.conditioner

Returns:

series : tuple

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:

series : TimeSeries

the TimeSeries data to whiten

fftlength : float

FFT integration length (in seconds) for ASD estimation

overlap : float, optional

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

method : str, optional

FFT-averaging method, default: 'median',

window : str, numpy.ndarray, optional

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

detrend : str, optional

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

Returns:

wseries : TimeSeries

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