{ "cells": [ { "cell_type": "markdown", "id": "4ef06b9f", "metadata": {}, "source": [ "## Computing Remnant Properties from Eccentric SXS Simulations\n", "\n", "This notebook loads eccentric SXS simulations, computes remnant properties with `gw_remnant`, and compares against the remnant properties in the SXS simulation metadata.\n", "\n", "Two approaches are demonstrated:\n", "- **Section 2**: Supply `E_initial` and `L_initial` from the NR metadata (exact initial conditions).\n", "- **Section 3**: Let `gw_remnant` compute `E_initial` and `L_initial` from its built-in PN expressions, passing the reference eccentricity via `e_ref`.\n", "\n", "Requires `pip install gw_remnant[nr]`.\n", "\n", "Contact: Tousif Islam [tousifislam24@gmail.com]" ] }, { "cell_type": "markdown", "id": "edfe4a6e", "metadata": {}, "source": [ "### 1. Setup" ] }, { "cell_type": "code", "execution_count": 1, "id": "dd0d2968", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "lal.MSUN_SI != Msun\n" ] } ], "source": [ "import warnings\n", "warnings.filterwarnings(\"ignore\", \"Wswiglal-redir-stdio\")\n", "\n", "import numpy as np\n", "import sxs\n", "from gw_remnant.gw_remnant_calculator import GWRemnantCalculator" ] }, { "cell_type": "code", "execution_count": 2, "id": "f3851afb", "metadata": {}, "outputs": [], "source": [ "LMAX = 8\n", "\n", "def load_sxs_simulation(name):\n", " \"\"\"Load an SXS simulation and return (time, h_dict, metadata_info).\"\"\"\n", " sim = sxs.load(name)\n", " md = sim.metadata\n", " h = sim.h\n", "\n", " # discard junk radiation before reference time\n", " reference_time = md.get(\"reference_time\", h.t[0])\n", " reference_index = h.index_closest_to(reference_time)\n", " h = h[reference_index:]\n", "\n", " t = np.array(h.t, float)\n", "\n", " h_dict = {}\n", " for l in range(2, LMAX + 1):\n", " for m in range(-l, l + 1):\n", " h_dict[(l, m)] = np.array(h.data[:, h.index(l, m)], complex)\n", "\n", " m1 = md.get(\"reference_mass1\") or md.get(\"initial_mass1\")\n", " m2 = md.get(\"reference_mass2\") or md.get(\"initial_mass2\")\n", " q = m1 / m2 if (m1 and m2) else md.get(\"reference_mass_ratio\")\n", " if q is not None and q < 1:\n", " q = 1.0 / q\n", "\n", " ecc = md.get(\"reference_eccentricity\")\n", " try:\n", " ecc = float(ecc)\n", " except (TypeError, ValueError):\n", " ecc = None\n", "\n", " info = dict(\n", " q=float(q),\n", " ecc=ecc,\n", " M_ADM=float(md[\"initial_ADM_energy\"]),\n", " J_ADM=np.array(md[\"initial_ADM_angular_momentum\"], float),\n", " chi1=np.array(md[\"initial_dimensionless_spin1\"], float),\n", " chi2=np.array(md[\"initial_dimensionless_spin2\"], float),\n", " rem_mass=float(md[\"remnant_mass\"]),\n", " rem_chi=np.array(md[\"remnant_dimensionless_spin\"], float),\n", " kick=np.array(md.get(\"remnant_velocity\", [0, 0, 0]), float),\n", " )\n", " return t, h_dict, info\n", "\n", "\n", "def nr_initial_conditions(info):\n", " \"\"\"Compute E_initial and L_initial from NR metadata.\"\"\"\n", " q = info[\"q\"]\n", " X1, X2 = q / (1 + q), 1 / (1 + q)\n", " S1z = info[\"chi1\"][2] * X1**2\n", " S2z = info[\"chi2\"][2] * X2**2\n", " E_initial = 1.0 - info[\"M_ADM\"]\n", " L_initial = info[\"J_ADM\"][2] - S1z - S2z\n", " return E_initial, L_initial\n", "\n", "\n", "def compare_with_nr(calc, info):\n", " \"\"\"Print a side-by-side comparison of gw_remnant vs SXS metadata.\"\"\"\n", " nr_chi = info[\"rem_chi\"]\n", " nr_kick = np.linalg.norm(info[\"kick\"])\n", "\n", " print(f\"{'Property':<25} {'gw_remnant':>15} {'SXS metadata':>15}\")\n", " print(\"-\" * 57)\n", " print(f\"{'Remnant mass [M]':<25} {calc.remnant_mass:>15.6f} {info['rem_mass']:>15.6f}\")\n", " print(f\"{'Remnant |chi|':<25} {np.linalg.norm(calc.remnant_spin_vector):>15.6f} {np.linalg.norm(nr_chi):>15.6f}\")\n", " print(f\"{'Remnant spin (z)':<25} {calc.remnant_spin:>15.6f} {nr_chi[2]:>15.6f}\")\n", " print(f\"{'Kick velocity [c]':<25} {calc.remnant_kick:>15.6f} {nr_kick:>15.6f}\")\n", " print(f\"{'Spin vector':<25} {np.array2string(calc.remnant_spin_vector, precision=4)}\")\n", " print(f\"{'':25} {np.array2string(nr_chi, precision=4)} (SXS)\")" ] }, { "cell_type": "code", "execution_count": 3, "id": "c1db7f72", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Loading SXS:BBH:3971 (non-spinning (low ecc))...\n", "Loading SXS simulations using latest tag 'v3.0.0', published at 2025-05-14T18:17:30Z.\n", " q = 1.000, ecc = 0.0407\n", " chi1 = [ 0. -0. -0.], chi2 = [-0. -0. -0.]\n", " Time range: [460.1, 5363.5] M\n", "\n", "Loading SXS:BBH:3972 (non-spinning (high ecc))...\n", " q = 1.000, ecc = 0.4032\n", " chi1 = [-0. -0. 0.], chi2 = [-0. 0. -0.]\n", " Time range: [1139.9, 11242.7] M\n", "\n", "Loading SXS:BBH:3712 (precessing)...\n", " q = 1.252, ecc = 0.0729\n", " chi1 = [-0.016 -0.331 -0.036], chi2 = [0.188 0.291 0.732]\n", " Time range: [487.0, 3320.5] M\n", "\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Loading SXS simulations using latest tag 'v3.0.0', published at 2025-05-14T18:17:30Z.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ " q = 1.000, ecc = 0.0407\n", " chi1 = [ 0. -0. -0.], chi2 = [-0. -0. -0.]\n", " Time range: [460.1, 5363.5] M\n", "\n", "Loading SXS:BBH:3972 (non-spinning (high ecc))...\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ " q = 1.000, ecc = 0.4032\n", " chi1 = [-0. -0. 0.], chi2 = [-0. 0. -0.]\n", " Time range: [1139.9, 11242.7] M\n", "\n", "Loading SXS:BBH:3712 (precessing)...\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ " q = 1.252, ecc = 0.0729\n", " chi1 = [-0.016 -0.331 -0.036], chi2 = [0.188 0.291 0.732]\n", " Time range: [487.0, 3320.5] M\n", "\n" ] } ], "source": [ "sims = {\n", " \"non-spinning (low ecc)\": \"SXS:BBH:3971\",\n", " \"non-spinning (high ecc)\": \"SXS:BBH:3972\",\n", " \"precessing\": \"SXS:BBH:3712\",\n", "}\n", "\n", "data = {}\n", "for label, name in sims.items():\n", " print(f\"Loading {name} ({label})...\")\n", " t, h_dict, info = load_sxs_simulation(name)\n", " data[label] = (t, h_dict, info)\n", " print(f\" q = {info['q']:.3f}, ecc = {info['ecc']:.4f}\")\n", " print(f\" chi1 = {np.round(info['chi1'], 3)}, chi2 = {np.round(info['chi2'], 3)}\")\n", " print(f\" Time range: [{t[0]:.1f}, {t[-1]:.1f}] M\")\n", " print()" ] }, { "cell_type": "markdown", "id": "d3eb1b29", "metadata": {}, "source": [ "---\n", "### 2. Using E_initial and L_initial from NR metadata\n", "\n", "Here we supply the initial binding energy and orbital angular momentum directly from the SXS metadata:\n", "- `E_initial = 1 - M_ADM`\n", "- `L_initial = J_ADM_z - S1_z - S2_z`\n", "\n", "This gives the most accurate remnant mass since it uses the exact ADM energy." ] }, { "cell_type": "markdown", "id": "8eee3d67", "metadata": {}, "source": [ "#### 2a. Non-spinning, low eccentricity" ] }, { "cell_type": "code", "execution_count": 4, "id": "12d17db1", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "SXS:BBH:3971: q = 1.000, ecc = 0.0407\n", " E_initial = 0.007166, L_initial = 1.118046\n", "==================================================\n", "Remnant Properties Summary\n", "==================================================\n", "Mass ratio : 1.000\n", "Initial mass : 1.00000000 M\n", "Total energy radiated : 0.03949449 M\n", "Peak luminosity : 0.00097531\n", "Remnant mass : 0.95333993 M\n", "Remnant spin (dimensionless) : 0.70637563\n", "Remnant spin vector (x,y,z) : (0.00000000, -0.00000000, 0.70637563)\n", "Remnant kick velocity : 0.00000000 c\n", "Remnant kick velocity : 0.00 km/s\n", "Remnant kick vector (x,y,z) : (-0.00000000, 0.00000000, 0.00000000) c\n", "Remnant displacement (x,y,z) : (-0.00000009, 0.00000048, 0.00000051) M\n", "==================================================\n", "Property gw_remnant SXS metadata\n", "---------------------------------------------------------\n", "Remnant mass [M] 0.953340 0.951621\n", "Remnant |chi| 0.706376 0.686648\n", "Remnant spin (z) 0.706376 0.686648\n", "Kick velocity [c] 0.000000 0.000000\n", "Spin vector [ 4.0653e-11 -1.4600e-10 7.0638e-01]\n", " [-6.8953e-11 1.6464e-10 6.8665e-01] (SXS)\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/var/folders/9k/xlxjfz4d2cz1063spty94p0r0000gq/T/ipykernel_23618/76828473.py:6: UserWarning: Tips: If you are using NR waveforms, ensure that they do not contain junk radiation, as that is known to corrupt the remnant property estimation.\n", " calc = GWRemnantCalculator(time=t, h_dict=h_dict, q=info[\"q\"],\n" ] } ], "source": [ "t, h_dict, info = data[\"non-spinning (low ecc)\"]\n", "E_init, L_init = nr_initial_conditions(info)\n", "print(f\"{sims['non-spinning (low ecc)']}: q = {info['q']:.3f}, ecc = {info['ecc']:.4f}\")\n", "print(f\" E_initial = {E_init:.6f}, L_initial = {L_init:.6f}\")\n", "\n", "calc = GWRemnantCalculator(time=t, h_dict=h_dict, q=info[\"q\"],\n", " chi1=list(info[\"chi1\"]), chi2=list(info[\"chi2\"]),\n", " E_initial=E_init, L_initial=L_init)\n", "calc.print_remnants()\n", "compare_with_nr(calc, info)" ] }, { "cell_type": "markdown", "id": "7e1ea91e", "metadata": {}, "source": [ "#### 2b. Non-spinning, high eccentricity" ] }, { "cell_type": "code", "execution_count": 5, "id": "5aed1553", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "SXS:BBH:3972: q = 1.000, ecc = 0.4032\n", " E_initial = 0.004994, L_initial = 1.198603\n", "==================================================\n", "Remnant Properties Summary\n", "==================================================\n", "Mass ratio : 1.000\n", "Initial mass : 1.00000000 M\n", "Total energy radiated : 0.04258557 M\n", "Peak luminosity : 0.00102816\n", "Remnant mass : 0.95242072 M\n", "Remnant spin (dimensionless) : 0.70022783\n", "Remnant spin vector (x,y,z) : (0.00000000, -0.00000000, 0.70022783)\n", "Remnant kick velocity : 0.00000001 c\n", "Remnant kick velocity : 0.00 km/s\n", "Remnant kick vector (x,y,z) : (0.00000001, -0.00000001, 0.00000000) c\n", "Remnant displacement (x,y,z) : (0.00000325, -0.00000187, 0.00000004) M\n", "==================================================\n", "Property gw_remnant SXS metadata\n", "---------------------------------------------------------\n", "Remnant mass [M] 0.952421 0.951787\n", "Remnant |chi| 0.700228 0.688662\n", "Remnant spin (z) 0.700228 0.688662\n", "Kick velocity [c] 0.000000 0.000000\n", "Spin vector [ 2.4232e-11 -5.0568e-11 7.0023e-01]\n", " [-2.5855e-11 4.3417e-11 6.8866e-01] (SXS)\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/var/folders/9k/xlxjfz4d2cz1063spty94p0r0000gq/T/ipykernel_23618/1384759221.py:6: UserWarning: Tips: If you are using NR waveforms, ensure that they do not contain junk radiation, as that is known to corrupt the remnant property estimation.\n", " calc = GWRemnantCalculator(time=t, h_dict=h_dict, q=info[\"q\"],\n" ] } ], "source": [ "t, h_dict, info = data[\"non-spinning (high ecc)\"]\n", "E_init, L_init = nr_initial_conditions(info)\n", "print(f\"{sims['non-spinning (high ecc)']}: q = {info['q']:.3f}, ecc = {info['ecc']:.4f}\")\n", "print(f\" E_initial = {E_init:.6f}, L_initial = {L_init:.6f}\")\n", "\n", "calc = GWRemnantCalculator(time=t, h_dict=h_dict, q=info[\"q\"],\n", " chi1=list(info[\"chi1\"]), chi2=list(info[\"chi2\"]),\n", " E_initial=E_init, L_initial=L_init)\n", "calc.print_remnants()\n", "compare_with_nr(calc, info)" ] }, { "cell_type": "markdown", "id": "58014b27", "metadata": {}, "source": [ "#### 2c. Precessing, eccentric" ] }, { "cell_type": "code", "execution_count": 6, "id": "0fcd0a45", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "SXS:BBH:3712: q = 1.252, ecc = 0.0729\n", " E_initial = 0.008075, L_initial = 1.030219\n", "==================================================\n", "Remnant Properties Summary\n", "==================================================\n", "Mass ratio : 1.252\n", "Initial mass : 1.00000000 M\n", "Total energy radiated : 0.04747640 M\n", "Peak luminosity : 0.00114379\n", "Remnant mass : 0.94444837 M\n", "Remnant spin (dimensionless) : 0.77238009\n", "Remnant spin vector (x,y,z) : (0.02686384, -0.03576397, 0.77238009)\n", "Remnant kick velocity : 0.00075243 c\n", "Remnant kick velocity : 225.57 km/s\n", "Remnant kick vector (x,y,z) : (0.00056890, -0.00026982, -0.00041195) c\n", "Remnant displacement (x,y,z) : (0.06677721, -0.03921815, -0.06489974) M\n", "==================================================\n", "Property gw_remnant SXS metadata\n", "---------------------------------------------------------\n", "Remnant mass [M] 0.944448 0.944022\n", "Remnant |chi| 0.773674 0.754679\n", "Remnant spin (z) 0.772380 0.753761\n", "Kick velocity [c] 0.000752 0.000821\n", "Spin vector [ 0.0269 -0.0358 0.7724]\n", " [ 0.0269 -0.0257 0.7538] (SXS)\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/var/folders/9k/xlxjfz4d2cz1063spty94p0r0000gq/T/ipykernel_23618/2075057483.py:6: UserWarning: Tips: If you are using NR waveforms, ensure that they do not contain junk radiation, as that is known to corrupt the remnant property estimation.\n", " calc = GWRemnantCalculator(time=t, h_dict=h_dict, q=info[\"q\"],\n" ] } ], "source": [ "t, h_dict, info = data[\"precessing\"]\n", "E_init, L_init = nr_initial_conditions(info)\n", "print(f\"{sims['precessing']}: q = {info['q']:.3f}, ecc = {info['ecc']:.4f}\")\n", "print(f\" E_initial = {E_init:.6f}, L_initial = {L_init:.6f}\")\n", "\n", "calc = GWRemnantCalculator(time=t, h_dict=h_dict, q=info[\"q\"],\n", " chi1=list(info[\"chi1\"]), chi2=list(info[\"chi2\"]),\n", " E_initial=E_init, L_initial=L_init)\n", "calc.print_remnants()\n", "compare_with_nr(calc, info)" ] }, { "cell_type": "markdown", "id": "6c728fd4", "metadata": {}, "source": [ "---\n", "### 3. Using native PN E_initial and L_initial\n", "\n", "Here we let `gw_remnant` compute the initial energy and angular momentum from its built-in post-Newtonian expressions. For eccentric orbits, the reference eccentricity is passed via `e_ref` so that the PN expressions (SEOBNRv5EHM-based, valid for eccentric orbits and aligned spins to 3PN) account for the eccentricity." ] }, { "cell_type": "markdown", "id": "21681fcc", "metadata": {}, "source": [ "#### 3a. Non-spinning, low eccentricity" ] }, { "cell_type": "code", "execution_count": 7, "id": "f07fd81d", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "SXS:BBH:3971: e_ref = 0.0407\n", " PN E_initial = 0.007415, PN L_initial = 1.102606\n", "==================================================\n", "Remnant Properties Summary\n", "==================================================\n", "Mass ratio : 1.000\n", "Initial mass : 1.00000000 M\n", "Total energy radiated : 0.03949449 M\n", "Peak luminosity : 0.00097531\n", "Remnant mass : 0.95309092 M\n", "Remnant spin (dimensionless) : 0.68974664\n", "Remnant spin vector (x,y,z) : (0.00000000, -0.00000000, 0.68974664)\n", "Remnant kick velocity : 0.00000000 c\n", "Remnant kick velocity : 0.00 km/s\n", "Remnant kick vector (x,y,z) : (-0.00000000, 0.00000000, 0.00000000) c\n", "Remnant displacement (x,y,z) : (-0.00000009, 0.00000048, 0.00000051) M\n", "==================================================\n", "Property gw_remnant SXS metadata\n", "---------------------------------------------------------\n", "Remnant mass [M] 0.953091 0.951621\n", "Remnant |chi| 0.689747 0.686648\n", "Remnant spin (z) 0.689747 0.686648\n", "Kick velocity [c] 0.000000 0.000000\n", "Spin vector [ 4.0674e-11 -1.4607e-10 6.8975e-01]\n", " [-6.8953e-11 1.6464e-10 6.8665e-01] (SXS)\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/var/folders/9k/xlxjfz4d2cz1063spty94p0r0000gq/T/ipykernel_23618/2539476334.py:3: UserWarning: Tips: If you are using NR waveforms, ensure that they do not contain junk radiation, as that is known to corrupt the remnant property estimation.\n", " calc = GWRemnantCalculator(time=t, h_dict=h_dict, q=info[\"q\"],\n" ] } ], "source": [ "t, h_dict, info = data[\"non-spinning (low ecc)\"]\n", "\n", "calc = GWRemnantCalculator(time=t, h_dict=h_dict, q=info[\"q\"],\n", " chi1=list(info[\"chi1\"]), chi2=list(info[\"chi2\"]),\n", " e_ref=info[\"ecc\"])\n", "print(f\"{sims['non-spinning (low ecc)']}: e_ref = {info['ecc']:.4f}\")\n", "print(f\" PN E_initial = {calc.E_initial:.6f}, PN L_initial = {calc.L_initial:.6f}\")\n", "calc.print_remnants()\n", "compare_with_nr(calc, info)" ] }, { "cell_type": "markdown", "id": "5bec6a37", "metadata": {}, "source": [ "#### 3b. Non-spinning, high eccentricity" ] }, { "cell_type": "code", "execution_count": 8, "id": "ffa1d3a3", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "SXS:BBH:3972: e_ref = 0.4032\n", " PN E_initial = 0.005595, PN L_initial = 1.163696\n", "==================================================\n", "Remnant Properties Summary\n", "==================================================\n", "Mass ratio : 1.000\n", "Initial mass : 1.00000000 M\n", "Total energy radiated : 0.04258557 M\n", "Peak luminosity : 0.00102816\n", "Remnant mass : 0.95181990 M\n", "Remnant spin (dimensionless) : 0.66258257\n", "Remnant spin vector (x,y,z) : (0.00000000, -0.00000000, 0.66258257)\n", "Remnant kick velocity : 0.00000001 c\n", "Remnant kick velocity : 0.00 km/s\n", "Remnant kick vector (x,y,z) : (0.00000001, -0.00000001, 0.00000000) c\n", "Remnant displacement (x,y,z) : (0.00000325, -0.00000187, 0.00000004) M\n", "==================================================\n", "Property gw_remnant SXS metadata\n", "---------------------------------------------------------\n", "Remnant mass [M] 0.951820 0.951787\n", "Remnant |chi| 0.662583 0.688662\n", "Remnant spin (z) 0.662583 0.688662\n", "Kick velocity [c] 0.000000 0.000000\n", "Spin vector [ 2.4262e-11 -5.0632e-11 6.6258e-01]\n", " [-2.5855e-11 4.3417e-11 6.8866e-01] (SXS)\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "/var/folders/9k/xlxjfz4d2cz1063spty94p0r0000gq/T/ipykernel_23618/66046558.py:3: UserWarning: Tips: If you are using NR waveforms, ensure that they do not contain junk radiation, as that is known to corrupt the remnant property estimation.\n", " calc = GWRemnantCalculator(time=t, h_dict=h_dict, q=info[\"q\"],\n" ] } ], "source": [ "t, h_dict, info = data[\"non-spinning (high ecc)\"]\n", "\n", "calc = GWRemnantCalculator(time=t, h_dict=h_dict, q=info[\"q\"],\n", " chi1=list(info[\"chi1\"]), chi2=list(info[\"chi2\"]),\n", " e_ref=info[\"ecc\"])\n", "print(f\"{sims['non-spinning (high ecc)']}: e_ref = {info['ecc']:.4f}\")\n", "print(f\" PN E_initial = {calc.E_initial:.6f}, PN L_initial = {calc.L_initial:.6f}\")\n", "calc.print_remnants()\n", "compare_with_nr(calc, info)" ] }, { "cell_type": "markdown", "id": "e9768834", "metadata": {}, "source": [ "#### 3c. Precessing, eccentric\n", "\n", "**Note:** The PN expressions assume the initial orbital angular momentum is aligned with the z-axis. For precessing binaries this assumption breaks down, so the remnant spin is slightly off even though the remnant mass and kick velocity remain accurate. When directly supplying NR initial conditions (Section 2), this issue does not arise." ] }, { "cell_type": "code", "execution_count": 9, "id": "0ec6af94", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/var/folders/9k/xlxjfz4d2cz1063spty94p0r0000gq/T/ipykernel_23618/806739006.py:3: UserWarning: Tips: If you are using NR waveforms, ensure that they do not contain junk radiation, as that is known to corrupt the remnant property estimation.\n", " calc = GWRemnantCalculator(time=t, h_dict=h_dict, q=info[\"q\"],\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "SXS:BBH:3712: e_ref = 0.0729\n", " PN E_initial = 0.008480, PN L_initial = 1.012780\n", "==================================================\n", "Remnant Properties Summary\n", "==================================================\n", "Mass ratio : 1.252\n", "Initial mass : 1.00000000 M\n", "Total energy radiated : 0.04747640 M\n", "Peak luminosity : 0.00114379\n", "Remnant mass : 0.94404335 M\n", "Remnant spin (dimensionless) : 0.75347566\n", "Remnant spin vector (x,y,z) : (0.02688690, -0.03579467, 0.75347566)\n", "Remnant kick velocity : 0.00075275 c\n", "Remnant kick velocity : 225.67 km/s\n", "Remnant kick vector (x,y,z) : (0.00056915, -0.00026994, -0.00041212) c\n", "Remnant displacement (x,y,z) : (0.06680590, -0.03923495, -0.06492752) M\n", "==================================================\n", "Property gw_remnant SXS metadata\n", "---------------------------------------------------------\n", "Remnant mass [M] 0.944043 0.944022\n", "Remnant |chi| 0.754804 0.754679\n", "Remnant spin (z) 0.753476 0.753761\n", "Kick velocity [c] 0.000753 0.000821\n", "Spin vector [ 0.0269 -0.0358 0.7535]\n", " [ 0.0269 -0.0257 0.7538] (SXS)\n" ] } ], "source": [ "t, h_dict, info = data[\"precessing\"]\n", "\n", "calc = GWRemnantCalculator(time=t, h_dict=h_dict, q=info[\"q\"],\n", " chi1=list(info[\"chi1\"]), chi2=list(info[\"chi2\"]),\n", " e_ref=info[\"ecc\"])\n", "print(f\"{sims['precessing']}: e_ref = {info['ecc']:.4f}\")\n", "print(f\" PN E_initial = {calc.E_initial:.6f}, PN L_initial = {calc.L_initial:.6f}\")\n", "calc.print_remnants()\n", "compare_with_nr(calc, info)" ] }, { "cell_type": "code", "execution_count": null, "id": "1bf349c1-2b5f-41d0-8a82-dc7a8e9b8b85", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "kitp-py310", "language": "python", "name": "kitp-py310" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.18" } }, "nbformat": 4, "nbformat_minor": 5 }