Skip to content

Commit

Permalink
fix integrate_energy
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorBarbosaMartins committed Feb 6, 2024
1 parent 0ecc198 commit 9b489af
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ctao_cosmic_ray_spectra/spectral.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,11 @@ def integrate_energy(self, energy_min, energy_max):
nominator = energy_max ** (self.index + 1) - energy_min ** (self.index + 1)
denominator = (self.index + 1) * self.e_ref**self.index

return nominator/denominator * self.normalization
return PowerLaw(
normalization=(nominator/denominator * self.normalization),
index=self.index,
e_ref=self.e_ref,
)

@u.quantity_input(inner=u.deg, outer=u.deg, area=u.cm**2, energy_min=u.TeV, energy_max=u.TeV)
def derive_events_rate(self,
Expand Down

0 comments on commit 9b489af

Please sign in to comment.