Skip to content

Commit

Permalink
Merge pull request #79 from cta-observatory/fix_energy_integral
Browse files Browse the repository at this point in the history
Fix integration of power law pdf in simulations.py
  • Loading branch information
maxnoe committed Oct 1, 2020
2 parents 1224aca + 5bb9e0d commit 7e123d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyirf/simulations.py
Expand Up @@ -182,8 +182,8 @@ def _powerlaw_pdf_integral(index, e_low, e_high, e_min, e_max):
e_max = e_max.to_value(u.TeV)

int_index = index + 1
e_term = e_low ** int_index - e_high ** int_index
normalization = int_index / (e_max ** int_index - e_min ** int_index)
normalization = 1 / (e_max ** int_index - e_min ** int_index)
e_term = e_high ** int_index - e_low ** int_index
return e_term * normalization


Expand Down

0 comments on commit 7e123d9

Please sign in to comment.