Skip to content

Commit

Permalink
FIX: set seed for angular phase space generator (#232)
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer authored Oct 21, 2022
1 parent c74ac08 commit 9840dc8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docs/zz.polarization-fit.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,10 @@
"# Dalitz variables\n",
"PHSP = generate_phasespace_sample(DECAY, N_EVENTS, seed=0)\n",
"# Decay plane variables\n",
"PHSP[\"phi\"] = np.random.uniform(-np.pi, +np.pi, N_EVENTS)\n",
"PHSP[\"cos_theta\"] = np.random.uniform(-1, +1, N_EVENTS)\n",
"PHSP[\"chi\"] = np.random.uniform(-np.pi, +np.pi, N_EVENTS)"
"RNG = np.random.default_rng(seed=0)\n",
"PHSP[\"phi\"] = RNG.uniform(-np.pi, +np.pi, N_EVENTS)\n",
"PHSP[\"cos_theta\"] = RNG.uniform(-1, +1, N_EVENTS)\n",
"PHSP[\"chi\"] = RNG.uniform(-np.pi, +np.pi, N_EVENTS)"
]
},
{
Expand Down

0 comments on commit 9840dc8

Please sign in to comment.