icecube_tools.point_source_likelihood.energy_likelihood module

class icecube_tools.point_source_likelihood.energy_likelihood.MarginalisedEnergyLikelihood

Bases: ABC

Abstract base class for the marginalised energy likelihood.

L = int d Etrue P(Ereco | Etrue) P(Etrue | index) = P(Ereco | index).

class icecube_tools.point_source_likelihood.energy_likelihood.MarginalisedEnergyLikelihood2021(index_list, path, fname, src_dec, ftype='h5', min_index=1.5, max_index=4.0, min_E=100.0, max_E=1000000000.0, min_sind=-0.1, max_sind=1.0, Ebins=50)

Bases: MarginalisedEnergyLikelihood

Compute the marginalised energy likelihood by reading in the provided IRF data of 2021. Creates instances of MarginalisedEnergyLikelihoodFromSimFixedIndex (slightly copied from MarginalisedEnergyLikelihoodFromSim but with different interpolating) for each given index.

calc_loglike(energies, index)

Function intended for testing only.

class icecube_tools.point_source_likelihood.energy_likelihood.MarginalisedEnergyLikelihoodBraun2008(energy_list, pdf_list, index_list)

Bases: MarginalisedEnergyLikelihood

Compute the marginalised enegry likelihood using Figure 4 in Braun+2008.

class icecube_tools.point_source_likelihood.energy_likelihood.MarginalisedEnergyLikelihoodFixed(energy, min_index=1.5, max_index=4.0, min_E=100.0, max_E=1000000000.0, min_sind=-0.1, max_sind=1.0, Ebins=50)

Bases: MarginalisedEnergyLikelihood

Compute the marginalised energy likelihood for a fixed case based on a simulation. Eg. P(E | atmos + diffuse astro).

class icecube_tools.point_source_likelihood.energy_likelihood.MarginalisedEnergyLikelihoodFromSim(energy, dec, sim_index=1.5, min_index=1.5, max_index=4.0, min_E=100.0, max_E=1000000000.0, min_sind=-0.1, max_sind=1.0, Ebins=50)

Bases: MarginalisedEnergyLikelihood

Compute the marginalised energy likelihood by using a simulation of a large number of reconstructed muon neutrino tracks.

set_src_dec(src_dec)

Set the source declination in private variable Precompute likelihood distributions

class icecube_tools.point_source_likelihood.energy_likelihood.MarginalisedEnergyLikelihoodFromSimFixedIndex(energy, dec, sim_index, src_dec=0.0, min_E=100.0, max_E=1000000000.0, min_sind=-0.1, max_sind=1.0, Ebins=50)

Bases: MarginalisedEnergyLikelihood

Copied from MarginalisedEnergyLikelihoodFromSim but without the interpolating

property src_dec
class icecube_tools.point_source_likelihood.energy_likelihood.MarginalisedIntegratedEnergyLikelihood(irf: R2021IRF, aeff: EffectiveArea, reco_bins: ndarray, min_index: float = 1.5, max_index: float = 4.0)

Bases: MarginalisedEnergyLikelihood

Calculates energy likelihood by integration rather than simulation.

static integrated_power_law(loge_high, loge_low, index)

Integrates power law :param loge_high: float or np.ndarray of upper integration bound(s) :param loge_low: float or np.ndarray of lower integration bound(s) :param index: spectral index :return: Integrated power law, float or np.ndarray

static power_law_loge(loge, index)

Evaluated power law :param loge: Logarithmic energy, base 10 :param index: Spectral index :return: Evaluated power law

icecube_tools.point_source_likelihood.energy_likelihood.read_input_from_file(filename)

Helper function to read in data digitized from plots.

icecube_tools.point_source_likelihood.energy_likelihood.reweight_spectrum(energies, sim_index, new_index, bins=1000)

Use energies from a simulation with a harder spectral index for efficiency.

The spectrum is then resampled from the weighted histogram

Parameters

energies – Energies to be reiweghted.

Sim_index

Spectral index of the simulation.

New_index

Spectral index to reweight to.