LSSTApplications  10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
LSSTDataManagementBasePackage
Classes | Namespaces | Macros | Functions
fits.h File Reference
#include <string>
#include <boost/format.hpp>
#include <boost/scoped_array.hpp>
#include "lsst/pex/exceptions.h"
#include "lsst/daf/base.h"
#include "ndarray.h"

Go to the source code of this file.

Classes

class  lsst.afw.fits::HeaderIterationFunctor
 An exception thrown when problems are found when reading or writing FITS files. More...
 
class  lsst.afw.fits::MemFileManager
 Lifetime-management for memory that goes into FITS memory files. More...
 
class  lsst.afw.fits::Fits
 A simple struct that combines the two arguments that must be passed to most cfitsio routines and contains thin and/or templated wrappers around common cfitsio routines. More...
 

Namespaces

 lsst
 < multiple inclusion guard macro
 
 lsst.afw
 
 lsst.afw.fits
 

Macros

#define LSST_FITS_EXCEPT(type, fitsObj,...)   type(LSST_EXCEPT_HERE, lsst::afw::fits::makeErrorMessage((fitsObj).fptr, (fitsObj).status, __VA_ARGS__))
 
#define LSST_FITS_CHECK_STATUS(fitsObj,...)   if ((fitsObj).status != 0) throw LSST_FITS_EXCEPT(lsst::afw::fits::FitsError, fitsObj, __VA_ARGS__)
 

Functions

std::string lsst.afw.fits::makeErrorMessage (std::string const &fileName="", int status=0, std::string const &msg="")
 Return an error message reflecting FITS I/O errors. More...
 
std::string lsst.afw.fits::makeErrorMessage (std::string const &fileName, int status, boost::format const &msg)
 
std::string lsst.afw.fits::makeErrorMessage (void *fptr, int status=0, std::string const &msg="")
 Return an error message reflecting FITS I/O errors. More...
 
std::string lsst.afw.fits::makeErrorMessage (void *fptr, int status, boost::format const &msg)
 
template<typename T >
int lsst.afw.fits::getBitPix ()
 Return the cfitsio integer BITPIX code for the given data type. More...
 

Detailed Description

Utilities for working with FITS files. These are mostly thin wrappers around cfitsio calls, and their main purpose is to transform functions signatures from void pointers and cfitsio's preprocessor type enums to a more type-safe and convenient interface using overloads and templates.

This was written as part of implementing the afw/table library. Someday the afw/image FITS I/O should be modified to use some of these with the goal of eliminating a lot of code between the two.

Definition in file fits.h.

Macro Definition Documentation

#define LSST_FITS_CHECK_STATUS (   fitsObj,
  ... 
)    if ((fitsObj).status != 0) throw LSST_FITS_EXCEPT(lsst::afw::fits::FitsError, fitsObj, __VA_ARGS__)

Throw a FitsError exception if the status of the given Fits object is nonzero.

Definition at line 97 of file fits.h.

#define LSST_FITS_EXCEPT (   type,
  fitsObj,
  ... 
)    type(LSST_EXCEPT_HERE, lsst::afw::fits::makeErrorMessage((fitsObj).fptr, (fitsObj).status, __VA_ARGS__))

A FITS-related replacement for LSST_EXCEPT that takes an additional Fits object and uses makeErrorMessage(fitsObj.fptr, fitsObj.status, ...) to construct the message.

Definition at line 91 of file fits.h.