Package pylal :: Package dq :: Module noisebudget :: Class NoiseTerm
[hide private]
[frames] | no frames]

Class NoiseTerm

source code

object --+
         |
        NoiseTerm

Object representing one term in a noise budget/projection. It holds a few parameters and has methods to read data and generate ASD spectrum borrowed from pylal.seriesutils, and simple plotting from pylal.plotutils

Instance Methods [hide private]
 
__init__(self, **kwargs)
" Initialise a NoiseTerm.
source code
 
fromNDS(self, *args, **kwargs) source code
 
fromcache(self, *args, **kwargs) source code
 
fromframefile(self, *args, **kwargs) source code
 
compute_average_spectrum(self, *args, **kwargs) source code
 
apply_calibration(self, func)
Apply a calibration function to the timeseries.
source code
 
apply_spectrum_calibration(self, func)
Apply the transfer function to the spectrum.
source code
 
loadreference(self, referencefile, epoch=seriesutils.lal.LIGOTimeGPS(), sampleUnits=seriesutils.lal.lalStrainUnit, fcol=0, acol=1)
Read the reference spectrum from a two-column file of frequency and ASD.
source code
 
apply_frequency_band(self, fmin, fmax)
Restrict the spectrum for this NoiseTerm to the given semiopen [fmin, fmax) interval.
source code
 
plot(self, outfile, **params)
Plot the spectrum of this NoiseTerm.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  typemap = {'channel': str, 'frame_type': str, 'name': str, 'su...
  name = None
hash(x)
  channel = None
hash(x)
  frame_type = None
hash(x)
  sum = False
  data = None
hash(x)
  deltaT = 0
  spectrum = None
hash(x)
  deltaF = 0
  f0 = 0
  epoch = seriesutils.lal.LIGOTimeGPS()
  ref_spectrum = None
hash(x)
  ref_deltaF = 0
  ref_f0 = 0
  ref_epoch = seriesutils.lal.LIGOTimeGPS()
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, **kwargs)
(Constructor)

source code 
"
Initialise a NoiseTerm.

Keyword arguments:

    name : str
        description of this NoiseTerm
    channel : str
        data channel from which this noise term is estimated
    frame_type : str
        LDR frame type for files containing data for this NoiseTerm
    

Overrides: object.__init__

apply_calibration(self, func)

source code 

Apply a calibration function to the timeseries.

Arguments:

    func : callable
        any callable function that accepts numpy.array as input
    

apply_spectrum_calibration(self, func)

source code 

Apply the transfer function to the spectrum.

Arguments:

    func : [ callable | numpy.array ]
        any callable function that accepts numpy.array as input or
        array by which to multiply spectrum.
    

loadreference(self, referencefile, epoch=seriesutils.lal.LIGOTimeGPS(), sampleUnits=seriesutils.lal.lalStrainUnit, fcol=0, acol=1)

source code 

Read the reference spectrum from a two-column file of frequency and ASD.

Arguments:

    referencefile : str
        path to file with space-delimited columns of frequency and ASD

Keyword arguments:

    epoch : lal.LIGOTimeGPS
        GPS epoch of this reference
    sampleUnits : lal.LALUnit
        amplitude unit for reference spectrum
    fcol : int
        number of column holding frequency array, default 0
    acol : int
        number of column holding amplitude array, default 1
    

apply_frequency_band(self, fmin, fmax)

source code 

Restrict the spectrum for this NoiseTerm to the given semiopen
[fmin, fmax) interval.

Arguments:

    fmin : float
        minimum frequency for this NoiseTerm
    fmax : float
        maximum frequency for this NoiseTerm
    

plot(self, outfile, **params)

source code 

Plot the spectrum of this NoiseTerm.

Arguments:

outfile : str
    path to output file for this plot


Class Variable Details [hide private]

typemap

Value:
{'channel': str, 'frame_type': str, 'name': str, 'sum': bool, 'data': \
numpy.array, 'deltaT': float, 'spectrum': numpy.array, 'deltaF': float\
, 'f0': float, 'epoch': seriesutils.lal.LIGOTimeGPS, 'ref_spectrum': n\
umpy.array, 'ref_deltaF': float, 'ref_f0': float, 'ref_epoch': seriesu\
tils.lal.LIGOTimeGPS}