Change request #1030

Add cfitsio utility functions

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

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

100%

Category:-Estimated time:2.00 hours
Target version:00-08-00
Duration:

Description

Several cfitsio functions are used widely in the FITS module, hence they could be define in a single utility function to reduce the number of lines in the code. An example is the “move to HDU” code

    // Move to HDU
    int status = 0;
    status     = __ffmahd(FPTR(vptr), (FPTR(vptr)->HDUposition)+1, NULL,
                          &status);
    if (status != 0) {
        std::string msg = "Unable to move FITS file pointer to extension" 
                          " number "+
                          gammalib::str((FPTR(vptr)->HDUposition))+".";
        throw GException::fits_error(G_READ_STR, status, msg);
    }

Here, the NULL pointer could be replaced by an integer that holds the HDU type, and this type could be returned by the function when necessary.


Recurrence

No recurrence.

History

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

  • Status changed from In Progress to Closed
  • Target version set to 00-08-00
  • % Done changed from 10 to 100

Done

Also available in: Atom PDF