icecube_tools.source.flux_model module
- class icecube_tools.source.flux_model.BrokenPowerLawFlux(normalisation, break_energy, index1, index2, lower_energy=100.0, upper_energy=100000000.0)
Bases:
FluxModel
Broken power law flux models.
- integrated_spectrum(lower_energy_bound, upper_energy_bound)
int spectrum dE over finite energy bounds.
- Parameters:
lower_energy_bound – [GeV]
upper_energy_bound – [GeV]
- redshift_factor(z: float)
- sample(N)
Sample energies from the power law. Uses inverse transform sampling.
- Parameters:
N – Number of samples.
- spectrum(energy)
dN/dEdAdt or dN/dEdAdtdO depending on flux_type.
- class icecube_tools.source.flux_model.FluxModel
Bases:
ABC
Abstract base class for flux models.
- abstract integrated_spectrum()
- abstract redshift_factor(z)
- abstract spectrum()
- class icecube_tools.source.flux_model.PowerLawExpCutoffFlux(normalisation, norm_energy, index, cutoff_energy, lower_energy=100.0, upper_energy=100000000.0)
Bases:
FluxModel
Power law flux models with an exponential cutoff.
- integrated_spectrum(lower_energy_bound, upper_energy_bound)
Integrates the spectrum with respect to E over a finite energy interval. :param lower_energy_bound: in GeV :param upper_energy_bound: in GeV
- redshift_factor(z: float)
- sample(N)
Samples energies from the spectrum using inverse transform sampling. Works only if index < 1. :param N: Number of samples.
- spectrum(energy)
dN/dEdAdt or dN/dEdAdtdO.
- class icecube_tools.source.flux_model.PowerLawFlux(normalisation, normalisation_energy, index, lower_energy=100.0, upper_energy=inf)
Bases:
FluxModel
Power law flux models.
- integrated_spectrum(lower_energy_bound, upper_energy_bound)
int spectrum dE over finite energy bounds.
- Parameters:
lower_energy_bound – [GeV]
upper_energy_bound – [GeV]
- redshift_factor(z: float)
- sample(N)
Sample energies from the power law. Uses inverse transform sampling.
- Parameters:
min_energy – Minimum energy to sample from [GeV].
N – Number of samples.
- spectrum(energy)
dN/dEdAdt or dN/dEdAdtdO depending on flux_type.
- total_flux_density()
Total flux density in units of [GeV cm^-2 s^-1]
- class icecube_tools.source.flux_model.PowerLawSubexpCutoffFlux(normalisation, norm_energy, index1, cutoff_energy, index2, lower_energy=100.0, upper_energy=100000000.0)
Bases:
FluxModel
Power law flux models with a subexponential cutoff.
- integrated_spectrum(lower_energy_bound, upper_energy_bound)
Integrates the spectrum with respect to E over a finite energy interval. :param lower_energy_bound: in GeV :param upper_energy_bound: in GeV
- redshift_factor(z: float)
- spectrum(energy)
dN/dEdAdt or dN/dEdAdtdO.