Feature #2454
Implement EBL spectral model
Status: | Closed | Start date: | 04/19/2018 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assigned To: | Tibaldo Luigi | % Done: | 100% | |
Category: | - | |||
Target version: | 1.6.0 | |||
Duration: |
Description
Implement a spectral model that emulates the EBL absorption.
Recurrence
No recurrence.
History
#1 Updated by Tibaldo Luigi over 6 years ago
- Status changed from New to In Progress
- Assigned To set to Tibaldo Luigi
The easiest solution seems to be he implementation of the exponential of an arbitrary spectral model. If we call F the the intrinsic spectrum of the source (for which we assume we can use one of the existing models, e.g. power law), tau the tabulated optical depth as a function of energy for a given EBL model and source redishift, MUL the multiplicative model function (already available), EXP the exponential to be implemented, we could model the EBL attenuated spectrum as
MUL))
with Normalization as free parameter.
I will investigate with AGN experts if this is sufficient for their aims.
#2 Updated by Tibaldo Luigi over 6 years ago
- % Done changed from 0 to 40
Implemented class GModelSpectralExponential in gammalib (including swig interface). Now working on testing and debugging.
#3 Updated by Tibaldo Luigi over 6 years ago
- % Done changed from 40 to 70
Debugged and test routines created. Simple tests produce the expected results.
Will now proceed to high level tests in ctools.
#4 Updated by Tibaldo Luigi over 6 years ago
- File spectrum.png added
- File sed.png added
- % Done changed from 70 to 90
I analyzed both data samples with the absorbed model defined as PowerLaw X Exp (- alpha x tau), where tau was the same tabulated opacity model used in the simulation. The results were in both cases compatible with the Monte Carlo truth, in particular the value of the alpha parameter resulted:
- 0.96 pm 0.09 for the simulation with absorption
- 0.002 pm 0.003 for the simulation without absorption
The following graph shows the SED derived from the absorbed dataset
Everything seems to work as expected.
#5 Updated by Tibaldo Luigi over 6 years ago
- Status changed from In Progress to Pull request
- % Done changed from 90 to 100
All done from my side. Note that the pull request applies for the branches 2454 in both gammalib and ctools. The latter contain just an addition to the User Manual that illustrates how to use the new function to model EBL absorption.
#6 Updated by Knödlseder Jürgen over 6 years ago
I looked into the model and it seems to me that it actually has no alpha parameter. Is this true?
#7 Updated by Tibaldo Luigi over 6 years ago
It has no explicit extra normalization. Every spectral model that you could use as exponent has its own normalization parameter, so I thought there was no need to add a second one.
Do you think the exponential function should add an additional normalization factor? To me that seems dangerous because in the end you would always have two normalizations, and it would be ambiguous which one to use.
#8 Updated by Knödlseder Jürgen over 6 years ago
You are absolutely correct, no extra parameter is in fact needed. Just wanted to double check that this was your intention.
#9 Updated by Knödlseder Jürgen over 6 years ago
Merged GammaLib code into devel
. Now will work on the ctools part.
#10 Updated by Knödlseder Jürgen over 6 years ago
- File crab_prefactor.png added
- File crab_index.png added
- File crab_normalization.png added
- File bgd_prefactor.png added
- File bgd_index.png added
I added a test to the science_verification.py
script, things look good, below the respective pull distributions.
#11 Updated by Knödlseder Jürgen over 6 years ago
- Status changed from Pull request to Closed
Merged into devel
.