negative probabilities when running bump in the night
I have been trying to reproduce the analysis bump in the night and the code is returning an error
Steps to reproduce:
- Git clone and pip install in standard igwn environment.
- mkdir /home/ovgu.guleryuz/mockcatt
- mkdir /home/ovgu.guleryuz/mockcatt/out2
- mkdir /home/ovgu.guleryuz/mockcatt/sensitivity
- copy and modify the bump_inthe_night.ini file
(igwn) [ovgu.guleryuz@ldas-pcdev11 mockcatt]$ diff -u ../mock-PE/bump_inthe_night.ini bump_inthe_night.ini
--- ../mock-PE/bump_inthe_night.ini 2024-05-30 09:05:01.838891906 -0700
+++ bump_inthe_night.ini 2024-06-04 07:39:12.472035141 -0700
@@ -1,12 +1,12 @@
[general arguments]
verbose=False
-output_path = out
+output_path = /home/ovgu.guleryuz/mockcatt/out2
run_label = with_z_evo_lalprior_69_evs_prod
num_events = 69
num_realizations = 500
[global rate settings]
-snr_interpolator_file=sensitivity/optimal_snr_aligo_O3actual_L1.h5
+snr_interpolator_file=/home/ovgu.guleryuz/mockcatt/sensitivity/optimal_snr_aligo_O3actual_L1.h5
max_redshift=2.3
[population model arguments]
- Run the following
(igwn) [ovgu.guleryuz@ldas-pcdev11 mockcatt]$ generate_mock_cats -c bump_inthe_night.ini
0%| | 0/500 [00:00<?, ?it/s]/home/ovgu.guleryuz/.local/lib/python3.10/site-packages/gwpopulation/utils.py:123: RuntimeWarning: divide by zero encountered in divide
1 / xp.log(high / low),
/home/ovgu.guleryuz/.local/lib/python3.10/site-packages/gwpopulation/utils.py:124: RuntimeWarning: divide by zero encountered in divide
(1 + alpha) / xp.array(high ** (1 + alpha) - low ** (1 + alpha)),
/home/ovgu.guleryuz/.local/lib/python3.10/site-packages/gwpopulation/utils.py:128: RuntimeWarning: invalid value encountered in multiply
prob *= (xx <= high) & (xx >= low)
/home/ovgu.guleryuz/.local/lib/python3.10/site-packages/gwpopulation/models/mass.py:613: RuntimeWarning: invalid value encountered in multiply
p_q *= self.smoothing(
0%| | 0/500 [00:14<?, ?it/s]
Traceback (most recent call last):
File "/home/ovgu.guleryuz/.local/bin/generate_mock_cats", line 8, in <module>
sys.exit(main())
File "/home/ovgu.guleryuz/.local/lib/python3.10/site-packages/GWMockCat/main.py", line 233, in main
idxs=rng.choice(len(m1t),size=num_draws,p=weights/np.sum(weights),replace=False)
File "_generator.pyx", line 752, in numpy.random._generator.Generator.choice
ValueError: probabilities are not non-negative