{ "cells": [ { "cell_type": "markdown", "id": "3f065c1f", "metadata": {}, "source": [ "\"Open" ] }, { "cell_type": "code", "execution_count": 1, "id": "a530ed97", "metadata": { "ploomber": { "memory_usage": 419.09375, "timestamp_end": 1695851887.735631, "timestamp_start": 1695851887.694165 }, "tags": [ "remove-input" ] }, "outputs": [], "source": [ "%load_ext autoreload\n", "%autoreload 2\n", "%matplotlib inline\n", "\n", "import pandas as pd\n", "\n", "pd.set_option(\"display.max_rows\", None, \"display.max_columns\", None)" ] }, { "cell_type": "code", "execution_count": 2, "id": "8356dac2", "metadata": { "ploomber": { "memory_usage": 424.0859375, "timestamp_end": 1695851891.324079, "timestamp_start": 1695851887.735698 }, "tags": [ "hide-cell" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Requirement already satisfied: nrsur_catalog in /Users/avaj0001/Documents/projects/NRSUR_PRJ/nrsur_catalog/src (0.0.5)\r\n", "Requirement already satisfied: matplotlib in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages (from nrsur_catalog) (3.7.2)\r\n", "Requirement already satisfied: loguru in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages (from nrsur_catalog) (0.7.0)\r\n", "Requirement already satisfied: bilby[gw] in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages (from nrsur_catalog) (1.4.1)\r\n", "Requirement already satisfied: bilby.cython>=0.3.0 in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages (from bilby[gw]->nrsur_catalog) (0.4.0)\r\n", "Requirement already satisfied: dynesty>=2 in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages (from bilby[gw]->nrsur_catalog) (2.1.0)\r\n", "Requirement already satisfied: emcee in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages/emcee-3.1.1-py3.9.egg (from bilby[gw]->nrsur_catalog) (3.1.1)\r\n", "Requirement already satisfied: corner in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages/corner-2.2.1-py3.9.egg (from bilby[gw]->nrsur_catalog) (2.2.1)\r\n", "Requirement already satisfied: numpy in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages (from bilby[gw]->nrsur_catalog) (1.23.5)\r\n", "Requirement already satisfied: scipy>=1.5 in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages (from bilby[gw]->nrsur_catalog) (1.9.3)\r\n", "Requirement already satisfied: pandas in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages (from bilby[gw]->nrsur_catalog) (1.5.1)\r\n", "Requirement already satisfied: dill in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages/dill-0.3.4-py3.9.egg (from bilby[gw]->nrsur_catalog) (0.3.4)\r\n", "Requirement already satisfied: tqdm in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages (from bilby[gw]->nrsur_catalog) (4.66.1)\r\n", "Requirement already satisfied: h5py in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages/h5py-3.6.0-py3.9-macosx-10.15-x86_64.egg (from bilby[gw]->nrsur_catalog) (3.6.0)\r\n", "Requirement already satisfied: attrs in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages/attrs-21.2.0-py3.9.egg (from bilby[gw]->nrsur_catalog) (21.2.0)\r\n", "Requirement already satisfied: astropy>=5 in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages (from bilby[gw]->nrsur_catalog) (5.1)\r\n", "Requirement already satisfied: lalsuite in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages (from bilby[gw]->nrsur_catalog) (7.6)\r\n", "Requirement already satisfied: gwpy in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages (from bilby[gw]->nrsur_catalog) (2.1.3)\r\n", "Requirement already satisfied: tables in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages/tables-3.6.1-py3.9-macosx-10.15-x86_64.egg (from bilby[gw]->nrsur_catalog) (3.6.1)\r\n", "Requirement already satisfied: pyfftw in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages (from bilby[gw]->nrsur_catalog) (0.13.1)\r\n", "Requirement already satisfied: contourpy>=1.0.1 in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages (from matplotlib->nrsur_catalog) (1.1.0)\r\n", "Requirement already satisfied: cycler>=0.10 in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages/cycler-0.11.0-py3.9.egg (from matplotlib->nrsur_catalog) (0.11.0)\r\n", "Requirement already satisfied: fonttools>=4.22.0 in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages/fonttools-4.28.3-py3.9.egg (from matplotlib->nrsur_catalog) (4.28.3)\r\n", "Requirement already satisfied: kiwisolver>=1.0.1 in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages/kiwisolver-1.3.2-py3.9-macosx-10.15-x86_64.egg (from matplotlib->nrsur_catalog) (1.3.2)\r\n", "Requirement already satisfied: packaging>=20.0 in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages (from matplotlib->nrsur_catalog) (23.0)\r\n", "Requirement already satisfied: pillow>=6.2.0 in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages/Pillow-8.4.0-py3.9-macosx-10.15-x86_64.egg (from matplotlib->nrsur_catalog) (8.4.0)\r\n", "Requirement already satisfied: pyparsing<3.1,>=2.3.1 in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages/pyparsing-3.0.6-py3.9.egg (from matplotlib->nrsur_catalog) (3.0.6)\r\n", "Requirement already satisfied: python-dateutil>=2.7 in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages/python_dateutil-2.8.2-py3.9.egg (from matplotlib->nrsur_catalog) (2.8.2)\r\n", "Requirement already satisfied: importlib-resources>=3.2.0 in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages (from matplotlib->nrsur_catalog) (6.0.1)\r\n", "Requirement already satisfied: pyerfa>=2.0 in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages/pyerfa-2.0.0.1-py3.9-macosx-10.15-x86_64.egg (from astropy>=5->bilby[gw]->nrsur_catalog) (2.0.0.1)\r\n", "Requirement already satisfied: PyYAML>=3.13 in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages/PyYAML-6.0-py3.9-macosx-10.15-x86_64.egg (from astropy>=5->bilby[gw]->nrsur_catalog) (6.0)\r\n", "Requirement already satisfied: zipp>=3.1.0 in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages (from importlib-resources>=3.2.0->matplotlib->nrsur_catalog) (3.9.0)\r\n", "Requirement already satisfied: six>=1.5 in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages/six-1.16.0-py3.9.egg (from python-dateutil>=2.7->matplotlib->nrsur_catalog) (1.16.0)\r\n", "Requirement already satisfied: dqsegdb2 in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages (from gwpy->bilby[gw]->nrsur_catalog) (1.1.1)\r\n", "Requirement already satisfied: gwdatafind in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages (from gwpy->bilby[gw]->nrsur_catalog) (1.1.1)\r\n", "Requirement already satisfied: gwosc>=0.5.3 in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages (from gwpy->bilby[gw]->nrsur_catalog) (0.6.1)\r\n", "Requirement already satisfied: ligo-segments>=1.0.0 in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages (from gwpy->bilby[gw]->nrsur_catalog) (1.4.0)\r\n", "Requirement already satisfied: ligotimegps>=1.2.1 in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages (from gwpy->bilby[gw]->nrsur_catalog) (2.0.1)\r\n", "Requirement already satisfied: lscsoft-glue in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages (from lalsuite->bilby[gw]->nrsur_catalog) (3.0.1)\r\n", "Requirement already satisfied: pytz>=2020.1 in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages/pytz-2021.3-py3.9.egg (from pandas->bilby[gw]->nrsur_catalog) (2021.3)\r\n", "Requirement already satisfied: numexpr>=2.6.2 in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages/numexpr-2.8.0-py3.9-macosx-10.15-x86_64.egg (from tables->bilby[gw]->nrsur_catalog) (2.8.0)\r\n", "Requirement already satisfied: requests>=1.0.0 in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages (from gwosc>=0.5.3->gwpy->bilby[gw]->nrsur_catalog) (2.27.1)\r\n", "Requirement already satisfied: igwn-auth-utils[requests] in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages (from dqsegdb2->gwpy->bilby[gw]->nrsur_catalog) (0.2.2)\r\n", "Requirement already satisfied: pyOpenSSL in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages (from lscsoft-glue->lalsuite->bilby[gw]->nrsur_catalog) (22.0.0)\r\n", "Requirement already satisfied: pyRXP in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages (from lscsoft-glue->lalsuite->bilby[gw]->nrsur_catalog) (3.0.1)\r\n", "Requirement already satisfied: cryptography>=2.3 in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages (from igwn-auth-utils[requests]->dqsegdb2->gwpy->bilby[gw]->nrsur_catalog) (36.0.2)\r\n", "Requirement already satisfied: scitokens>=1.7.0 in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages (from igwn-auth-utils[requests]->dqsegdb2->gwpy->bilby[gw]->nrsur_catalog) (1.7.0)\r\n", "Requirement already satisfied: safe-netrc>=1.0.0 in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages (from igwn-auth-utils[requests]->dqsegdb2->gwpy->bilby[gw]->nrsur_catalog) (1.0.0)\r\n", "Requirement already satisfied: urllib3<1.27,>=1.21.1 in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages (from requests>=1.0.0->gwosc>=0.5.3->gwpy->bilby[gw]->nrsur_catalog) (1.26.9)\r\n", "Requirement already satisfied: certifi>=2017.4.17 in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages (from requests>=1.0.0->gwosc>=0.5.3->gwpy->bilby[gw]->nrsur_catalog) (2022.5.18.1)\r\n", "Requirement already satisfied: charset-normalizer~=2.0.0 in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages (from requests>=1.0.0->gwosc>=0.5.3->gwpy->bilby[gw]->nrsur_catalog) (2.0.12)\r\n", "Requirement already satisfied: idna<4,>=2.5 in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages (from requests>=1.0.0->gwosc>=0.5.3->gwpy->bilby[gw]->nrsur_catalog) (3.3)\r\n", "Requirement already satisfied: cffi>=1.12 in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages (from cryptography>=2.3->igwn-auth-utils[requests]->dqsegdb2->gwpy->bilby[gw]->nrsur_catalog) (1.15.0)\r\n", "Requirement already satisfied: PyJWT>=1.6.1 in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages (from scitokens>=1.7.0->igwn-auth-utils[requests]->dqsegdb2->gwpy->bilby[gw]->nrsur_catalog) (2.4.0)\r\n", "Requirement already satisfied: pycparser in /Users/avaj0001/Documents/projects/deep_gw_pe_followup/venv/lib/python3.9/site-packages (from cffi>=1.12->cryptography>=2.3->igwn-auth-utils[requests]->dqsegdb2->gwpy->bilby[gw]->nrsur_catalog) (2.21)\r\n" ] } ], "source": [ "! pip install nrsur_catalog" ] }, { "cell_type": "markdown", "id": "91ea17b0", "metadata": {}, "source": [ "# GW190421_213856\n", "\n", "Below are some plots for GW190421_213856 from the NRSurrogate Catalog." ] }, { "cell_type": "code", "execution_count": 3, "id": "bbb7e986", "metadata": { "ploomber": { "memory_usage": 523.78125, "timestamp_end": 1695851891.899183, "timestamp_start": 1695851891.324725 }, "tags": [ "remove-output" ] }, "outputs": [], "source": [ "from nrsur_catalog import NRsurResult\n", "\n", "nrsur_result = NRsurResult.load(\"GW190421_213856\", cache_dir=\".nrsur_catalog_cache\")\n", "# you can specify a `cache_dir`: folder where data will be downloaded" ] }, { "cell_type": "markdown", "id": "460ca3a5", "metadata": {}, "source": [ "## Summary" ] }, { "cell_type": "code", "execution_count": 4, "id": "266baacd", "metadata": { "ploomber": { "memory_usage": 525.1875, "timestamp_end": 1695851892.036964, "timestamp_start": 1695851891.899292 }, "tags": [ "remove-output" ] }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Posterior 90% CIPrior
Parameter
$\\chi_1$${0.44}_{-0.30}^{+0.34}$$\\text{Uniform} [0, 0.99]$
$\\chi_2$${0.47}_{-0.32}^{+0.34}$$\\text{Uniform} [0, 0.99]$
$\\phi$${1.82}_{-0.55}^{+0.67}$$\\text{Uniform} [0, 6.28]$
$\\mathcal{M}_{c}^{\\rm det}\\ [M_{\\odot}]$${46.06}_{-3.42}^{+3.39}$$\\text{UniformInComponentsChirpMass} [12, 400]$
$t_c\\ [s]$${1239917954.23}_{-0.00}^{+0.00}$$\\text{Uniform} [1239917954.16, 1239917954.36]$
$d_L\\ [Mpc]$${2597.29}_{-803.51}^{+867.12}$$\\text{UniformSourceFrame} [100.0, 10000.0]$
$q$${0.79}_{-0.19}^{+0.15}$$\\text{UniformInComponentsMassRatio} [0.17, 1]$
$\\phi$${3.14}_{-2.20}^{+2.13}$$\\text{Uniform} [0, 6.28]$
$\\phi_{12}$${3.18}_{-2.20}^{+2.14}$$\\text{Uniform} [0, 6.28]$
$\\phi_{\\mathrm{JL}}$${2.91}_{-1.72}^{+2.28}$$\\text{Uniform} [0, 6.28]$
$\\psi$${1.59}_{-1.01}^{+0.99}$$\\text{Uniform} [0, 3.14]$
$\\theta_{\\mathrm{JN}}$${2.16}_{-1.56}^{+0.54}$$\\text{Sine} [0, 3.14]$
$\\theta_1$${1.77}_{-0.60}^{+0.59}$$\\text{Sine} [0, 3.14]$
$\\theta_2$${1.80}_{-0.69}^{+0.62}$$\\text{Sine} [0, 3.14]$
${M}^{\\rm det}\\ [M_{\\odot}]$${107.67}_{-7.02}^{+7.46}$$\\text{Constraint} [60, 400]$
$\\theta$${2.19}_{-0.06}^{+0.07}$$\\text{Sine} [0, 3.14]$
$m_1^{\\rm src}\\ [M_{\\odot}]$${41.93}_{-4.58}^{+5.80}$$-$
$m_2^{\\rm src}\\ [M_{\\odot}]$${32.19}_{-5.53}^{+4.93}$$-$
$\\chi_{\\mathrm{eff}}$${-0.08}_{-0.15}^{+0.13}$$-$
$\\chi_{\\mathrm{p}}$${0.47}_{-0.23}^{+0.27}$$-$
$\\alpha$${3.46}_{-0.29}^{+0.13}$$-$
$\\delta$${-0.73}_{-0.50}^{+0.41}$$-$
$M_f^{\\rm src}\\ [M_{\\odot}]$${102.83}_{-6.42}^{+6.78}$$-$
$\\chi_f$${0.66}_{-0.06}^{+0.05}$$-$
$v_f\\ [{\\rm km/s}]$${505.49}_{-313.59}^{+611.73}$$-$
\n", "
" ], "text/plain": [ " Posterior 90% CI \\\n", "Parameter \n", "$\\chi_1$ ${0.44}_{-0.30}^{+0.34}$ \n", "$\\chi_2$ ${0.47}_{-0.32}^{+0.34}$ \n", "$\\phi$ ${1.82}_{-0.55}^{+0.67}$ \n", "$\\mathcal{M}_{c}^{\\rm det}\\ [M_{\\odot}]$ ${46.06}_{-3.42}^{+3.39}$ \n", "$t_c\\ [s]$ ${1239917954.23}_{-0.00}^{+0.00}$ \n", "$d_L\\ [Mpc]$ ${2597.29}_{-803.51}^{+867.12}$ \n", "$q$ ${0.79}_{-0.19}^{+0.15}$ \n", "$\\phi$ ${3.14}_{-2.20}^{+2.13}$ \n", "$\\phi_{12}$ ${3.18}_{-2.20}^{+2.14}$ \n", "$\\phi_{\\mathrm{JL}}$ ${2.91}_{-1.72}^{+2.28}$ \n", "$\\psi$ ${1.59}_{-1.01}^{+0.99}$ \n", "$\\theta_{\\mathrm{JN}}$ ${2.16}_{-1.56}^{+0.54}$ \n", "$\\theta_1$ ${1.77}_{-0.60}^{+0.59}$ \n", "$\\theta_2$ ${1.80}_{-0.69}^{+0.62}$ \n", "${M}^{\\rm det}\\ [M_{\\odot}]$ ${107.67}_{-7.02}^{+7.46}$ \n", "$\\theta$ ${2.19}_{-0.06}^{+0.07}$ \n", "$m_1^{\\rm src}\\ [M_{\\odot}]$ ${41.93}_{-4.58}^{+5.80}$ \n", "$m_2^{\\rm src}\\ [M_{\\odot}]$ ${32.19}_{-5.53}^{+4.93}$ \n", "$\\chi_{\\mathrm{eff}}$ ${-0.08}_{-0.15}^{+0.13}$ \n", "$\\chi_{\\mathrm{p}}$ ${0.47}_{-0.23}^{+0.27}$ \n", "$\\alpha$ ${3.46}_{-0.29}^{+0.13}$ \n", "$\\delta$ ${-0.73}_{-0.50}^{+0.41}$ \n", "$M_f^{\\rm src}\\ [M_{\\odot}]$ ${102.83}_{-6.42}^{+6.78}$ \n", "$\\chi_f$ ${0.66}_{-0.06}^{+0.05}$ \n", "$v_f\\ [{\\rm km/s}]$ ${505.49}_{-313.59}^{+611.73}$ \n", "\n", " Prior \n", "Parameter \n", "$\\chi_1$ $\\text{Uniform} [0, 0.99]$ \n", "$\\chi_2$ $\\text{Uniform} [0, 0.99]$ \n", "$\\phi$ $\\text{Uniform} [0, 6.28]$ \n", "$\\mathcal{M}_{c}^{\\rm det}\\ [M_{\\odot}]$ $\\text{UniformInComponentsChirpMass} [12, 400]$ \n", "$t_c\\ [s]$ $\\text{Uniform} [1239917954.16, 1239917954.36]$ \n", "$d_L\\ [Mpc]$ $\\text{UniformSourceFrame} [100.0, 10000.0]$ \n", "$q$ $\\text{UniformInComponentsMassRatio} [0.17, 1]$ \n", "$\\phi$ $\\text{Uniform} [0, 6.28]$ \n", "$\\phi_{12}$ $\\text{Uniform} [0, 6.28]$ \n", "$\\phi_{\\mathrm{JL}}$ $\\text{Uniform} [0, 6.28]$ \n", "$\\psi$ $\\text{Uniform} [0, 3.14]$ \n", "$\\theta_{\\mathrm{JN}}$ $\\text{Sine} [0, 3.14]$ \n", "$\\theta_1$ $\\text{Sine} [0, 3.14]$ \n", "$\\theta_2$ $\\text{Sine} [0, 3.14]$ \n", "${M}^{\\rm det}\\ [M_{\\odot}]$ $\\text{Constraint} [60, 400]$ \n", "$\\theta$ $\\text{Sine} [0, 3.14]$ \n", "$m_1^{\\rm src}\\ [M_{\\odot}]$ $-$ \n", "$m_2^{\\rm src}\\ [M_{\\odot}]$ $-$ \n", "$\\chi_{\\mathrm{eff}}$ $-$ \n", "$\\chi_{\\mathrm{p}}$ $-$ \n", "$\\alpha$ $-$ \n", "$\\delta$ $-$ \n", "$M_f^{\\rm src}\\ [M_{\\odot}]$ $-$ \n", "$\\chi_f$ $-$ \n", "$v_f\\ [{\\rm km/s}]$ $-$ " ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "nrsur_result.summary()" ] }, { "cell_type": "markdown", "id": "17abec8a", "metadata": {}, "source": [ "\n", "\n", "| Parameter | Posterior 90% CI | Prior |\n", "|:-----------------------------------------|:----------------------------------|:------------------------------------------------|\n", "| $\\chi_1$ | ${0.44}_{-0.30}^{+0.34}$ | $\\text{Uniform} [0, 0.99]$ |\n", "| $\\chi_2$ | ${0.47}_{-0.32}^{+0.34}$ | $\\text{Uniform} [0, 0.99]$ |\n", "| $\\phi$ | ${1.82}_{-0.55}^{+0.67}$ | $\\text{Uniform} [0, 6.28]$ |\n", "| $\\mathcal{M}_{c}^{\\rm det}\\ [M_{\\odot}]$ | ${46.06}_{-3.42}^{+3.39}$ | $\\text{UniformInComponentsChirpMass} [12, 400]$ |\n", "| $t_c\\ [s]$ | ${1239917954.23}_{-0.00}^{+0.00}$ | $\\text{Uniform} [1239917954.16, 1239917954.36]$ |\n", "| $d_L\\ [Mpc]$ | ${2597.29}_{-803.51}^{+867.12}$ | $\\text{UniformSourceFrame} [100.0, 10000.0]$ |\n", "| $q$ | ${0.79}_{-0.19}^{+0.15}$ | $\\text{UniformInComponentsMassRatio} [0.17, 1]$ |\n", "| $\\phi$ | ${3.14}_{-2.20}^{+2.13}$ | $\\text{Uniform} [0, 6.28]$ |\n", "| $\\phi_{12}$ | ${3.18}_{-2.20}^{+2.14}$ | $\\text{Uniform} [0, 6.28]$ |\n", "| $\\phi_{\\mathrm{JL}}$ | ${2.91}_{-1.72}^{+2.28}$ | $\\text{Uniform} [0, 6.28]$ |\n", "| $\\psi$ | ${1.59}_{-1.01}^{+0.99}$ | $\\text{Uniform} [0, 3.14]$ |\n", "| $\\theta_{\\mathrm{JN}}$ | ${2.16}_{-1.56}^{+0.54}$ | $\\text{Sine} [0, 3.14]$ |\n", "| $\\theta_1$ | ${1.77}_{-0.60}^{+0.59}$ | $\\text{Sine} [0, 3.14]$ |\n", "| $\\theta_2$ | ${1.80}_{-0.69}^{+0.62}$ | $\\text{Sine} [0, 3.14]$ |\n", "| ${M}^{\\rm det}\\ [M_{\\odot}]$ | ${107.67}_{-7.02}^{+7.46}$ | $\\text{Constraint} [60, 400]$ |\n", "| $\\theta$ | ${2.19}_{-0.06}^{+0.07}$ | $\\text{Sine} [0, 3.14]$ |\n", "| $m_1^{\\rm src}\\ [M_{\\odot}]$ | ${41.93}_{-4.58}^{+5.80}$ | $-$ |\n", "| $m_2^{\\rm src}\\ [M_{\\odot}]$ | ${32.19}_{-5.53}^{+4.93}$ | $-$ |\n", "| $\\chi_{\\mathrm{eff}}$ | ${-0.08}_{-0.15}^{+0.13}$ | $-$ |\n", "| $\\chi_{\\mathrm{p}}$ | ${0.47}_{-0.23}^{+0.27}$ | $-$ |\n", "| $\\alpha$ | ${3.46}_{-0.29}^{+0.13}$ | $-$ |\n", "| $\\delta$ | ${-0.73}_{-0.50}^{+0.41}$ | $-$ |\n", "| $M_f^{\\rm src}\\ [M_{\\odot}]$ | ${102.83}_{-6.42}^{+6.78}$ | $-$ |\n", "| $\\chi_f$ | ${0.66}_{-0.06}^{+0.05}$ | $-$ |\n", "| $v_f\\ [{\\rm km/s}]$ | ${505.49}_{-313.59}^{+611.73}$ | $-$ |\n", "\n", "\n", "_Note: For most events the kick inference is dominated by the prior itself, see Figs. 10 and 11 of [Islam et al, 2023](https://arxiv.org/abs/2309.14473)._" ] }, { "cell_type": "markdown", "id": "4c26956a", "metadata": {}, "source": [ "Lets make some plots!" ] }, { "cell_type": "code", "execution_count": 5, "id": "f30ec021", "metadata": { "ploomber": { "memory_usage": 525.203125, "timestamp_end": 1695851892.069668, "timestamp_start": 1695851892.037033 }, "tags": [ "hide-input", "remove-output" ] }, "outputs": [], "source": [ "# NRSurrogate corner plots\n", "\n", "import os\n", "\n", "param_sets = dict(\n", " mass=[\"mass_1_source\", \"mass_2_source\", \"mass_ratio\"],\n", " spin=[\"a_1\", \"a_2\", \"tilt_1\", \"tilt_2\"],\n", " effective_spin=[\"mass_ratio\", \"chi_eff\", \"chi_p\"],\n", " sky_localisation=[\"luminosity_distance\", \"ra\", \"dec\"],\n", " remnant=[\"final_mass\", \"final_spin\", \"final_kick\"],\n", ")\n", "for name, params in param_sets.items():\n", " fname = f\"GW190421_213856_{name}_corner.png\"\n", " if not os.path.isfile(fname):\n", " fig = nrsur_result.plot_corner(params)\n", " fig.savefig(fname)\n", "\n", " if name == \"remnant\":\n", " continue\n", "\n", " # LVK-Comparison plots\n", " fname = f\"GW190421_213856_compare_{name}_corner.png\"\n", " if not os.path.isfile(fname):\n", " fig = nrsur_result.plot_lvk_comparison_corner(params)\n", " fig.savefig(fname)\n" ] }, { "cell_type": "markdown", "id": "8f718e03", "metadata": {}, "source": [ "## Corner Plots\n", "\n", "\n", "Corner plots of the NRSurCat-1 posteriors. The plots along the diagonal display the 1D marginalized posteriors, with the median values and the central $1\\sigma$ credible regions indicated as text. The contour plots display the joint 2D posteriors at the $1,2,3\\sigma$ regions. The LVK posteriors are plotted using the IMRPhenomXPHM samples obtained from the the [GWTC-2.1](https://zenodo.org/record/6513631) and [GWTC-3](https://zenodo.org/record/5546663) zenodo releases. \n", "\n", "### Mass\n", "\n", "\n", "::::{tab-set}\n", "\n", ":::{tab-item} NRSurrogate\n", ":sync: key1\n", "\n", "![\"GW190421_213856_mass_corner.png\"](GW190421_213856_mass_corner.png)\n", ":::\n", "\n", ":::{tab-item} LVK-Comparison\n", ":sync: key2\n", "\n", "![\"GW190421_213856_compare_mass_corner.png\"](GW190421_213856_compare_mass_corner.png)\n", ":::\n", "\n", "::::\n", "\n", "Posterior corner plots for the component masses, and mass-ratio ($m_1^{\\rm src}, m_2^{\\rm src}, q$). Component masses are shown in the source frame.\n", "\n", "\n", "\n", "### Spin\n", "\n", "\n", "::::{tab-set}\n", "\n", ":::{tab-item} NRSurrogate\n", ":sync: key1\n", "\n", "![\"GW190421_213856_spin_corner.png\"](GW190421_213856_spin_corner.png)\n", ":::\n", "\n", ":::{tab-item} LVK-Comparison\n", ":sync: key2\n", "\n", "![\"GW190421_213856_compare_spin_corner.png\"](GW190421_213856_compare_spin_corner.png)\n", ":::\n", "\n", "::::\n", "\n", "Posterior corner plots for the component spin magnitudes ($\\chi_1, \\chi_2$) and tilt angles ($\\theta_1, \\theta_2$).\n", "\n", "\n", "### Effective Spin\n", "\n", "\n", "::::{tab-set}\n", "\n", ":::{tab-item} NRSurrogate\n", ":sync: key1\n", "\n", "![\"GW190421_213856_effective_spin_corner.png\"](GW190421_213856_effective_spin_corner.png)\n", ":::\n", "\n", ":::{tab-item} LVK-Comparison\n", ":sync: key2\n", "\n", "![\"GW190421_213856_compare_effective_spin_corner.png\"](GW190421_213856_compare_effective_spin_corner.png)\n", ":::\n", "\n", "::::\n", "\n", "Posterior corner plots for the mass-ratio $q$, effective spin $\\chi_{\\rm eff}$ and the transverse spin precession parameters $\\chi_p$.\n", "\n", "\n", "### Sky-localisation\n", "\n", "\n", "::::{tab-set}\n", "\n", ":::{tab-item} NRSurrogate\n", ":sync: key1\n", "\n", "![\"GW190421_213856_sky_localisation_corner.png\"](GW190421_213856_sky_localisation_corner.png)\n", ":::\n", "\n", ":::{tab-item} LVK-Comparison\n", ":sync: key2\n", "\n", "![\"GW190421_213856_compare_sky_localisation_corner.png\"](GW190421_213856_compare_sky_localisation_corner.png)\n", ":::\n", "\n", "::::\n", "\n", "Posterior corner plots for the luminosity distance, ra and dec ($d_L, \\alpha, \\delta$).\n", "\n", "\n", "\n", "### Remnant\n", "\n", "![\"GW190421_213856_remnant_corner.png\"](GW190421_213856_remnant_corner.png)\n", "\n", "\n", "Posterior corner plots for the remnant mass, remnant spin magnitude and kick ($M_f^{\\rm src}, \\chi_f, v_f$)." ] }, { "cell_type": "markdown", "id": "6a0a4c1a", "metadata": { "tags": [ "remove-cell" ] }, "source": [ "## Waveform posterior-predictive plot\n", "\n", "This is a plot of waveforms generated using 1000 random posterior samples from the event's posterior." ] }, { "cell_type": "code", "execution_count": 6, "id": "e52fcdc3", "metadata": { "lines_to_next_cell": 2, "ploomber": { "memory_usage": 525.203125, "timestamp_end": 1695851892.101544, "timestamp_start": 1695851892.069761 }, "tags": [ "hide-input", "remove-output", "remove-cell" ] }, "outputs": [], "source": [ "fname = f\"GW190421_213856_waveform.png\"\n", "if not os.path.isfile(fname):\n", " fig = nrsur_result.plot_signal(outdir=\".\")" ] }, { "cell_type": "markdown", "id": "764d6da0", "metadata": { "lines_to_next_cell": 2, "tags": [ "remove-cell" ] }, "source": [ "![waveform](GW190421_213856_waveform.png)" ] }, { "cell_type": "markdown", "id": "766bf8d0", "metadata": { "lines_to_next_cell": 2, "tags": [ "full-width" ] }, "source": [ "## Animations \n", "Here are some animations of the posterior.\n", "\n", "|Spin | \n", "|-----------|\n", "| | \n", "\n", "Posterior samples for the dimensionless spin vectors ($\\chi_1, \\chi_2$) \n", "of the component black holes. Each purple marker indicates a posterior sample; \n", "an arrow drawn from the origin to the marker would show the spin vector. \n", "The outer radii of the spheres correspond to the maximum spin magnitude of 1. \n", "The spins are shown in the \"wave frame\" defined at a reference frequency of 20 Hz. \n", "The x-axis (orange) and y-axis (green) are shown as arrows near the origin; \n", "the x-y plane is orthogonal to the orbital angular momentum direction. \n", "The color reflects posterior probability density.\n", "\n", "|Remnant | \n", "|-----------|\n", "| | \n", "\n", "Posterior samples for the dimensionless spin vector $\\chi_f$ and the recoil kick velocity \n", "$v_f$, (units of km/s). Each purple marker indicates a posterior sample; \n", "an arrow drawn from the origin to the marker would show the spin or kick vector. \n", "For the spin, the outer radii of the spheres correspond to the maximum spin magnitude of 1. \n", "For the kick, the outer radius of the sphere corresponds to a kick magnitude of 2500 km/s.\n", "The remnant spin and kick are shown in the \"wave frame\" defined at a \n", "reference time of -100 $M^{\\rm det}\\ [M_{\\odot}]$ before the peak waveform amplitude,\n", "where $M^{\\rm det}$ is the detector frame total mass.\n" ] }, { "cell_type": "markdown", "id": "c12d1d02", "metadata": {}, "source": [ "## Analysis configs\n", "Below are the configs used for the analysis of this job.\n" ] }, { "cell_type": "code", "execution_count": 7, "id": "0aaf1947", "metadata": { "ploomber": { "memory_usage": 525.23046875, "timestamp_end": 1695851892.134061, "timestamp_start": 1695851892.10164 }, "tags": [ "output_scroll" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Tmax: 10000\n", "accounting: None\n", "accounting_user: None\n", "adapt: False\n", "allow_tape: True\n", "analysis_executable: None\n", "analysis_executable_parser: None\n", "autocorr_c: 5.0\n", "autocorr_tol: 50.0\n", "bilby_zero_likelihood_mode: False\n", "burn_in_nact: 50.0\n", "calibration_model: CubicSpline\n", "calibration_prior_boundary: reflective\n", "catch_waveform_errors: True\n", "channel_dict: {H1:DCS-CALIB_STRAIN_CLEAN_SUB60HZ_C01, L1:DCS-CALIB_STRAIN_CLEAN_SUB60HZ_C01}\n", "check_point_deltaT: 3600\n", "clean: False\n", "coherence_test: False\n", "conda_env: None\n", "condor_job_priority: 0\n", "conversion_function: None\n", "create_summary: True\n", "data_dict: {H1:/anvil/projects/x-phy990007n/vvarma/Work/Projects/Current/NRSurCatalog/runs/GWTC/Data/GW190421_213856/H1_data.gwf, L1:/anvil/projects/x-phy990007n/vvarma/Work/Projects/Current/NRSurCatalog/runs/GWTC/Data/GW190421_213856/L1_data.gwf}\n", "data_dump_file: None\n", "data_format: None\n", "default_prior: BBHPriorDict\n", "deltaT: 0.2\n", "desired_sites: None\n", "detectors: ['H1', 'L1']\n", "distance_marginalization: True\n", "distance_marginalization_lookup_table: None\n", "dlogz: 0.1\n", "do_not_save_bounds_in_resume: False\n", "duration: 4.0\n", "dynesty_bound: multi\n", "dynesty_sample: rwalk\n", "email: None\n", "enforce_signal_duration: False\n", "enlarge: 1.5\n", "existing_dir: None\n", "extra_likelihood_kwargs: None\n", "extra_lines: job-name=GW190421_213856 mail-user=sfield@umassd.edu mail-type=END\n", "facc: 0.5\n", "fast_mpi: False\n", "final_result: True\n", "final_result_nsamples: 20000\n", "frac_threshold: 0.01\n", "frequency_domain_source_model: lal_binary_black_hole\n", "gaussian_noise: False\n", "generation_function: None\n", "generation_seed: None\n", "gps_file: None\n", "gps_tuple: None\n", "idx: 0\n", "ignore_gwpy_data_quality_check: True\n", "ini: GW190421_213856_config.ini\n", "injection: False\n", "injection_dict: None\n", "injection_file: None\n", "injection_numbers: None\n", "injection_waveform_approximant: None\n", "injection_waveform_arguments: None\n", "jitter_time: True\n", "label: GW190421_213856_NRSur7dq4\n", "likelihood_type: GravitationalWaveTransient\n", "local: False\n", "local_generation: False\n", "local_plot: False\n", "log_directory: None\n", "max_iterations: 100000\n", "max_its: 10000000000\n", "max_run_time: 10000000000.0\n", "maximum_frequency: 448.000000\n", "maxmcmc: 5000\n", "mem_per_cpu: None\n", "min_eff: 10\n", "min_tau: 30\n", "minimum_frequency: {H1:20.000000, L1:20.000000, waveform: 0}\n", "mode_array: None\n", "mpi_timing: False\n", "mpi_timing_interval: 0\n", "n_check_point: 100\n", "n_effective: inf\n", "n_parallel: 4\n", "n_simulation: 0\n", "nact: 50\n", "ncheck: 500\n", "nestcheck: False\n", "nfrac: 5\n", "nlive: 2000\n", "no_plot: False\n", "nodes: 1\n", "notification: Never\n", "nsamples: 10000\n", "ntasks_per_node: 128\n", "ntemps: 20\n", "numerical_relativity_file: None\n", "nwalkers: 100\n", "online_pe: False\n", "osg: False\n", "outdir: NRSur7dq4_run\n", "overwrite_outdir: False\n", "periodic_restart_time: 28800\n", "phase_marginalization: False\n", "plot_calibration: False\n", "plot_corner: False\n", "plot_data: True\n", "plot_format: png\n", "plot_injection: True\n", "plot_marginal: False\n", "plot_skymap: False\n", "plot_spectrogram: True\n", "plot_trace: True\n", "plot_waveform: False\n", "pn_amplitude_order: 0\n", "pn_phase_order: -1\n", "pn_spin_order: -1\n", "pn_tidal_order: -1\n", "post_trigger_duration: 2.0\n", "postprocessing_arguments: None\n", "postprocessing_executable: None\n", "prior_dict: {mass-ratio: bilby.gw.prior.UniformInComponentsMassRatio(name='mass_ratio', minimum= 0.167 , maximum=1), chirp_mass = bilby.gw.prior.UniformInComponentsChirpMass(name='chirp_mass', minimum=12, maximum=400), total_mass = Constraint(name='total_mass', minimum=60, maximum=400), a_1 = Uniform(name='a_1', minimum=0, maximum=0.99), a_2 = Uniform(name='a_2', minimum=0, maximum=0.99), tilt_1 = Sine(name='tilt_1'), tilt_2 = Sine(name='tilt_2'), phi_12 = Uniform(name='phi_12', minimum=0, maximum=2 * np.pi, boundary='periodic'), phi_jl = Uniform(name='phi_jl', minimum=0, maximum=2 * np.pi, boundary='periodic'), dec = Cosine(name='dec'), ra = Uniform(name='ra', minimum=0, maximum=2 * np.pi, boundary='periodic'), theta_jn = Sine(name='theta_jn'), luminosity_distance = bilby.gw.prior.UniformSourceFrame(name='luminosity_distance', minimum=100.0, maximum=10000.0), psi = Uniform(name='psi', minimum=0, maximum=np.pi, boundary='periodic'), phase = Uniform(name='phase', minimum=0, maximum=2 * np.pi, boundary='periodic')}\n", "prior_file: None\n", "psd_dict: {H1:/anvil/projects/x-phy990007n/vvarma/Work/Projects/Current/NRSurCatalog/runs/GWTC/Data/GW190421_213856/H1_PSD.dat, L1:/anvil/projects/x-phy990007n/vvarma/Work/Projects/Current/NRSurCatalog/runs/GWTC/Data/GW190421_213856/L1_PSD.dat}\n", "psd_fractional_overlap: 0.5\n", "psd_length: 32\n", "psd_maximum_duration: 1024\n", "psd_method: median\n", "psd_start_time: None\n", "reference_frame: H1L1\n", "reference_frequency: 20.0\n", "request_cpus: 1\n", "request_disk: 1.0\n", "request_memory: 4.0\n", "request_memory_generation: None\n", "resampling_method: lal\n", "result_format: hdf5\n", "roq_folder: None\n", "roq_scale_factor: 1\n", "roq_weights: None\n", "rotate_checkpoints: False\n", "safety: 1.0\n", "sampler: dynesty\n", "sampler_kwargs: Default\n", "sampling_frequency: 1024.0\n", "sampling_seed: None\n", "scheduler: condor\n", "scheduler_analysis_time: 7-00:00:00\n", "scheduler_args: None\n", "scheduler_env: None\n", "scheduler_module: None\n", "single_postprocessing_arguments: None\n", "single_postprocessing_executable: None\n", "slurm_extra_lines: partition=wholenode account=phy990002\n", "spline_calibration_amplitude_uncertainty_dict: None\n", "spline_calibration_envelope_dict: {H1:/anvil/projects/x-phy990007n/vvarma/Work/Projects/Current/NRSurCatalog/runs/GWTC/Data/GW190421_213856/H1_CalEnv.dat, L1:/anvil/projects/x-phy990007n/vvarma/Work/Projects/Current/NRSurCatalog/runs/GWTC/Data/GW190421_213856/L1_CalEnv.dat}\n", "spline_calibration_nodes: 10\n", "spline_calibration_phase_uncertainty_dict: None\n", "submit: True\n", "summarypages_arguments: {'nsamples_for_skymap': 5000, 'multi_process':8}\n", "thin_by_nact: 1.0\n", "time: 42:00:00\n", "time_marginalization: False\n", "time_reference: geocent\n", "timeslide_dict: None\n", "timeslide_file: None\n", "transfer_files: True\n", "trigger_time: 1239917954.260254\n", "tukey_roll_off: 0.4\n", "verbose: False\n", "vol_check: 8\n", "vol_dec: 0.5\n", "walks: 100\n", "waveform_approximant: NRSur7dq4\n", "waveform_arguments_dict: None\n", "waveform_generator: bilby.gw.waveform_generator.WaveformGenerator\n", "webdir: summary\n", "weight_file: None\n", "zero_noise: False\n" ] } ], "source": [ "nrsur_result.print_configs()\n" ] }, { "cell_type": "markdown", "id": "11b48cf7", "metadata": {}, "source": [ "## Comments\n", "\n", "This has been made with `nrsur_catalog` version 0.0.5.\n", "If you used this data, please [cite this work](citation_section).\n", "\n", "Leave a comment in this [issue](https://github.com/nrsur-catalog/NRSurCat-1/issues/new?title=GW190421_213856)." ] } ], "metadata": { "jupytext": { "formats": "ipynb,py:light" }, "kernelspec": { "display_name": "nrsur", "language": "python", "name": "nrsur" } }, "nbformat": 4, "nbformat_minor": 5 }