gstlal 1.13.0
Loading...
Searching...
No Matches
python.psd.HorizonDistance Class Reference
Inheritance diagram for python.psd.HorizonDistance:
Collaboration diagram for python.psd.HorizonDistance:

Public Member Functions

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

Public Attributes

 f_min = f_min
 f_max = f_max
 m1 = m1
 m2 = m2
 spin1 = numpy.array(spin1)
 spin2 = numpy.array(spin2)
 inclination = inclination
 eccentricity = eccentricity
 approximant = approximant
 model

Detailed Description

Definition at line 703 of file psd.py.

Constructor & Destructor Documentation

◆ __init__()

python.psd.HorizonDistance.__init__ ( self,
f_min,
f_max,
delta_f,
m1,
m2,
spin1 = (0., 0., 0.),
spin2 = (0., 0., 0.),
eccentricity = 0.,
inclination = 0.,
approximant = "IMRPhenomD" )
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.7 Mpc
>>> # compute distance and spectrum for SNR = 25
>>> D, (f, model) = horizon_distance(psd, 25.)
>>> "%.4g Mpc" % D
'139.1 Mpc'
>>> f
array([   10.     ,    10.03125,    10.0625 , ...,  1023.9375 ,
        1023.96875,  1024.     ])
>>> model
array([  8.05622865e-45,   7.99763234e-45,   7.93964216e-45, ...,
         1.11824864e-49,   1.11815656e-49,   1.11806450e-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 704 of file psd.py.

Member Function Documentation

◆ __call__()

python.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 821 of file psd.py.

Member Data Documentation

◆ approximant

python.psd.HorizonDistance.approximant = approximant

Definition at line 781 of file psd.py.

◆ eccentricity

python.psd.HorizonDistance.eccentricity = eccentricity

Definition at line 780 of file psd.py.

◆ f_max

python.psd.HorizonDistance.f_max = f_max

Definition at line 774 of file psd.py.

◆ f_min

python.psd.HorizonDistance.f_min = f_min

Definition at line 773 of file psd.py.

◆ inclination

python.psd.HorizonDistance.inclination = inclination

Definition at line 779 of file psd.py.

◆ m1

python.psd.HorizonDistance.m1 = m1

Definition at line 775 of file psd.py.

◆ m2

python.psd.HorizonDistance.m2 = m2

Definition at line 776 of file psd.py.

◆ model

python.psd.HorizonDistance.model
Initial value:
= lal.CreateREAL8FrequencySeries(
name = "signal spectrum",
epoch = LIGOTimeGPS(0),
f0 = hp.f0,
deltaF = hp.deltaF,
sampleUnits = hp.sampleUnits * hp.sampleUnits,
length = hp.data.length
)

Definition at line 810 of file psd.py.

◆ spin1

python.psd.HorizonDistance.spin1 = numpy.array(spin1)

Definition at line 777 of file psd.py.

◆ spin2

python.psd.HorizonDistance.spin2 = numpy.array(spin2)

Definition at line 778 of file psd.py.


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