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.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]