Action #1137

Action #1096: BackgroundModel from IRF

Bug Fix for the new GCTAModelBackground constructor

Added by Gerard Lucie about 10 years ago. Updated almost 10 years ago.

Status:ClosedStart date:02/07/2014
Priority:ImmediateDue date:
Assigned To:Gerard Lucie% Done:

100%

Category:-
Target version:00-09-00
Duration:

Description

Some bugs have been found in relation with the following new GCTAModelBackground constructor:
GCTAModelBackground::GCTAModelBackground(const GCTAObservation& obs,
const std::string& filename,
const GModelSpectral& spectral,
const int& nx_sky,
const int& ny_sky,
const int& n_energy)

and the related function

void GCTAModelBackground::set_spatial(const GCTAObservation& obs,
const std::string& filename,
const int& nx_sky,
const int& ny_sky,
const int& n_energy)

The needed fix are:
- in the constructor: initialisation of m_temporal
- in set_spatial: correct filling of the GEnergies in the case m_energy=0
- in @set_spatial: add GException in case nx_sky or ny_sky or n_energy is <0 (not really a bug but taken care of here anyway)


Recurrence

No recurrence.

History

#1 Updated by Mayer Michael about 10 years ago

While looking through the code I also found a small bug in set_spatial which causes all GEnergies to have the same value. In line 1094f.:

GEnergy  emin(background.axis_lo(2,0), unit_lo);
GEnergy  emax(background.axis_hi(2,background.axis(2)-1), unit_hi);

should probably be changed to
GEnergy  emin(background.axis_lo(2,i), unit_lo);
GEnergy  emax(background.axis_hi(2,i), unit_hi);

#2 Updated by Gerard Lucie about 10 years ago

that’s what I meant but the second fix needed :)

#3 Updated by Mayer Michael about 10 years ago

oh yes, sorry . Great that we found the same one

#4 Updated by Gerard Lucie about 10 years ago

  • Status changed from New to Pull request

branch 1137_GCTAModelBackground_bug_fix have been created. Previously mentioned fix are implemented there.

#5 Updated by Knödlseder Jürgen about 10 years ago

Have you pushed the branch into the repository? I cannot see it ...

#6 Updated by Gerard Lucie about 10 years ago

The push command was not the full one...
With “git push origin 1137_GCTAModelBackground_bug_fix” the branch should now be there, hopefully.

#7 Updated by Knödlseder Jürgen about 10 years ago

  • Status changed from Pull request to Feedback
  • Target version set to 2nd coding sprint
  • % Done changed from 0 to 100

Got it. Merged into devel.

#8 Updated by Knödlseder Jürgen almost 10 years ago

  • Status changed from Feedback to Resolved
  • Target version changed from 2nd coding sprint to 00-09-00

#9 Updated by Knödlseder Jürgen almost 10 years ago

  • Status changed from Resolved to Closed
  • Remaining (hours) set to 0.0

Also available in: Atom PDF