Skip to content

Commit

Permalink
Use the right dist in the dataset tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
mjlarson committed Aug 29, 2024
1 parent 312df34 commit 632d7a8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test_genie_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ def test_dataset(fname):

assert w.get_weight_column("wght") == approx(genie_weight)

power_law = next(iter(w.surface.spectra.values()))[0].dists[2]
power_law = next(iter(w.surface.spectra.values()))[0].dists[-1]
energy_term = 1 / power_law.pdf(w.get_weight_column("energy"))

print(energy_term / energy_factor)
assert energy_term == approx(energy_factor)

one_weight = w.get_weight_column("wght") * energy_term * solid_angle * injection_area * global_probability_scale
Expand Down

0 comments on commit 632d7a8

Please sign in to comment.