Bug #1246
LogParabola model does not work
Status: | Closed | Start date: | 07/08/2014 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assigned To: | Knödlseder Jürgen | % Done: | 100% | |
Category: | - | |||
Target version: | 1.0.0 | |||
Duration: |
Description
Attached is an example script which simulates and fits the Crab nebula. When changing the spectral model from a parabola to log parabola the script crashes:
RuntimeError: *** ERROR in GOptimizerPar::factor_value(double&): Invalid argument.
Specified value factor 3.2e-17 is smaller than the minimum boundary 0.1.
The minimum is indeed set at line 812 in GModelSpectralLogParabola.cpp:
m_norm.min(0.1);
When I set this to zero and recompile the following error appears:
+++ WARNING in GIntegral::romb(100000, 1e+08, 5): Integration uncertainty nan exceeds tolerance of nan after 21 iterations. Result -nan is inaccurate.
The prefactor of the logparabola is fit towards zero:
Prefactor ................: 1.8054e-20 +/- 6.23361e-20
To run the script the caldb needs to be in the same folder.
Recurrence
No recurrence.
History
#1 Updated by Knödlseder Jürgen over 10 years ago
- Project changed from ctools to GammaLib
#2 Updated by Knödlseder Jürgen over 10 years ago
- Target version set to 1.0.0
#3 Updated by Knödlseder Jürgen about 10 years ago
- File logpar_example.py added
- File ctlike.log added
- Status changed from New to Feedback
- Assigned To set to Knödlseder Jürgen
- % Done changed from 0 to 100
I’m not sure why the minimum has been set to 0.1 in the code, I set it now to 0.0.
I redid you test with the latest version after slightly adapting your script to my environment (see logpar_example.py). It seems to work now (see attached ctlike logfile: ctlike.log).
I put this issue now on feedback and will close you with the next release in case that I hear not back from you.
#4 Updated by Knödlseder Jürgen almost 10 years ago
- File prefactor.png added
- File index.png added
- File curvature.png added
- Status changed from Feedback to Closed
Below the result from a pull distribution test using a point source and the log parabola model. Everything seems okay. I close now the issue.