Package pylal :: Package dq :: Module dqDataUtils
[hide private]
[frames] | no frames]

Module dqDataUtils

source code


Author: Duncan Macleod <duncan.macleod@astro.cf.ac.uk>

Functions [hide private]
 
make_external_call(command)
Execute shell command and capture standard output and errors.
source code
 
frominjectionfile(file, type, ifo=None, start=None, end=None)
Read generic injection file object file containing injections of the given type string.
source code
 
blrms(data, sampling, average=1, band=None, ripple_db=50, width=2.0, remove_mean=False, return_filter=False, verbose=False)
This function will calculate the band-limited root-mean-square of the given data, using averages of the given length in the given [fmin,fmax] band with a kaiser window.
source code
 
bandpass(data, sampling, fmin, fmax, ripple_db=50, width=2.0, return_filter=False, verbose=False)
This function will bandpass filter data in the given [fmin,fmax] band using a kaiser window.
source code
 
lowpass(data, sampling, fmin, ripple_db=50, width=2.0, return_filter=False, verbose=False)
This function will lowpass filter data in the given fmin band using a kaiser window.
source code
 
highpass(data, sampling, fmax, ripple_db=50, width=2.0, return_filter=False, verbose=False)
This function will highpass filter data in the given fmax band using a kaiser window.
source code
 
spectrum(data, sampling, NFFT=256, overlap=0.5, window='hanning', detrender=mlab.detrend_linear, sides='onesided', scale='PSD') source code
 
AverageSpectrumMedianMean(data, fs, NFFT=256, overlap=128, window=('kaiser',24), sides='onesided', verbose=False, log=False, warn=True)
Computes power spectral density of a data series using the median-mean average method.
source code
 
MedianBias(nn)
Returns the median bias factor.
source code
 
AverageSpectrumMedian(data, fs, NFFT=256, overlap=128, window='hanning', sides='onesided', verbose=False)
Construct power spectral density for given data set using the median average method.
source code
 
WindowDataSeries(series, window=None)
Apply window function to data set, defaults to Hanning window.
source code
 
PowerSpectrum(series, sides='onesided')
Calculate power spectum of given series
source code
 
inspiral_range(f, S, rho=8, m1=1.4, m2=1.4, fmin=30, fmax=4096, horizon=False)
Calculate inspiral range for a given spectrum.
source code
 
f_dependent_burst_range(f, S, rho=8, E=1e-2)
Calculate GRB-like or supernov-like burst range for a given spectrum and background trigger SNR at a given time as a function of freqeucy.
source code
 
burst_range(f, S, rho=8, E=1e-2, fmin=64, fmax=500)
Calculate GRB-like or supernova-like burst range for a given spectrum and background trigger SNR.
source code
 
burst_sg_range(f, S, centralFreq, Q, rho=8, E=1e-2, fmin=64, fmax=500)
Calculate range for sine-Gaussians for a given spectrum and background trigger SNR, assuming isotropic GW emission (unphysical but simple)
source code
Variables [hide private]
  __date__ = git_version.date
This module provides a bank of useful functions for manipulating triggers and trigger files for data quality investigations.
Function Details [hide private]

make_external_call(command)

source code 

Execute shell command and capture standard output and errors. Returns tuple "(stdout,stderr)".

frominjectionfile(file, type, ifo=None, start=None, end=None)

source code 

Read generic injection file object file containing injections of the given
type string. Returns an 'Sim' lsctable of the corresponding type.

Arguments:

  file : file object
  type : [ "inspiral" | "burst" | "ringdown" ]

Keyword arguments:

  ifo : [ "G1" | "H1" | "H2" | "L1" | "V1" ]

blrms(data, sampling, average=1, band=None, ripple_db=50, width=2.0, remove_mean=False, return_filter=False, verbose=False)

source code 

This function will calculate the band-limited root-mean-square of the given
data, using averages of the given length in the given [fmin,fmax] band
with a kaiser window.

Options are included to offset the data, and weight frequencies given a 
dict object of (frequency:weight) pairs.

Arguments:

  data : numpy.ndarray
    array of data points
  sampling : int
    number of data points per second

Keyword arguments:

  average : float
    length of rms in seconds
  band : tuple
    [fmin, fmax] for bandpass
  ripple_db : int
    Attenuation in the stop band, in dB
  width : float
    Desired width of the transition from pass to stop, in Hz
  remove_mean : boolean
  verbose : boolean

bandpass(data, sampling, fmin, fmax, ripple_db=50, width=2.0, return_filter=False, verbose=False)

source code 

This function will bandpass filter data in the given [fmin,fmax] band
using a kaiser window.

Arguments:

  data : numpy.ndarray
    array of data points
  sampling : int
    number of data points per second
  fmin : float
    frequency of lowpass
  fmax : float
    frequency of highpass

Keyword arguments:

  ripple_db : int
    Attenuation in the stop band, in dB
  width : float
    Desired width of the transition from pass to stop, in Hz
  return_filter: boolean
    Return filter
  verbose : boolean

lowpass(data, sampling, fmin, ripple_db=50, width=2.0, return_filter=False, verbose=False)

source code 

This function will lowpass filter data in the given fmin band
using a kaiser window.

Arguments:

  data : numpy.ndarray
    array of data points
  sampling : int
    number of data points per second
  fmin : float
    frequency of lowpass

Keyword arguments:

  ripple_db : int
    Attenuation in the stop band, in dB
  width : float
    Desired width of the transition from pass to stop, in Hz
  return_filter: boolean
    Return filter
  verbose : boolean

highpass(data, sampling, fmax, ripple_db=50, width=2.0, return_filter=False, verbose=False)

source code 

This function will highpass filter data in the given fmax band
using a kaiser window.

Arguments:

  data : numpy.ndarray
    array of data points
  sampling : int
    number of data points per second
  fmax : float
    frequency of highpass

Keyword arguments:

  ripple_db : int
    Attenuation in the stop band, in dB
  width : float
    Desired width of the transition from pass to stop, in Hz
  return_filter: boolean
    Return filter
  verbose : boolean