Get Gravitational Wave Data

The cactus_gwsignal module provides classes to access gravitational wave signals computed by various CACTUS thorns using either the Moncrief formalism or the Weyl scalar. For both, GW strain and spectrum can be computed.

class postcactus.cactus_gwsignal.CactusGWMoncrief(sd)

This class is used to obtain GW signal multipole components computed by the thorn WaveExtract, using the Moncrief variables \(Q_\mathrm{odd}, Q_\mathrm{even}\). Data from multiple output directories is transparently merged. The following members are defined:

Variables
  • available_l – Spherical indices l of available components (sorted list of int)

  • available_m – Spherical indices m of available components (sorted list of int)

  • available_dist – Coordinate radius of available detectors. (sorted list of float)

  • dirs – The data directories.

The constructor is not intended for direct use.

Parameters

sd (SimDir instance.) – Simulation directory.

detector(dist)

Get the detector at given distance.

get_Q(l, m, dist)

Get the Moncrief variables \(Q_\mathrm{odd}, Q_\mathrm{even}\).

Parameters
  • l (int) – Multipole component l.

  • m (int) – Multipole component m.

  • dist (float) – Distance of detector.

Returns

\(Q_\mathrm{odd}, Q_\mathrm{even}\)

Return type

tuple of two TimeSeries

get_eff_strain(l, m, dist, w0)

Get effective gravitational wave spectrum.

Parameters
  • l (int) – Multipole component l.

  • m (int) – Multipole component m.

  • dist (float) – Distance of detector.

  • w0 (float) – Cutoff angular frequency for fixed frequency integration.

Returns

\((f,h^\mathrm{eff}(f))\).

Return type

tuple of two 1D numpy arrays

get_strain(l, m, dist, w0)

Get gravitational wave strain using the fixed frequency integration method.

Parameters
  • l (int) – Multipole component l.

  • m (int) – Multipole component m.

  • dist (float) – Distance of detector.

  • w0 (float) – Cutoff angular frequency for fixed frequency integration.

Returns

\(h^+, h^\times\)

Return type

tuple of two TimeSeries

has_detector(l, m, dist)

Check if a given multipole component extracted at a given distance is available.

Parameters
  • l (int) – Multipole component l.

  • m (int) – Multipole component m.

  • dist (float) – Distance of detector.

Returns

If available or not

Return type

bool

class postcactus.cactus_gwsignal.CactusGWPsi4MP(sd)

This class is used to obtain GW signal multipole components from \(\Psi_4\) Weyl scalar multipole components extracted at various distances. Use the [] operator to get the detector at a given distance, as GWPsi4Det instance, and operator “in” to check if radius is available.

Variables
  • available_lm – indices (l,m) of available components (list of tuples)

  • available_l – Spherical indices l of available components (sorted list of int)

  • available_m – Spherical indices m of available components (sorted list of int)

  • available_dist – Coordinate radius of available detectors. (sorted list of float)

  • dirs – The data directories.

The constructor is not intended for direct use.

Parameters

sd (SimDir instance.) – Simulation directory.

get_eff_strain(l, m, dist, w0)

Deprecated alias

get_psi4(l, m, dist)

Deprecated alias

get_psi4_inst_freq(l, m, dist, tsmooth0=None, tsmooth1=None)

Deprecated alias

get_strain(l, m, dist, w0, taper=False, cut=False)

Deprecated alias

has_detector(l, m, dist)

Check if a given multipole component extracted at a given distance is available.

Parameters
  • l (int) – Multipole component l.

  • m (int) – Multipole component m.

  • dist (float) – Distance of detector.

Returns

If available or not

Return type

bool

class postcactus.cactus_gwsignal.GWPsi4Det(mp)

This class represents the GW signal multipole components from \(\Psi_4\) Weyl scalar available at a given distance. To check if component is available, use the operator “in”.

Variables
  • dist – The coordinate distance at which the components were extracted.

  • available_lm – indices (l,m) of available components (list of tuples)

  • available_l – Spherical indices l of available components (sorted list of int)

get_angmom_z(l, m, w0, tmin=None, tmax=None, rs=None)

Compute z-component of total angular momentum radiated in GW by given multipole component.

Parameters
  • l (int) – Multipole component l.

  • m (int) – Multipole component m.

  • w0 (float or None) – Cutoff angular frequency for fixed frequency integration.

  • tmin (float or None) – Start integration at this (non-retarded) time.

  • tmax (float or None) – Stop integration at this (non-retarded) time.

  • rs – Estimate for areal radius.

Returns

Radiated angular momentum.

Return type

float

get_eff_strain(l, m, w0)

Get effective gravitational wave spectrum, in terms of the dimensionless quantity

\[h_\mathrm{eff}(f) = f \sqrt{\tilde{h}^2_+(f) + \tilde{h}^2_\times(f)}\]
Parameters
  • l (int) – Multipole component l.

  • m (int) – Multipole component m.

  • w0 (float) – Cutoff angular frequency for fixed frequency integration.

Returns

\((f,h_\mathrm{eff}(f))\).

Return type

tuple of two 1D numpy arrays

get_energy(l, m, w0, tmin=None, tmax=None, rs=None)

Compute total energy radiated in GW by given multipole component.

Parameters
  • l (int) – Multipole component l.

  • m (int) – Multipole component m.

  • w0 (float or None) – Cutoff angular frequency for fixed frequency integration.

  • tmin (float or None) – Start integration at this (non-retarded) time.

  • tmax (float or None) – Stop integration at this (non-retarded) time.

  • rs – Estimate for areal radius

Returns

Total radiated energy

Return type

float

get_power(l, m, w0, rs=None)

Compute power radiated in GW by given multipole component. The required time integration of \(\Psi_4\) is done via fixed frequency integration. The areal radius is approximated by coordinate radius, unless another estimate is provided. The formula used is from [NaHe2015].

\[\dot{E}(t) = \frac{r^2}{16 \pi} \sum_{l,m} \left \lvert \int_{-\infty}^t \Psi_4^{lm}(u) \mathrm{d}u \right\rvert^2\]
Parameters
  • l (int) – Multipole component l.

  • m (int) – Multipole component m.

  • w0 (float) – Cutoff angular frequency for fixed frequency integration.

  • rs (float or None) – Estimate for areal radius

Returns

Radiated power

Return type

TimeSeries

get_psi4(l, m)

Get a component of the decomposition of the Weyl scalar \(\Psi_4\) into spherical harmonics with spin weight -2, i.e.

\[\Psi_4(t, r, \theta, \phi) = \sum_{l=2}^\infty \sum_{m=-l}^l \Psi_4^{lm}(t,r) {}_{-2}Y_{lm}(\theta, \phi)\]

were r and t are extraction radius and non-retarded coordinate time.

Parameters
  • l (int) – Multipole component l.

  • m (int) – Multipole component m.

Returns

\(\Psi_4^{lm}\)

Return type

complex TimeSeries

get_psi4_inst_freq(l, m, tsmooth0=None, tsmooth1=None)

Deprecated

get_strain(l, m, w0, taper=False, cut=False)

Compute the GW strain components multiplied by the extraction radius. The strain is extracted from the Weyl Scalar using the formula (see [NaHe2015])

\[h_+^{lm}(r,t) - i h_\times^{lm}(r,t) = \int_{-\infty}^t \mathrm{d}u \int_{-\infty}^u \mathrm{d}v\, \Psi_4^{lm}(r,v)\]

The time integration is carried out using the fixed frequency integration method described in [RePo2011].

Parameters
  • l (int) – Multipole component l.

  • m (int) – Multipole component m.

  • w0 (float) – Cutoff angular frequency for fixed frequency integration.

  • taper (Bool) – Taper waveform (length 2 pi / w0) bfore FFI

  • cut (Bool) – Cut interval 2 pi / w0 at both ends after FFI

Returns

\(h^+ r, h^\times r\)

Return type

tuple of two TimeSeries

get_torque_z(l, m, w0, rs=None)

Compute z-component of angular momentum radiated per time in GW by a given multipole component. The required time integrations of \(\Psi_4\) are done via fixed frequency integration. The areal radius is approximated by coordinate radius, unless another estimate is provided. The formula used is from [NaHe2015].

\[\dot{J}_z(t) = \frac{r^2}{16 \pi} \Im \left[ \sum_{l,m} m \left( \int_{-\infty}^t \mathrm{d}u \, \Psi_4^{lm}(u) \right) \left( \int_{-\infty}^t \mathrm{d}u \int_{-\infty}^u \mathrm{d}v \, \bar{\Psi}_4^{lm}(v) \right) \right]\]
Parameters
  • l (int) – Multipole component l.

  • m (int) – Multipole component m.

  • w0 (float) – Cutoff angular frequency for fixed frequency integration.

  • rs (float or None) – Estimate for areal radius.

Returns

Radiated angular momentum per time by component (l,m)

Return type

TimeSeries

get_total_angmom_z(w0, tmin=None, tmax=None, rs=None, ret_comps=False)

Compute z-component of total angular momentum radiated in GW by all multipole components combined.

Parameters
  • w0 (float) – Cutoff angular frequency for fixed frequency integration.

  • tmin (float or None) – Start integration at this (non-retarded) time.

  • tmax (float or None) – Stop integration at this (non-retarded) time.

  • rs (float or None) – Estimate for areal radius.

  • ret_comps (bool) – If True, also return dictionary with results for the single components.

Returns

Radiated angular momentum.

Return type

float or (float,dict)

get_total_energy(w0, tmin=None, tmax=None, rs=None, ret_comps=False)

Compute total energy radiated in GW by all multipole components combined.

Parameters
  • w0 (float) – Cutoff angular frequency for fixed frequency integration.

  • tmin (float or None) – Start integration at this (non-retarded) time.

  • tmax (float or None) – Stop integration at this (non-retarded) time.

  • rs (float or None) – Estimate for areal radius

  • ret_comps (bool) – If True, also return dictionary with energy in single components

Returns

Radiated energy

Return type

float or (float,dict)

get_total_power(w0, rs=None)

Compute power radiated in GW by all available multipole components combined.

Parameters
  • w0 (float) – Cutoff angular frequency for fixed frequency integration.

  • rs (float or None) – Estimate for areal radius

Returns

Radiated power

Return type

TimeSeries

get_total_torque_z(w0, rs=None)

Compute z-component of angular momentum radiated per time in GW by all available multipole components combined.

Parameters
  • w0 (float) – Cutoff angular frequency for fixed frequency integration.

  • rs (float or None) – Estimate for areal radius.

Returns

Radiated angular momentum per time.

Return type

TimeSeries

postcactus.cactus_gwsignal.get_phase(z, t0=None)

Compute the complex phase of a complex-valued signal such that no phase wrap-arounds occur, i.e. if the input is continous, so is the output.

Parameters
  • z (TimeSeries) – Complex-valued signal

  • t0 (float or None) – Optionally, add a phase shift such that phase is zero at the given time.

Returns

Continuous complex phase.

Return type

TimeSeries

postcactus.cactus_gwsignal.load_gw_moncrief(f_re, f_im, m)

Load complex Moncrief variables Qodd or Qeven from seperate files for real and imaginary part.

References

NaHe2015(1,2,3)
  1. Nakano, J. Healy et al, Phys. Rev. D 91, 104022 (2015)

RePo2011
  1. Reisswig, D. Pollney, Class. Quantum Grav. 28 195015 (2011)