Skip to the content.

(back to main page)

General info

GAMERA is a project launched by the Max Planck Institute for Nuclear Physics (MPIK), aC++ library for modeling in high energy astrophysics. It is also available as a swig-wrapped python module (which is internally called gappa).

Here is a list of what you can do with it:

And here are some things that you can’t do directly with GAMERA at the moment:

How to use these features is shown in the tutorials section.

At the time of writing, python is quite popular and the tutorials on these pages are provided in that language. However, you can use GAMERA also in your C++ program by adapting the syntax, e.g. instead of the python code

fr = gappa.Radiation()
fr.SetBField(b)
[...]
sed = fr.GetTotalSED()

you could write in C++ syntax

Radiation *fRad = new Radiation();
fRad->SetBField(b);
[...]
vector< vector<double> > SED = fRad->GetTotalSED();

Please check out the installation instructions to learn how to make GAMERA work in either language.

Particle evolution

The intention of GAMERA is to make the modeling of particle spectra in typical scenarios relavant to gamma-ray astronomy as simple as possible.

The Particles class is designed to solve the following transport equation

dgl

where Q(E,t), the source term, is the spectrum of particles injected into a system, b=b(E,t) is the energy loss rate of these particles, tesc=tesc(E,t) is the time scale on which particle escape the system and N=N(E,t) is the total resulting particle spectrum in the system at a time t.

An example which is described by this equation could be a pulsar wind nebula (PWN) where the pulsar steadily injects a spectrum of accelerated electrons / positrons into the surrounding medium, where these particles suffer Synchrotron- and other losses over time.

If the energy loss rate and escape time scale are constant in time, b=b(E) and tesc=tesc(E), the differential equation can be solved analytically or semi-analytically. An excellent discussion of this solution can be found in Atoyan & Aharonian 1999.

If the losses and escape times are time-dependent, typically the equation can only be solved numerically. The approach in GAMERA is to interpret the transport equation as an advective flow in energy space and solve it using a donor-cell advection algorithm.

This method also allows for iterative models, because model parameters can be changed while the numerical method is running. This allows for example for the interaction between particles and their emitted radiation, or between multiple zones of particles.

Per default, the numerical method will be used. However, if the user is sure that energy losses are constant in time, the semi-analytical method can be applied, which in certain circumstances can be much faster. However, the latter does presently not support the treatment of particle escape.

The output of this class, namely particle spectra N(E,t), is in the right format to be directly used in the Radiation class, so that radiation spectra can be calculated easily.

Radiation models

In GAMERA, radiation mechanisms are implemented for

Supported gamma-ray production mechanisms:

for Electrons

for Hadrons

Data Types

GAMERA uses doubles, vectors of doubles, vectors of double-tuples and 2D vectors of doubles.

If you use python and numpy, you can conveniently cast the GAMERA output into numpy-arrays for further manipulation. Also, GAMERA accepts numpy-arrays as input. In particular, numpy.meshgrid can be used as input for the last bullet point in the above list.

Units

Units in GAMERA are mostly in cgs, with several exceptions that are meaningful in the astrophysical context.

Also, the units of the spectrum will impact the unit of the calculated radiation spectra. For instance, if the unit of the particle spectrum is only differential in energy, i.e. 1/erg, the output radiation spectra will have the unit of a flux if a source distance is specified (see below) or differential photon count per energy and time if not.

On the other hand, if the input unit is differential also in volume, i.e. 1/erg/cm3, then also the output radiation spectrum will be. Therefore, if no distance is specified in this case, a volume photon emissivity will be calculated, i.e. d3N/dEdVdt.

Libraries

GAMERA uses

(back to main page)