km3flux.flux

Assorted Fluxes, in (m^2 sec sr GeV)^-1

Module Contents

Classes

BaseFlux

Base class for fluxes.

PowerlawFlux

E^-gamma flux.

IsotropicFlux

HondaFlux

Base class for Honda fluxes

Honda

Attributes

logger

km3flux.flux.logger[source]
class km3flux.flux.BaseFlux(**kwargs)[source]

Base class for fluxes.

Methods

__call__(energy, zenith=None)

Return the flux on energy, optionally on zenith.

integrate(zenith=None, emin=1, emax=100, **integargs)

Integrate the flux via romberg integration.

integrate_samples(energy, zenith=None, emin=1, emax=100)

Integrate the flux from given samples, via simpson integration.

integrate(self, zenith=None, emin=1, emax=100, interpolate=True, **integargs)[source]
integrate_samples(self, energy, zenith=None, emin=1, emax=100, interpolate=True, **integargs)[source]
class km3flux.flux.PowerlawFlux(gamma=2, scale=0.0001)[source]

E^-gamma flux.

integrate(self, zenith=None, emin=1, emax=100, **integargs)[source]

Compute analytic integral instead of numeric one.

class km3flux.flux.IsotropicFlux(data, flavors)[source]
class km3flux.flux.HondaFlux(data, flavors)[source]

Base class for Honda fluxes

Methods

make_regular_grid(axes_keys, flavor)

Create a n_dim grid based on data.

interpolation_method(axes_keys, flavor)

Select the interpolation method.

parse_categories(f)

Integrate the flux from given samples, via simpson integration.

make_regular_grid(self, axes_keys, flavor)[source]

Create a n_dim grid based on data.

Parameters
axes_keyslist of str

axes to be used, define dimensions order

flavorstr

column to use to fill the grid

interpolation_method(self, axes_keys, flavor)[source]

Select the interpolation method.

For 1D interpolation: - InterpolatedUnivariateSpline For 2D interpolation: - RectBivariateSpline For >= 3D interpolation: - RegularGridInterpolator

Parameters
axes_keyslist of str

axes to be used, define dimensions order

flavorstr

column to use to fill the grid

classmethod from_hondafile(cls, filepath)[source]
parse_categories(self, f)[source]

Select the interpolation method.

Parameters
ffile object

Honda file to be parsed

class km3flux.flux.Honda[source]
flux(self, year, experiment, solar='min', mountain=False, season=None, averaged=None)[source]

Return the flux for a given year and experiment.

Parameters
yearint

The year of the publication.

experimentstr

The experiment name, can be one of the following: “Kamioka”, “Gran Sasso”, “Sudbury”, “Frejus”, “INO”, “South Pole”, “Pythasalmi”, “Homestake”, “JUNO”

solarstr (optional)

The solar parameter, can be “min” or “max”. Default is “min” for Solar minimum.

mountainbool (optional)

With or without mountain over the detector. Default is “False” => without.

seasonNone or (int, int) (optional)

The season of interest. If None, the dataset for the full period is taken. If a tuple is provided, the first entry is the starting and the last the ending month. Notice that the corresponding dataset might not be available.

averagedNone or str (optional)

The type of averaging. Default is None. Also available are “all” for all direction averaging and “azimuth” for azimuth averaging only.

property experiments(self)[source]

Return a list of supported experiments.

experiment_abbr(self, experiment)[source]

Return the abbreviation used in filenames for a given experiment.