Units
These helpers convert between characteristic strain and GW energy-density conventions.
hc_to_omega
hc_to_omega(hc, f)
Convert characteristic strain into \(\Omega_{\rm GW} h^2\).
The conversion assumes the standard observer-frame relation
\[
\Omega_{\rm GW}(f)\,h^2 =
\frac{2\pi^2}{3 H_{100}^2}\, f^2 h_c(f)^2,
\]
where \(H_{100} = 100\,{\rm km\,s^{-1}\,Mpc^{-1}}\) is encoded in
fastropop.constants.H100.
Parameters:
-
hc(float or Array) –Characteristic strain \(h_c(f)\).
-
f(float or Array) –Observer-frame gravitational-wave frequency in Hz.
Returns:
-
float or Array–Energy-density spectrum \(\Omega_{\rm GW}(f) h^2\).
omega_to_hc
omega_to_hc(omega_gwh2, f)
Convert \(\Omega_{\rm GW} h^2\) into characteristic strain.
This is the inverse of hc_to_omega:
\[
h_c(f) =
\sqrt{\Omega_{\rm GW}(f) h^2
\frac{3 H_{100}^2}{2\pi^2 f^2}}.
\]
Parameters:
-
omega_gwh2(float or Array) –Energy-density spectrum \(\Omega_{\rm GW}(f) h^2\).
-
f(float or Array) –Observer-frame gravitational-wave frequency in Hz.
Returns:
-
float or Array–Characteristic strain \(h_c(f)\).