Bug #1007

ctskymap and ctbin give unhelpful error messages about GSkymap::operator(GSkyPixel&,int&)

Added by Deil Christoph over 10 years ago. Updated over 10 years ago.

Status:In ProgressStart date:11/29/2013
Priority:NormalDue date:
Assigned To:Knödlseder Jürgen% Done:

50%

Category:-
Target version:-
Duration:

Description

I have an example event list (attached) that I am generating with a Python script ... I admit it most likely doesn’t conform to the CTA event list format.

Trying to bin the events with ctskymap or ctbin results in unhelpful error messages (see below).
This only seems to happen for some events ... for others it works!?

What’s the problem?
Is it possible to give better error messages to the user (e.g. event X has invalid value Y in the Z column)?

Or if those checks are to slow to do always, maybe we should write validator scripts similar to `ftverify`,
but specific to CTA event lists and IRF files that do all kinds of checks and evolve together with the specification documents?

eduroam-3-163:scripts deil$ ctskymap
Output file name [skymap.fits]
Event data file name [test_events.fits]
First coordinate of image center in degrees (RA or galactic l) [0]
Second coordinate of image center in degrees (DEC or galactic b) [0]
Minimum energy in TeV [0]
Maximum energy in TeV [1e10]
Projection method e.g. AIT|ARC|CAR|GLS|MER|NCP|SIN|STG|TAN [CAR]
Coordinate system (CEL - celestial, GAL - galactic) (CEL|GAL) [GAL]
Image scale (in degrees/pixel) [0.1]
Size of the X axis in pixels [3600]
Size of the Y axis in pixels [1800]
  • ERROR encounterted in the execution of ctskymap. Run aborted ...
  • ERROR in GSkymap::operator(GSkyPixel&,int&): Matrix element (-2147483648,-2147483648) out of range ([0,3598], [0,1798])
eduroam-3-163:scripts deil$ ctskymap
Output file name [skymap.fits]
Event data file name [test_events.fits]
First coordinate of image center in degrees (RA or galactic l) [0]
Second coordinate of image center in degrees (DEC or galactic b) [0]
Minimum energy in TeV [0]
Maximum energy in TeV [1e10]
Projection method e.g. AIT|ARC|CAR|GLS|MER|NCP|SIN|STG|TAN [CAR]
Coordinate system (CEL - celestial, GAL - galactic) (CEL|GAL) [GAL]
Image scale (in degrees/pixel) [0.1]
Size of the X axis in pixels [3600] 1
Size of the Y axis in pixels [1800] 1
  • ERROR encounterted in the execution of ctskymap. Run aborted ...
  • ERROR in GSkymap::operator(GSkyPixel&,int&): Empty matrix cannot be indexed.

test_events.fits (141 KB) Deil Christoph, 11/29/2013 08:30 PM


Recurrence

No recurrence.


Related issues

Related to GammaLib - Change request #35: Rework exceptions Closed 01/18/2016

History

#1 Updated by Knödlseder Jürgen over 10 years ago

  • Assigned To set to Knödlseder Jürgen

I see what can be done on this one. I seems that it’s related to a problem that occurs when reading double precision values in a single precision FITS column. This is something I wanted to track done since a while ...

#2 Updated by Knödlseder Jürgen over 10 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 50

The bug itself was corrected in gammalib (just pushed in integration branch for testing). See #30 (the problem was known since a while ;)

On the exception messages, there is feature #35 which forsees an extensive review of all exceptions. The actual one is in the list, as an exception written specifically for the matrix classes is used in the sky maps classes.

I related the current issue to feature #35 to make sure that it won’t be forgotten.

Also available in: Atom PDF