.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/relativity/gravitational_waves/plot_gw170817_neutron_star_merger.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_api_gallery_relativity_gravitational_waves_plot_gw170817_neutron_star_merger.py: GW170817: the first binary neutron star merger ==================================================== On 17 August 2017, LIGO and Virgo detected the inspiral of two neutron stars -- far lighter than any binary black hole seen before, and correspondingly slower-chirping: the signal remained in the detectors' sensitive band for over a minute, instead of the fraction of a second GW150914's ~30-solar-mass black holes took. The measured chirp mass, .. math:: \mathcal{M} = \frac{(m_1 m_2)^{3/5}}{(m_1+m_2)^{1/5}} \approx 1.186\,M_\odot, was immediately recognizable as two neutron stars rather than two black holes: far below any black hole binary LIGO had detected, and consistent with the narrow mass range neutron stars are observed to occupy. This example reproduces that chirp mass from representative component masses and, using the same leading-order (Newtonian quadrupole) inspiral formula as the GW150914 example, shows directly why such light compact objects sweep through the detector band so much more slowly than a comparable binary black hole. .. GENERATED FROM PYTHON SOURCE LINES 24-31 .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from physicskit.relativity.chapters.gw_merger import BinaryMerger from physicskit.relativity.utils import constants as const .. GENERATED FROM PYTHON SOURCE LINES 32-37 The chirp mass pins down the source as two neutron stars, not black holes --------------------------------------------------------------------------- Component masses of roughly 1.46 and 1.27 solar masses -- squarely inside the observed neutron star mass range -- reproduce the measured chirp mass to within its reported uncertainty. .. GENERATED FROM PYTHON SOURCE LINES 37-46 .. code-block:: Python m1_Msun, m2_Msun = 1.46, 1.27 m1 = const.solar_masses_to_geometrized(m1_Msun) m2 = const.solar_masses_to_geometrized(m2_Msun) distance = const.PARSEC_M * 40.0e6 # GW170817: roughly 40 Mpc away gw170817 = BinaryMerger(m1=m1, m2=m2, distance=distance, inclination=0.4) chirp_mass_Msun = const.geometrized_to_solar_masses(gw170817.chirp_mass) print(f"GW170817-like: M1={m1_Msun} Msun, M2={m2_Msun} Msun, chirp mass={chirp_mass_Msun:.3f} Msun (measured: ~1.186 Msun)") .. rst-class:: sphx-glr-script-out .. code-block:: none GW170817-like: M1=1.46 Msun, M2=1.27 Msun, chirp mass=1.185 Msun (measured: ~1.186 Msun) .. GENERATED FROM PYTHON SOURCE LINES 47-65 Why light neutron stars chirp for so much longer than heavy black holes --------------------------------------------------------------------------- Inverting the inspiral frequency formula .. math:: f(t) = \frac{1}{\pi}\left[\frac{5}{256\,(t_{\text{merger}}-t)}\right]^{3/8} \mathcal{M}^{-5/8} for the time remaining before merger at a given frequency, .. math:: \tau(f) = \frac{5}{256\,(\pi f)^{8/3}\,\mathcal{M}^{5/3}}, shows how strongly the chirp mass alone controls the inspiral's duration: a lighter chirp mass spends far longer sweeping through the same frequency band, since :math:`\tau \propto \mathcal{M}^{-5/3}`. .. GENERATED FROM PYTHON SOURCE LINES 65-98 .. code-block:: Python def time_to_merger_at_frequency(merger, f_gw_hz): """Time before merger at which the GW frequency first reaches ``f_gw_hz``.""" f_geom = f_gw_hz / const.C_SI tau = 5.0 / (256.0 * (np.pi * f_geom) ** (8.0 / 3.0) * merger.chirp_mass ** (5.0 / 3.0)) return const.geometrized_to_seconds(tau) gw150914 = BinaryMerger( m1=const.solar_masses_to_geometrized(36.0), m2=const.solar_masses_to_geometrized(29.0), distance=const.PARSEC_M * 410.0e6, ) f_low_hz = 24.0 # roughly where Advanced LIGO's sensitive band began for this event tau_170817 = time_to_merger_at_frequency(gw170817, f_low_hz) tau_150914 = time_to_merger_at_frequency(gw150914, f_low_hz) print(f"Time from {f_low_hz:.0f} Hz to merger -- GW170817-like: {tau_170817:.1f} s, GW150914-like: {tau_150914:.2f} s") t_170817_s = np.linspace(-tau_170817, -0.05, 2000) t_150914_s = np.linspace(-tau_150914, -0.005, 2000) f_170817_Hz = gw170817.inspiral_frequency(const.seconds_to_geometrized(t_170817_s), t_merger=0.0) * const.C_SI f_150914_Hz = gw150914.inspiral_frequency(const.seconds_to_geometrized(t_150914_s), t_merger=0.0) * const.C_SI fig, ax = plt.subplots(figsize=(7, 4.5)) ax.plot(t_170817_s, f_170817_Hz, label=f"GW170817-like (BNS): {tau_170817:.0f} s in band") ax.plot(t_150914_s, f_150914_Hz, label=f"GW150914-like (BBH): {tau_150914:.2f} s in band") ax.set_xlabel("time before merger [s]") ax.set_ylabel("GW frequency [Hz]") ax.set_yscale("log") ax.set_title("Light neutron stars chirp far more slowly than heavy black holes") ax.legend() plt.tight_layout() plt.show() .. image-sg:: /api/gallery/relativity/gravitational_waves/images/sphx_glr_plot_gw170817_neutron_star_merger_001.png :alt: Light neutron stars chirp far more slowly than heavy black holes :srcset: /api/gallery/relativity/gravitational_waves/images/sphx_glr_plot_gw170817_neutron_star_merger_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none Time from 24 Hz to merger -- GW170817-like: 101.8 s, GW150914-like: 0.52 s .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.054 seconds) .. _sphx_glr_download_api_gallery_relativity_gravitational_waves_plot_gw170817_neutron_star_merger.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_gw170817_neutron_star_merger.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_gw170817_neutron_star_merger.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_gw170817_neutron_star_merger.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_