Skip to content

Commit 8b83936

Browse files
committed
adjust example to include dcos_included=[BBH]
1 parent 0dbf360 commit 8b83936

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

online-docs/pages/User guide/Post-processing/notebooks/CosmicIntegration.py

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,23 @@
4747

4848
np.random.seed(42)
4949

50-
m1_min = 5
51-
m1_max = 150
52-
m2_min = 0.1
50+
51+
mass_params = dict(
52+
m1_min = 5,
53+
m1_max = 150,
54+
m2_min = 0.1,
55+
)
5356

5457
compas_fname = generate_mock_population(
55-
"mock_compas_data.h5", n_systems=int(1e4), frac_bbh=1, frac_bhns=0, frac_bns=0,
56-
m1_min=m1_min, m1_max=m1_max, m2_min=m2_min
58+
"mock_compas_data.h5", n_systems=int(1e4),
59+
frac_bbh=1, frac_bhns=0, frac_bns=0,
60+
**mass_params,
61+
)
62+
bbh_population = BinaryPopulation.from_compas_h5(
63+
compas_fname,
64+
dcos_included=['BBH'],
65+
**mass_params
5766
)
58-
bbh_population = BinaryPopulation.from_compas_h5(compas_fname, m1_min=m1_min, m1_max=m1_max, m2_min=m2_min)
5967
fig = bbh_population.plot()
6068
# -
6169

@@ -112,7 +120,7 @@
112120
# +
113121
from compas_python_utils.cosmic_integration.binned_cosmic_integrator.snr_grid import SNRGrid
114122

115-
snr_grid = SNRGrid()
123+
snr_grid = SNRGrid(sensitivity="O3")
116124
fig = snr_grid.plot()
117125
# -
118126

@@ -135,7 +143,10 @@
135143
# We have a helper class to do this in one go:
136144

137145
detection_matrix = DetectionMatrix.from_compas_output(
138-
compas_fname, save_plots=False,
146+
compas_fname,
147+
sens="O3",
148+
dcos_included=["BBH"],
149+
save_plots=False,
139150
chirp_mass_bins=50, redshift_bins=100,
140151
cosmological_parameters=dict(aSF=0.01, dSF=4.70, mu_z=-.23, sigma_z=0),
141152
)

0 commit comments

Comments
 (0)