Absorption

class gammapy.modeling.models.Absorption(energy, param, data, filename=None, interp_kwargs=None)[source]

Bases: object

Gamma-ray absorption models.

Usually used as part of AbsorbedSpectralModel.

Parameters
energyQuantity

Energy node values

paramQuantity

Parameter node values

dataQuantity

Model value

Attributes Summary

tag

Methods Summary

evaluate(self, energy, parameter)

Evaluate model for energy and parameter value.

from_dict(data)

read(filename)

Build object from an XSPEC model.

read_builtin(name)

Read one of the built-in absorption models.

table_model(self, parameter)

Table model for a given parameter (TemplateSpectralModel).

to_dict(self)

Attributes Documentation

tag = 'Absorption'

Methods Documentation

evaluate(self, energy, parameter)[source]

Evaluate model for energy and parameter value.

classmethod from_dict(data)[source]
classmethod read(filename)[source]

Build object from an XSPEC model.

Todo: Format of XSPEC binary files should be referenced at https://gamma-astro-data-formats.readthedocs.io/en/latest/

Parameters
filenamestr

File containing the model.

classmethod read_builtin(name)[source]

Read one of the built-in absorption models.

Parameters
name{‘franceschini’, ‘dominguez’, ‘finke’}

name of one of the available model in gammapy-data

References

1

Franceschini et al., “Extragalactic optical-infrared background radiation, its time evolution and the cosmic photon-photon opacity”, Link

2

Dominguez et al., ” Extragalactic background light inferred from AEGIS galaxy-SED-type fractions” Link

3

Finke et al., “Modeling the Extragalactic Background Light from Stars and Dust” Link

table_model(self, parameter)[source]

Table model for a given parameter (TemplateSpectralModel).

Parameters
parameterfloat

Parameter value.

to_dict(self)[source]