gstlal  1.4.1
Public Member Functions | Public Attributes | List of all members
python.reference_psd.HorizonDistance Class Reference
Inheritance diagram for python.reference_psd.HorizonDistance:
[legend]
Collaboration diagram for python.reference_psd.HorizonDistance:
[legend]

Public Member Functions

def __init__ (self, f_min, f_max, delta_f, m1, m2, spin1=(0., 0., 0.), spin2=(0., 0., 0.), eccentricity=0., inclination=0.)
 
def __call__ (self, psd, snr=8.)
 

Public Attributes

 f_min
 
 f_max
 
 m1
 
 m2
 
 spin1
 
 spin2
 
 inclination
 
 eccentricity
 
 model
 

Detailed Description

Definition at line 218 of file reference_psd.py.

Constructor & Destructor Documentation

◆ __init__()

def python.reference_psd.HorizonDistance.__init__ (   self,
  f_min,
  f_max,
  delta_f,
  m1,
  m2,
  spin1 = (0., 0., 0.),
  spin2 = (0., 0., 0.),
  eccentricity = 0.,
  inclination = 0. 
)
Configures the horizon distance calculation for a specific
waveform model.  The waveform is pre-computed and stored,
so this initialization step can be time-consuming but
computing horizon distances from measured PSDs will be
fast.

The waveform model's spectrum parameters, for example its
Nyquist and frequency resolution, need not match the
parameters for the PSDs that will ultimately be supplied
but there are some advantages to be had in getting them to
match.  For example, computing the waveform with a smaller
delta_f than will be needed will require additional storage
and consume additional CPU time for the initialization,
while computing it with too low an f_max or too large a
delta_f might lead to inaccurate horizon distance
estimates.

f_min (Hertz) sets the frequency at which the waveform
model is to begin.

f_max (Hertz) sets the frequency upto which the waveform's
model is desired.

delta_f (Hertz) sets the frequency resolution of the
desired waveform model.

m1, m2 (solar masses) set the component masses of the
system to model.

spin1, spin2 (3-component vectors, geometric units) set the
spins of the component masses.

eccentricity [0, 1) sets the eccentricity of the system.

inclination (radians) sets the orbital inclination of the
system.

Example:

>>> # configure for non-spinning, circular, 1.4+1.4 BNS
>>> horizon_distance = HorizonDistance(10., 1024., 1./32., 1.4, 1.4)
>>> # populate a PSD for testing
>>> import lal, lalsimulation
>>> psd = lal.CreateREAL8FrequencySeries("psd", lal.LIGOTimeGPS(0), 0., 1./32., lal.Unit("strain^2 s"), horizon_distance.model.data.length)
>>> lalsimulation.SimNoisePSDaLIGODesignSensitivityP1200087(psd, 0.)
0
>>> # compute horizon distance
>>> D, (f, model) = horizon_distance(psd)
>>> print "%.4g Mpc" % D
434.5 Mpc
>>> # compute distance and spectrum for SNR = 25
>>> D, (f, model) = horizon_distance(psd, 25.)
>>> "%.4g Mpc" % D
'139 Mpc'
>>> f
array([   10.     ,    10.03125,    10.0625 , ...,  1023.9375 ,
1023.96875,  1024.     ])
>>> model
array([  8.00942750e-45,   7.95221458e-45,   7.89520620e-45, ...,
 1.11473675e-49,   1.11465176e-49,   1.11456678e-49])

NOTE:

- Currently the SEOBNRv4_ROM waveform model is used, so its
  limitations with respect to masses, spins, etc., apply.
  The choice of waveform model is subject to change.

Definition at line 219 of file reference_psd.py.

Member Function Documentation

◆ __call__()

def python.reference_psd.HorizonDistance.__call__ (   self,
  psd,
  snr = 8. 
)
Compute the horizon distance for the configured waveform
model given the PSD and the SNR at which the horizon is
defined (default = 8).  Equivalently, from a PSD and an
observed SNR compute and return the amplitude of the
configured waveform's spectrum required to achieve that
SNR.

The return value is a two-element tuple.  The first element
is the horizon distance in Mpc.  The second element is,
itself, a two-element tuple containing two vectors giving
the frequencies and amplitudes of the waveform model's
spectrum scaled so as to have the given SNR.  The vectors
are clipped to the range of frequencies that were used for
the SNR integral.

The parameters of the PSD, for example its Nyquist and
frequency resolution, need not match the parameters of the
configured waveform model.  In the event of a mismatch, the
waveform model is resampled to the frequencies at which the
PSD has been measured.

The inspiral spectrum returned has the same units as the
PSD and is normalized so that the SNR is

SNR^2 = \int (inspiral_spectrum / psd) df

That is, the ratio of the inspiral spectrum to the PSD
gives the spectral density of SNR^2.

Definition at line 335 of file reference_psd.py.


The documentation for this class was generated from the following file: