Bug #1361
GCTAPointing not initialized
Status: | Closed | Start date: | 11/10/2014 | |
---|---|---|---|---|
Priority: | High | Due date: | ||
Assigned To: | Knödlseder Jürgen | % Done: | 100% | |
Category: | - | |||
Target version: | 00-09-00 | |||
Duration: |
Description
After recent update, I find GCTAPointing not initialized when an observation is loaded.
For example,
obs = GObservations('obs.xml’)
pnt = obs0.pointing()
pntdir = pnt.dir()
pntdir.dec_deg()
the last line gives 0
It also shows in ctlike log message that
2014-11-10T12:53:27: === GCTAPointing ===
2014-11-10T12:53:27: Pointing direction ........: (RA,Dec)=(not initialised)
Is this a bug?
Recurrence
No recurrence.
History
#1 Updated by Mayer Michael about 10 years ago
- Description updated (diff)
The problem you describe is in GCTAObservation::read(const GXmlElement& xml)
. Due to a recent change, line 694 (where the events are loaded) is commented out. A quick fix for you might be to uncomment and recompile.
I am not sure but I think this line has been removed due to a problem with OpenMP and loading events simultaneously.
We might want to change the current way that instead of loading the events, we could only read the fits header to initialise observational attributes like pointing, livetime, etc. on reading. Instead of load
, we could call therefore call read_attributes()
to initialise all necessary information.
#2 Updated by Lu Chia-Chun about 10 years ago
- Status changed from New to Feedback
Hi Michael,
thank you. Uncommenting out that line works and ctlike doesn’t crash due to the old problem of openMP.?So I don’t know why this line was commented out. Let’s wait for Juergen’s reply.
And I agree with your suggestion!
#3 Updated by Knödlseder Jürgen about 10 years ago
The reason for the change was a reduction of memory needs. Now the events are only loaded when needed. I agree that we need to add a functionality for loading the pointing information from the header. I did already add some code to load the energy and ROI, but I forgot about the pointing ...
#4 Updated by Knödlseder Jürgen about 10 years ago
- Status changed from Feedback to Closed
- Assigned To set to Knödlseder Jürgen
- Target version set to 00-09-00
- % Done changed from 0 to 100
I corrected the code and merged it into the devel
branch.