Bug #30

GFits format conversion

Added by Knödlseder Jürgen almost 13 years ago. Updated about 11 years ago.

Status:ClosedStart date:02/20/2012
Priority:NormalDue date:
Assigned To:Knödlseder Jürgen% Done:

100%

Category:-
Target version:-
Duration:

Description

Loading a FITS double precision column into a GFitsTableFltCol object results in corrupted values. Maybe this is more a feature of the actual implementation, but the GFits table column classes should provide automatics type casting, at least if the value fits into the variable. In case that an overflow occurs, we may decide to either store Inf values or to throw and exception.


Recurrence

No recurrence.

History

#1 Updated by Knödlseder Jürgen about 11 years ago

  • Status changed from New to Closed
  • Assigned To set to Knödlseder Jürgen
  • % Done changed from 0 to 100

The problem was not type conversion but invalid type casting.

For example, the FITS file has a double precision column, and on loading, a GFitsTableDoubleCol object has been allocated. To access the column, a type cast to GFitsTableFloatCol has been done which led to a corrupt memory access. This problem occurred in the CTA and LAT event list reader.

Now, no typecasting is done anymore and the integer() and real() methods are used for data access.

Also available in: Atom PDF