Commit 138eee67 authored by teresa.bister's avatar teresa.bister
Browse files

[simulations] small bug fix in probability normalization in case of explicitely set spurces

parent 680bba25
Pipeline #301512 failed with stages
......@@ -368,7 +368,7 @@ class ObservedBound(BaseSimulation):
elif (self.cr_map is None):
if self.cr_map.size == self.npix:
pixel[:, signal_label] = np.random.choice(self.npix, (self.nsets, n_sig), p=np.hstack(self.cr_map))
pixel[:, signal_label] = np.random.choice(self.npix, (self.nsets, n_sig), p=np.hstack(self.cr_map)/np.sum(np.hstack(self.cr_map)))
for i, rig in enumerate(self.rig_bins):
mask_rig = (rig == self.rigidities) * signal_label # type: np.ndarray
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment