Show code cell content
! pip install nrsur_catalog
Looking in indexes: https://pypi.org/simple, https://packagecloud.io/eugeny/tabby/pypi/simple
Requirement already satisfied: nrsur_catalog in /home/avaj040/miniforge3/lib/python3.10/site-packages (0.0.5)
Requirement already satisfied: matplotlib in /home/avaj040/miniforge3/lib/python3.10/site-packages (from nrsur_catalog) (3.9.2)
Requirement already satisfied: loguru in /home/avaj040/miniforge3/lib/python3.10/site-packages (from nrsur_catalog) (0.7.2)
Requirement already satisfied: bilby[gw] in /home/avaj040/miniforge3/lib/python3.10/site-packages (from nrsur_catalog) (2.3.0)
Requirement already satisfied: bilby.cython>=0.3.0 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from bilby[gw]->nrsur_catalog) (0.5.2)
Requirement already satisfied: dynesty>=2.0.1 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from bilby[gw]->nrsur_catalog) (2.1.4)
Requirement already satisfied: emcee in /home/avaj040/miniforge3/lib/python3.10/site-packages (from bilby[gw]->nrsur_catalog) (3.1.6)
Requirement already satisfied: corner in /home/avaj040/miniforge3/lib/python3.10/site-packages (from bilby[gw]->nrsur_catalog) (2.2.2)
Requirement already satisfied: numpy in /home/avaj040/miniforge3/lib/python3.10/site-packages (from bilby[gw]->nrsur_catalog) (2.0.2)
Requirement already satisfied: scipy>=1.5 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from bilby[gw]->nrsur_catalog) (1.14.0)
Requirement already satisfied: pandas in /home/avaj040/miniforge3/lib/python3.10/site-packages (from bilby[gw]->nrsur_catalog) (2.2.2)
Requirement already satisfied: dill in /home/avaj040/miniforge3/lib/python3.10/site-packages (from bilby[gw]->nrsur_catalog) (0.3.8)
Requirement already satisfied: tqdm in /home/avaj040/miniforge3/lib/python3.10/site-packages (from bilby[gw]->nrsur_catalog) (4.66.2)
Requirement already satisfied: h5py in /home/avaj040/miniforge3/lib/python3.10/site-packages (from bilby[gw]->nrsur_catalog) (3.11.0)
Requirement already satisfied: attrs in /home/avaj040/miniforge3/lib/python3.10/site-packages (from bilby[gw]->nrsur_catalog) (24.2.0)
Requirement already satisfied: astropy>=5 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from bilby[gw]->nrsur_catalog) (6.1.3)
Requirement already satisfied: lalsuite in /home/avaj040/miniforge3/lib/python3.10/site-packages (from bilby[gw]->nrsur_catalog) (7.24)
Requirement already satisfied: gwpy in /home/avaj040/miniforge3/lib/python3.10/site-packages (from bilby[gw]->nrsur_catalog) (3.0.10)
Requirement already satisfied: tables in /home/avaj040/miniforge3/lib/python3.10/site-packages (from bilby[gw]->nrsur_catalog) (3.10.1)
Requirement already satisfied: pyfftw in /home/avaj040/miniforge3/lib/python3.10/site-packages (from bilby[gw]->nrsur_catalog) (0.15.0)
Requirement already satisfied: scikit-learn in /home/avaj040/miniforge3/lib/python3.10/site-packages (from bilby[gw]->nrsur_catalog) (1.5.2)
Requirement already satisfied: contourpy>=1.0.1 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from matplotlib->nrsur_catalog) (1.2.1)
Requirement already satisfied: cycler>=0.10 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from matplotlib->nrsur_catalog) (0.12.1)
Requirement already satisfied: fonttools>=4.22.0 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from matplotlib->nrsur_catalog) (4.53.1)
Requirement already satisfied: kiwisolver>=1.3.1 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from matplotlib->nrsur_catalog) (1.4.5)
Requirement already satisfied: packaging>=20.0 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from matplotlib->nrsur_catalog) (24.0)
Requirement already satisfied: pillow>=8 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from matplotlib->nrsur_catalog) (10.4.0)
Requirement already satisfied: pyparsing>=2.3.1 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from matplotlib->nrsur_catalog) (3.1.2)
Requirement already satisfied: python-dateutil>=2.7 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from matplotlib->nrsur_catalog) (2.9.0)
Requirement already satisfied: pyerfa>=2.0.1.1 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from astropy>=5->bilby[gw]->nrsur_catalog) (2.0.1.4)
Requirement already satisfied: astropy-iers-data>=0.2024.7.29.0.32.7 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from astropy>=5->bilby[gw]->nrsur_catalog) (0.2024.9.2.0.33.23)
Requirement already satisfied: PyYAML>=3.13 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from astropy>=5->bilby[gw]->nrsur_catalog) (6.0.2)
Requirement already satisfied: six>=1.5 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from python-dateutil>=2.7->matplotlib->nrsur_catalog) (1.16.0)
Requirement already satisfied: dateparser>=1.1.4 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from gwpy->bilby[gw]->nrsur_catalog) (1.2.0)
Requirement already satisfied: dqsegdb2 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from gwpy->bilby[gw]->nrsur_catalog) (1.2.1)
Requirement already satisfied: gwdatafind>=1.1.0 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from gwpy->bilby[gw]->nrsur_catalog) (1.2.0)
Requirement already satisfied: gwosc>=0.5.3 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from gwpy->bilby[gw]->nrsur_catalog) (0.7.1)
Requirement already satisfied: ligo-segments>=1.0.0 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from gwpy->bilby[gw]->nrsur_catalog) (1.4.0)
Requirement already satisfied: ligotimegps>=1.2.1 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from gwpy->bilby[gw]->nrsur_catalog) (2.0.1)
Requirement already satisfied: requests>=2.20.0 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from gwpy->bilby[gw]->nrsur_catalog) (2.31.0)
Requirement already satisfied: lscsoft-glue in /home/avaj040/miniforge3/lib/python3.10/site-packages (from lalsuite->bilby[gw]->nrsur_catalog) (4.0.0)
Requirement already satisfied: pytz>=2020.1 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from pandas->bilby[gw]->nrsur_catalog) (2024.1)
Requirement already satisfied: tzdata>=2022.7 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from pandas->bilby[gw]->nrsur_catalog) (2024.1)
Requirement already satisfied: setuptools>=70.1.1 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from pyfftw->bilby[gw]->nrsur_catalog) (75.4.0)
Requirement already satisfied: joblib>=1.2.0 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from scikit-learn->bilby[gw]->nrsur_catalog) (1.4.2)
Requirement already satisfied: threadpoolctl>=3.1.0 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from scikit-learn->bilby[gw]->nrsur_catalog) (3.5.0)
Requirement already satisfied: numexpr>=2.6.2 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from tables->bilby[gw]->nrsur_catalog) (2.10.1)
Requirement already satisfied: py-cpuinfo in /home/avaj040/miniforge3/lib/python3.10/site-packages (from tables->bilby[gw]->nrsur_catalog) (9.0.0)
Requirement already satisfied: blosc2>=2.3.0 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from tables->bilby[gw]->nrsur_catalog) (2.7.1)
Requirement already satisfied: typing-extensions>=4.4.0 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from tables->bilby[gw]->nrsur_catalog) (4.12.2)
Requirement already satisfied: ndindex>=1.4 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from blosc2>=2.3.0->tables->bilby[gw]->nrsur_catalog) (1.9.2)
Requirement already satisfied: msgpack in /home/avaj040/miniforge3/lib/python3.10/site-packages (from blosc2>=2.3.0->tables->bilby[gw]->nrsur_catalog) (1.1.0)
Requirement already satisfied: regex!=2019.02.19,!=2021.8.27 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from dateparser>=1.1.4->gwpy->bilby[gw]->nrsur_catalog) (2024.11.6)
Requirement already satisfied: tzlocal in /home/avaj040/miniforge3/lib/python3.10/site-packages (from dateparser>=1.1.4->gwpy->bilby[gw]->nrsur_catalog) (5.2)
Requirement already satisfied: igwn-auth-utils>=0.3.1 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from gwdatafind>=1.1.0->gwpy->bilby[gw]->nrsur_catalog) (1.1.1)
Requirement already satisfied: charset-normalizer<4,>=2 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from requests>=2.20.0->gwpy->bilby[gw]->nrsur_catalog) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from requests>=2.20.0->gwpy->bilby[gw]->nrsur_catalog) (3.6)
Requirement already satisfied: urllib3<3,>=1.21.1 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from requests>=2.20.0->gwpy->bilby[gw]->nrsur_catalog) (2.2.1)
Requirement already satisfied: certifi>=2017.4.17 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from requests>=2.20.0->gwpy->bilby[gw]->nrsur_catalog) (2024.7.4)
Requirement already satisfied: pyOpenSSL in /home/avaj040/miniforge3/lib/python3.10/site-packages (from lscsoft-glue->lalsuite->bilby[gw]->nrsur_catalog) (24.2.1)
Requirement already satisfied: cryptography>=2.3 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from igwn-auth-utils>=0.3.1->gwdatafind>=1.1.0->gwpy->bilby[gw]->nrsur_catalog) (43.0.3)
Requirement already satisfied: safe-netrc>=1.0.0 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from igwn-auth-utils>=0.3.1->gwdatafind>=1.1.0->gwpy->bilby[gw]->nrsur_catalog) (1.0.1)
Requirement already satisfied: scitokens>=1.7.0 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from igwn-auth-utils>=0.3.1->gwdatafind>=1.1.0->gwpy->bilby[gw]->nrsur_catalog) (1.8.1)
Requirement already satisfied: cffi>=1.12 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from cryptography>=2.3->igwn-auth-utils>=0.3.1->gwdatafind>=1.1.0->gwpy->bilby[gw]->nrsur_catalog) (1.16.0)
Requirement already satisfied: PyJWT>=1.6.1 in /home/avaj040/miniforge3/lib/python3.10/site-packages (from scitokens>=1.7.0->igwn-auth-utils>=0.3.1->gwdatafind>=1.1.0->gwpy->bilby[gw]->nrsur_catalog) (2.9.0)
Requirement already satisfied: pycparser in /home/avaj040/miniforge3/lib/python3.10/site-packages (from cffi>=1.12->cryptography>=2.3->igwn-auth-utils>=0.3.1->gwdatafind>=1.1.0->gwpy->bilby[gw]->nrsur_catalog) (2.22)
GW190413_134308#
Below are some plots for GW190413_134308 from the NRSurrogate Catalog.
from nrsur_catalog import NRsurResult
nrsur_result = NRsurResult.load("GW190413_134308", cache_dir=".nrsur_catalog_cache")
# you can specify a `cache_dir`: folder where data will be downloaded
Summary#
nrsur_result.summary()
Parameter |
Posterior 90% CI |
Prior |
---|---|---|
Note: For most events the kick inference is dominated by the prior itself, see Figs. 10 and 11 of Islam et al, 2023.
Lets make some plots!
Show code cell source
# NRSurrogate corner plots
import os
param_sets = dict(
mass=["mass_1_source", "mass_2_source", "mass_ratio"],
spin=["a_1", "a_2", "tilt_1", "tilt_2"],
effective_spin=["mass_ratio", "chi_eff", "chi_p"],
sky_localisation=["luminosity_distance", "ra", "dec"],
remnant=["final_mass", "final_spin", "final_kick"],
)
for name, params in param_sets.items():
fname = f"GW190413_134308_{name}_corner.png"
if not os.path.isfile(fname):
fig = nrsur_result.plot_corner(params)
fig.savefig(fname)
if name == "remnant":
continue
# LVK-Comparison plots
fname = f"GW190413_134308_compare_{name}_corner.png"
if not os.path.isfile(fname):
fig = nrsur_result.plot_lvk_comparison_corner(params)
fig.savefig(fname)
Corner Plots#
Corner plots of the NRSurCat-1 posteriors. The plots along the diagonal display the 1D marginalized posteriors, with the median values and the central
Mass#
Posterior corner plots for the component masses, and mass-ratio (
Spin#
Posterior corner plots for the component spin magnitudes (
Effective Spin#
Posterior corner plots for the mass-ratio
Sky-localisation#
Posterior corner plots for the luminosity distance, ra and dec (
Remnant#
Posterior corner plots for the remnant mass, remnant spin magnitude and kick (
Animations#
Here are some animations of the posterior.
Spin |
---|
Posterior samples for the dimensionless spin vectors (
Remnant |
---|
Posterior samples for the dimensionless spin vector
Analysis configs#
Below are the configs used for the analysis of this job.
nrsur_result.print_configs()
Tmax: 10000
accounting: None
accounting_user: None
adapt: False
allow_tape: True
analysis_executable: None
analysis_executable_parser: None
autocorr_c: 5.0
autocorr_tol: 50.0
bilby_zero_likelihood_mode: False
burn_in_nact: 50.0
calibration_model: CubicSpline
calibration_prior_boundary: reflective
catch_waveform_errors: True
channel_dict: {H1:DCS-CALIB_STRAIN_CLEAN_SUB60HZ_C01, L1:DCS-CALIB_STRAIN_CLEAN_SUB60HZ_C01_T1700406_v4, V1:Hrec_hoft_16384Hz}
check_point_deltaT: 3600
clean: False
coherence_test: False
conda_env: None
condor_job_priority: 0
conversion_function: None
create_summary: True
data_dict: {H1:/anvil/projects/x-phy990007n/vvarma/Work/Projects/Current/NRSurCatalog/runs/GWTC/Data/GW190413_134308/H1_data.gwf, L1:/anvil/projects/x-phy990007n/vvarma/Work/Projects/Current/NRSurCatalog/runs/GWTC/Data/GW190413_134308/L1_data.gwf, V1:/anvil/projects/x-phy990007n/vvarma/Work/Projects/Current/NRSurCatalog/runs/GWTC/Data/GW190413_134308/V1_data.gwf}
data_dump_file: None
data_format: None
default_prior: BBHPriorDict
deltaT: 0.2
desired_sites: None
detectors: ['H1', 'L1', 'V1']
distance_marginalization: True
distance_marginalization_lookup_table: None
dlogz: 0.1
do_not_save_bounds_in_resume: False
duration: 4.0
dynesty_bound: multi
dynesty_sample: rwalk
email: None
enforce_signal_duration: False
enlarge: 1.5
existing_dir: None
extra_likelihood_kwargs: None
extra_lines: job-name=GW190413_134308 mail-user=sfield@umassd.edu mail-type=END
facc: 0.5
fast_mpi: False
final_result: True
final_result_nsamples: 20000
frac_threshold: 0.01
frequency_domain_source_model: lal_binary_black_hole
gaussian_noise: False
generation_function: None
generation_seed: None
gps_file: None
gps_tuple: None
idx: 0
ignore_gwpy_data_quality_check: True
ini: GW190413_134308_config.ini
injection: False
injection_dict: None
injection_file: None
injection_numbers: None
injection_waveform_approximant: None
injection_waveform_arguments: None
jitter_time: True
label: GW190413_134308_NRSur7dq4
likelihood_type: GravitationalWaveTransient
local: False
local_generation: False
local_plot: False
log_directory: None
max_iterations: 100000
max_its: 10000000000
max_run_time: 10000000000.0
maximum_frequency: 448.000000
maxmcmc: 5000
mem_per_cpu: None
min_eff: 10
min_tau: 30
minimum_frequency: {H1:20.000000, L1:20.000000, V1:20.000000, waveform: 0}
mode_array: None
mpi_timing: False
mpi_timing_interval: 0
n_check_point: 100
n_effective: inf
n_parallel: 4
n_simulation: 0
nact: 50
ncheck: 500
nestcheck: False
nfrac: 5
nlive: 2000
no_plot: False
nodes: 1
notification: Never
nsamples: 10000
ntasks_per_node: 128
ntemps: 20
numerical_relativity_file: None
nwalkers: 100
online_pe: False
osg: False
outdir: NRSur7dq4_run
overwrite_outdir: False
periodic_restart_time: 28800
phase_marginalization: False
plot_calibration: False
plot_corner: False
plot_data: True
plot_format: png
plot_injection: True
plot_marginal: False
plot_skymap: False
plot_spectrogram: True
plot_trace: True
plot_waveform: False
pn_amplitude_order: 0
pn_phase_order: -1
pn_spin_order: -1
pn_tidal_order: -1
post_trigger_duration: 2.0
postprocessing_arguments: None
postprocessing_executable: None
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')}
prior_file: None
psd_dict: {H1:/anvil/projects/x-phy990007n/vvarma/Work/Projects/Current/NRSurCatalog/runs/GWTC/Data/GW190413_134308/H1_PSD.dat, L1:/anvil/projects/x-phy990007n/vvarma/Work/Projects/Current/NRSurCatalog/runs/GWTC/Data/GW190413_134308/L1_PSD.dat, V1:/anvil/projects/x-phy990007n/vvarma/Work/Projects/Current/NRSurCatalog/runs/GWTC/Data/GW190413_134308/V1_PSD.dat}
psd_fractional_overlap: 0.5
psd_length: 32
psd_maximum_duration: 1024
psd_method: median
psd_start_time: None
reference_frame: H1L1
reference_frequency: 20.0
request_cpus: 1
request_disk: 1.0
request_memory: 4.0
request_memory_generation: None
resampling_method: lal
result_format: hdf5
roq_folder: None
roq_scale_factor: 1
roq_weights: None
rotate_checkpoints: False
safety: 1.0
sampler: dynesty
sampler_kwargs: Default
sampling_frequency: 1024.0
sampling_seed: None
scheduler: condor
scheduler_analysis_time: 7-00:00:00
scheduler_args: None
scheduler_env: None
scheduler_module: None
single_postprocessing_arguments: None
single_postprocessing_executable: None
slurm_extra_lines: partition=wholenode account=phy990002
spline_calibration_amplitude_uncertainty_dict: None
spline_calibration_envelope_dict: {H1:/anvil/projects/x-phy990007n/vvarma/Work/Projects/Current/NRSurCatalog/runs/GWTC/Data/GW190413_134308/H1_CalEnv.dat, L1:/anvil/projects/x-phy990007n/vvarma/Work/Projects/Current/NRSurCatalog/runs/GWTC/Data/GW190413_134308/L1_CalEnv.dat, V1:/anvil/projects/x-phy990007n/vvarma/Work/Projects/Current/NRSurCatalog/runs/GWTC/Data/GW190413_134308/V1_CalEnv.dat}
spline_calibration_nodes: 10
spline_calibration_phase_uncertainty_dict: None
submit: True
summarypages_arguments: {'nsamples_for_skymap': 5000, 'multi_process':8}
thin_by_nact: 1.0
time: 42:00:00
time_marginalization: False
time_reference: geocent
timeslide_dict: None
timeslide_file: None
transfer_files: True
trigger_time: 1239198206.741211
tukey_roll_off: 0.4
verbose: False
vol_check: 8
vol_dec: 0.5
walks: 100
waveform_approximant: NRSur7dq4
waveform_arguments_dict: None
waveform_generator: bilby.gw.waveform_generator.WaveformGenerator
webdir: summary
weight_file: None
zero_noise: False
Comments#
This has been made with
nrsur_catalog
version 0.0.5. If you used this data, please cite this work.Leave a comment in this issue.