gwBOB.BOB_terms_jax module

gwBOB.BOB_terms_jax.BOB_amplitude_jax(t, tau, Ap, tp)[source]

BOB amplitude evolution

Eq.5 in https://arxiv.org/abs/1810.00040

Parameters:
  • t – Time

  • tp – Time of peak amplitude

  • tau – Damping time; inverse of the imaginary part of the QNM frequency

  • Ap – Peak Waveform Amplitude

Returns:

Waveform amplitude at time t

Return type:

A(t)

gwBOB.BOB_terms_jax.BOB_news_freq_finite_t0(t, Omega_0, Omega_QNM, tau, t0, tp, m)[source]

Waveform frequency for the news when assuming the BOB amplitude best models the news (for finite t0)

Parameters:
  • t – Time

  • t0 – Initial Condition time

  • tp – Time of peak amplitude

  • tau – Damping time; inverse of the imaginary part of the QNM frequency

  • Omega_0 – Initial Condition Frequency

  • Omega_QNM – Real part of Quasinormal mode (QNM) frequency/(mode number)

  • m (int) – Mode number

Returns:

omega - News waveform frequency

gwBOB.BOB_terms_jax.BOB_news_freq_jax(t, Omega_0, Omega_QNM, tau, tp, m)[source]

Waveform frequency for the news when the BOB amplitude models the news (taking t0 = -inf)

Parameters:
  • t – Time

  • tp – Time of peak amplitude

  • tau – Damping time; inverse of the imaginary part of the QNM frequency

  • Omega_0 – Initial Condition Frequency

  • Omega_QNM – Real part of Quasinormal mode (QNM) frequency/(mode number)

  • m (int) – Mode number

Returns:

omega - News waveform frequency

gwBOB.BOB_terms_jax.BOB_news_phase_jax(t, Omega_0, Omega_QNM, tau, tp, Phi_0, m=2)[source]

Waveform phase for the news when the BOB amplitude models the news (taking t0 = -inf)

Parameters:
  • t – Time

  • tp – Time of peak amplitude

  • tau – Damping time; inverse of the imaginary part of the QNM frequency

  • Omega_0 – Initial Condition Frequency

  • Omega_QNM – Real part of Quasinormal mode (QNM) frequency/(mode number)

  • Phi_0 – Initial Condition Phase (phi)/(mode number)

  • m (int) – Mode number

Returns:

phi - News waveform phase

omega - News waveform frequency

gwBOB.BOB_terms_jax.BOB_psi4_freq_finite_t0(t, Omega_0, Omega_QNM, tau, t0, tp, m)[source]

Waveform frequency for psi4 when assuming the BOB amplitude best models psi4 (for finite t0)

Parameters:
  • t – Time

  • t0 – Initial Condition time

  • tp – Time of peak amplitude

  • tau – Damping term; can also be described as 1/gamma (gamma is imaginry QNM fre)

  • Omega_0 – Initial Condition Frequency

  • Omega_QNM – Real part of Quasinormal mode (QNM) frequency/(mode number)

  • m (int) – Mode number

Returns:

omega - Psi4 waveform frequency

gwBOB.BOB_terms_jax.BOB_psi4_freq_jax(t, Omega_0, Omega_QNM, tau, tp, m)[source]

Waveform frequency for psi4 when assuming the BOB amplitude best models psi4 (taking t0 = -inf)

Parameters:
  • t – Time

  • tp – Time of peak amplitude

  • tau – Damping time; inverse of the imaginary part of the QNM frequency

  • Omega_0 – Initial Condition Frequency

  • Omega_QNM – Real part of Quasinormal mode (QNM) frequency/(mode number)

  • m (int) – Mode number

Returns:

omega - Psi4 waveform frequency

gwBOB.BOB_terms_jax.BOB_strain_freq(t, Omega_0, Omega_QNM, tau, tp, m)[source]

Waveform frequency for strain when assuming the BOB amplitude best models the strain (taking t0 = -inf)

Parameters:
  • t – Time

  • tp – Time of peak amplitude

  • tau – Damping time; inverse of the imaginary part of the QNM frequency

  • Omega_0 – Initial Condition Frequency

  • Omega_QNM – Real part of Quasinormal mode (QNM) frequency/(mode number)

  • m (int) – Mode number

Returns:

omega - Strain waveform frequency

gwBOB.BOB_terms_jax.BOB_strain_freq_finite_t0(t, Omega_0, Omega_QNM, tau, t0, tp, m)[source]

Waveform frequency for the strain when assuming the BOB amplitude best models the strain (for finite t0)

Parameters:
  • t – Time

  • t0 – Initial Condition time

  • tp – Time of peak amplitude

  • tau – Damping time; inverse of the imaginary part of the QNM frequency

  • Omega_0 – Initial Condition Frequency

  • Omega_QNM – Real part of Quasinormal mode (QNM) frequency/(mode number)

  • m (int) – Mode number

Returns:

omega - Strain waveform frequency

class gwBOB.BOB_terms_jax.JAXBOB(t, Omega_0, Omega_QNM, tau, Ap, tp, m)[source]

Bases: object

gwBOB.BOB_terms_jax.calculate_strain_from_news(t, Omega_0, Omega_QNM, tau, Ap, tp, omega_func, A_func, m, N)[source]

Calculate the strain from the news using the series aapproximation Generates the raw, unsigned series terms [f₀, Df₀, D²f₀, …, Dⁿf₀] using JAX’s automatic differentiation for scenarios with t0 = -inf

Parameters:
  • t – Time

  • Omega_0 – Initial Condition Frequency

  • Omega_QNM – Real part of Quasinormal mode (QNM) frequency/(mode number)

  • tau – Damping time; inverse of the imaginary part of the QNM frequency

  • Ap – Peak waveform amplitude

  • tp – Time of peak amplitude

  • omega_func – frequency function

  • A_func – amplitude function

  • m – Mode number

  • N – number of terms in the series

Returns:

list of raw series terms (excluding alternating signs)

series sum

gwBOB.BOB_terms_jax.calculate_strain_from_news_finite_t0(t, Omega_0, Omega_QNM, tau, Ap, tp, t0, omega_func, A_func, m, N)[source]

Calculate the strain from the news using the series aapproximation Generates the raw, unsigned series terms [f₀, Df₀, D²f₀, …, Dⁿf₀] using JAX’s automatic differentiation for scenarios invoving finite t0 values.

Parameters:
  • t – Time

  • Omega_0 – Initial Condition Frequency

  • Omega_QNM – Real part of Quasinormal mode (QNM) frequency/(mode number)

  • tau – Damping time; inverse of the imaginary part of the QNM frequency

  • Ap – Peak waveform amplitude

  • tp – Time of peak amplitude

  • omega_func – frequency function

  • A_func – amplitude function

  • m – Mode number

  • N – number of terms in the series

Returns:

list of raw series terms (excluding alternating signs)

series sum

gwBOB.BOB_terms_jax.calculate_strain_from_psi4(t, Omega_0, Omega_QNM, tau, Ap, tp, omega_func, A_func, m, N)[source]

Calculate the strain from psi4 using the series aapproximation Generates the raw, unsigned series terms [f₀, Df₀, D²f₀, …, Dⁿf₀] using JAX’s automatic differentiation for scenarios with t0 = -inf.

Parameters:
  • t – Time

  • Omega_0 – Initial Condition Frequency

  • Omega_QNM – Real part of Quasinormal mode (QNM) frequency/(mode number)

  • tau – Damping time; inverse of the imaginary part of the QNM frequency

  • Ap – Peak waveform amplitude

  • tp – Time of peak amplitude

  • omega_func – frequency function

  • A_func – amplitude function

  • m – Mode number

  • N – number of terms in both the inner and outer series

Returns:

list of raw series terms (excluding alternating signs)

series sum

gwBOB.BOB_terms_jax.calculate_strain_from_psi4_finite_t0(t, Omega_0, Omega_QNM, tau, Ap, tp, t0, omega_func, A_func, m, N)[source]

Calculate the strain from psi4 using the series aapproximation Generates the raw, unsigned series terms [f₀, Df₀, D²f₀, …, Dⁿf₀] using JAX’s automatic differentiation for scenarios with finite t0.

Parameters:
  • t – Time

  • Omega_0 – Initial Condition Frequency

  • Omega_QNM – Real part of Quasinormal mode (QNM) frequency/(mode number)

  • tau – Damping time; inverse of the imaginary part of the QNM frequency

  • Ap – Peak waveform amplitude

  • tp – Time of peak amplitude

  • omega_func – frequency function

  • A_func – amplitude function

  • m – Mode number

  • N – number of terms in both the inner and outer series

Returns:

list of raw series terms (excluding alternating signs)

series sum

gwBOB.BOB_terms_jax.complex_scalar_derivative(g)[source]

Compute the derivative of a complex scalar function g(t).

gwBOB.BOB_terms_jax.convert_BOB_to_JAXBOB(BOB)[source]
gwBOB.BOB_terms_jax.fast_truncated_sum(all_raw_terms)[source]

Calculates the series sum, including the alternating signs.

Parameters:

all_raw_terms – 2D array of shape (N+1, n_times) of UNSIGNED terms.

Returns:

Sum of all_raw_terms with alternating signs

gwBOB.BOB_terms_jax.get_series_terms_ad(t, Omega_0, Omega_QNM, tau, Ap, tp, omega_func, A_func, m, N)[source]

Generates the raw, unsigned series terms [f₀, Df₀, D²f₀, …, Dⁿf₀] using JAX’s automatic differentiation for t0 = -inf scenarios

Parameters:
  • t – Time

  • Omega_0 – Initial Condition Frequency

  • Omega_QNM – Real part of Quasinormal mode (QNM) frequency/(mode number)

  • tau – Damping time; inverse of the imaginary part of the QNM frequency

  • Ap – Peak waveform amplitude

  • tp – Time of peak amplitude

  • omega_func – frequency function

  • A_func – amplitude function

  • m – Mode number

  • N – number of terms in the series

Returns:

A 2D array of shape (N+1, len(t)) containing the raw terms.

gwBOB.BOB_terms_jax.get_series_terms_ad_finite_t0(t, Omega_0, Omega_QNM, tau, Ap, tp, t0, omega_func, A_func, m, N)[source]

Generates the raw, unsigned series terms [f₀, Df₀, D²f₀, …, Dⁿf₀] using JAX’s automatic differentiation for finite t0 scenarios.

Parameters:
  • t – Time

  • Omega_0 – Initial Condition Frequency

  • Omega_QNM – Real part of Quasinormal mode (QNM) frequency/(mode number)

  • tau – Damping time; inverse of the imaginary part of the QNM frequency

  • Ap – Peak waveform amplitude

  • tp – Time of peak amplitude

  • omega_func – frequency function

  • A_func – amplitude function

  • m – Mode number

  • N – number of terms in the series

Returns:

A 2D array of shape (N+1, len(t)) containing the raw terms.