PowerLaw
- class pyirf.spectral.PowerLaw(normalization, index, e_ref=<Quantity 1. TeV>)[source]
Bases:
object
A power law with normalization, reference energy and index. Index includes the sign:
\[\Phi(E, \Phi_0, \gamma, E_\text{ref}) = \Phi_0 \left(\frac{E}{E_\text{ref}}\right)^{\gamma}\]- Attributes:
- normalization: astropy.units.Quantity[flux]
\(\Phi_0\),
- index: float
\(\gamma\)
- e_ref: astropy.units.Quantity[energy]
\(E_\text{ref}\)
Methods Summary
__call__
(energy)Call self as a function.
from_simulation
(simulated_event_info, obstime)Calculate the flux normalization for simulated events drawn from a power law for a certain observation time.
integrate_cone
(inner, outer)Integrate this powerlaw over solid angle in the given cone
Methods Documentation
- classmethod from_simulation(simulated_event_info, obstime, e_ref=<Quantity 1. TeV>)[source]
Calculate the flux normalization for simulated events drawn from a power law for a certain observation time.
- integrate_cone(inner, outer)[source]
Integrate this powerlaw over solid angle in the given cone
- Parameters:
- innerastropy.units.Quantity[angle]
inner opening angle of cone
- outerastropy.units.Quantity[angle]
outer opening angle of cone
- Returns:
- integratedPowerLaw
A new powerlaw instance with new normalization with the integration result.