rate
- lstchain.mc.mc.rate(shape, emin, emax, param, cone, area)
Calculates the rate of events for a power-law distribution, in a given energy range, collection area and solid angle
- Parameters:
- shape: `string` weighted spectrum shape
- emin: `float` minimum energy
- emax: `float` maximum energy
- param: `dict` with weighted spectral parameters
- cone: `float` angle [deg] for the solid angle cone
- area: `float` collection area [cm**2]
- if shape is ‘PowerLaw’:
- param should include ‘f0’,’e0’,’alpha’
- dFdE = f0 * np.power(E / e0, alpha)
- if shape is ‘LogParabola’:
- param should include ‘f0’,’e0’,’alpha’,’beta’
- dFdE = f0 * np.power(E / e0, alpha + beta * np.log10(E/e0))
- Returns:
- rate: float rate of events