Feature #651

Crab reference spectra

Added by Deil Christoph over 11 years ago. Updated over 11 years ago.

Status:In ProgressStart date:12/17/2012
Priority:NormalDue date:
Assigned To:Deil Christoph% Done:

0%

Category:-
Target version:-
Duration:

Description

The Crab is often used as a standard candle in gamma-ray astronomy.
Statements like “this source has a flux of 10 % Crab” or “our sensitivity is 2 % Crab” are common.
Gammalib could contain reference published Crab spectra to make this easy for the user.
Attached find a Python implementation that I have been using in the past.

Jürgen, do you want this in Gammalib?
I think the Meyer model might deserve it’s own class (GModelSpectralCrabMeyer ?), the others maybe as xml models or not at all?

crab.py Magnifier (5.21 KB) Deil Christoph, 12/17/2012 10:52 AM

test_crab.py Magnifier (2.42 KB) Deil Christoph, 12/17/2012 10:52 AM

crab_flux.png (65.5 KB) Deil Christoph, 12/17/2012 10:52 AM

crab_index.png (47.7 KB) Deil Christoph, 12/17/2012 10:52 AM

crab_int_flux.png (72.9 KB) Deil Christoph, 12/17/2012 10:52 AM

crab_ratio.png (59.3 KB) Deil Christoph, 12/17/2012 10:52 AM

Crab_flux Crab_index Crab_int_flux Crab_ratio

Recurrence

No recurrence.

History

#1 Updated by Knödlseder Jürgen over 11 years ago

The easiest way how to implement these models is via the GModelSpectralFunc class. This model reads an arbitrary number of spectral points from an ASCII file, and performs linear interpolations in the log-log plane. It would be sufficient to put the corresponding ASCII files somewhere in GammaLib, and they can be centrally installed in /usr/local/gamma/share/models.

I won’t create a special class for this, as everyone may have his preferred Crab spectrum (and this depends of course also on energy). So it’s better to provide the spectral description in the models folder, and we can also deliver example XML scripts that illustrate their usage.

#2 Updated by Mayer Michael over 11 years ago

Hi Christoph, Hi Jürgen,
I think it is a very nice idea to have such a reference within GammaLib. If I understand correctly, the Meyer (2010)-model ist just a 5th degree polynomial. Maybe it would be interesting to have something like a GModelSpectralPolynomial which is a spectral model of a polynomial function of n degrees. Than it would be easy to implement the meyer-model either by an xml-file or by a specific class (GModelSpectralCrabMeyer) which inherits from the GModelSpectralPolynomial and calls this class with the correct numbers. A GModelSpectralPolynomial could also be very useful for modelling spectral energy distributions over a large energy range. In addition, it would be easy to find e.g. an Inverse Compton peak with this model since its derivative is well-defined and easy to calculate.

#3 Updated by Knödlseder Jürgen over 11 years ago

Have you had a look into GModelSpectralNodes? It fits a piecewise power law to the data. The transitions are not smooth as in a polynomial, but it can fit arbitrary shapes.

GModelSpectralPolynomial would be also interesting. I guess the polynomial should be in the log-log plane? I played with polynomials already for fitting the acceptance profile (see GCTAModelRadialPolynom), but the convergence of this becomes quickly a headache. I think the problem is the strong link between the factors of a polynomial. To make this work, I guess one would need to work in a basis where the polynomial factors are pretty orthogonal.

Also available in: Atom PDF