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
TimeSeriesdata 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
highpass()
- xoft
- 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_lowis notNone)- xoft
TimeSeries original (possibly resampled) version of the input data
- wxoft
- gwdetchar.omega.core.cross_correlate(xoft, hoft)[source]¶
Cross-correlate two
TimeSeriesby matched-filter- Parameters:
- xoft
TimeSeries the
TimeSeriesdata to analyze- hoft
TimeSeries a
TimeSeriesdata to use as a matched-filter
- xoft
- Returns:
- out
TimeSeries the output of a single phase matched-filter
- out
- gwdetchar.omega.core.highpass(series, f_low, order=12, analog=False, ftype='sos')[source]¶
High-pass a
TimeSerieswith a Butterworth filter- Parameters:
- series
TimeSeries the
TimeSeriesdata 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'
- series
- Returns:
- hpseries
TimeSeries the high-passed
TimeSeries
- hpseries
Notes
This utility designs a Butterworth filter of order
orderwith corner frequencyf_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
TimeSeriesdata 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
- gps
- Returns:
- out
TimeSeries the conditioned data stream
- out
- 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:
- gps
float the GPS time (seconds) to scan
- channel
OmegaChannel OmegaChannelobject corresponding to this data stream- xoft
TimeSeries the
TimeSeriesdata 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
gpsin 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 frequency axis of the interpolated
Spectrogram, default: 700- logf
bool, optional boolean switch to enable (
True) or disable (False) use of log-sampled frequencies in the outputSpectrogram, default:True- **kwargs
dict, optional additional arguments to
omega.conditioner
- gps
- Returns:
- series
tuple an ordered collection of intermediate data products from this scan, including: the resampled
TimeSeries, high-passedTimeSeries, whitenedTimeSeries, whitenedQGram, high-passedQGram, interpolated whitenedSpectrogram, and interpolated high-passedSpectrogram
- series
- gwdetchar.omega.core.whiten(series, fftlength, overlap=None, method='median', window='hann', detrend='linear')[source]¶
Whiten a
TimeSeriesagainst its own ASD- Parameters:
- series
TimeSeries the
TimeSeriesdata 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'seescipy.signal.get_window()for details on acceptable formats- detrend
str, optional type of detrending to do before FFT, default:
'linear'
- series
- Returns:
- wseries
TimeSeries a whitened version of the input data with zero mean and unit variance
- wseries
See also