Bug #2149

fits temporal model

Added by Gasparetto Thomas almost 7 years ago. Updated almost 7 years ago.

Status:ClosedStart date:07/05/2017
Priority:NormalDue date:
Assigned To:Knödlseder Jürgen% Done:

100%

Category:-
Target version:1.3.1
Duration:

Description

I’m reporting a problem encountered when working with variable sources in which the temporal model is specified with a fits file.
According to the dedicated web page (http://cta.irap.omp.eu/ctools/users/user_manual/getting_started/models.html#temporal-model-components), the normalization has to be in the range 0 to 1.
I built a model in which the normalization is 1 for the few tens of seconds and then it decays as a power law, but I am having some problems when running the simulation with this model because I get an error message saying that some values exceeds 1.
I avoided this problem using a time normalization equal to 2.0 and multiplying the fits file by 0.5, and I don’t get the error any more, but of course it is just a temporary solution.
Can you check if this is a real problem or if I’m doing something wrong?
thanks
Thomas Gasparetto

test_variable.tar (526 KB) Gasparetto Thomas, 07/06/2017 02:21 PM


Recurrence

No recurrence.

History

#1 Updated by Knödlseder Jürgen almost 7 years ago

Could you please post the FITS file that poses problems, as well as the XML file, so that I can reproduce the problem?

#2 Updated by Gasparetto Thomas almost 7 years ago

Knödlseder Jürgen wrote:

Could you please post the FITS file that poses problems, as well as the XML file, so that I can reproduce the problem?

Here attached you can find the xml model as well as the spectrum (in dat file) and the light curve in FITS format.
There is also a screenshot from the error that I get.

#3 Updated by Knödlseder Jürgen almost 7 years ago

  • Status changed from New to In Progress
  • Assigned To set to Knödlseder Jürgen
  • Target version set to 1.3.1
  • % Done changed from 0 to 80

Thanks for the files. I found the problem. Although it looks like the FITS file contains no values larger than 1, there was a value at time 50 with a value of 1 + 2.22045e-16, which led to the problem.

I now added a small margin of 1e-8 when light curve normalisation are tested to accommodate for round-off errors. If there are some values in the interval [1, 1+1e-8] they will internally all set to 1.0.

I’m about to merge the change in the bugfix-1.3.1 branch.

#4 Updated by Gasparetto Thomas almost 7 years ago

ok perfect!
thanks!

#5 Updated by Knödlseder Jürgen almost 7 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 80 to 100

Merged in bugfix-1.3.1.

Also available in: Atom PDF