LSSTApplications  11.0-13-gbb96280,12.1+18,12.1+7,12.1-1-g14f38d3+72,12.1-1-g16c0db7+5,12.1-1-g5961e7a+84,12.1-1-ge22e12b+23,12.1-11-g06625e2+4,12.1-11-g0d7f63b+4,12.1-19-gd507bfc,12.1-2-g7dda0ab+38,12.1-2-gc0bc6ab+81,12.1-21-g6ffe579+2,12.1-21-gbdb6c2a+4,12.1-24-g941c398+5,12.1-3-g57f6835+7,12.1-3-gf0736f3,12.1-37-g3ddd237,12.1-4-gf46015e+5,12.1-5-g06c326c+20,12.1-5-g648ee80+3,12.1-5-gc2189d7+4,12.1-6-ga608fc0+1,12.1-7-g3349e2a+5,12.1-7-gfd75620+9,12.1-9-g577b946+5,12.1-9-gc4df26a+10
LSSTDataManagementBasePackage
Namespaces | Classes | Functions
lsst.afw.fits Namespace Reference

Namespaces

 pickleFits
 

Classes

class  HeaderIterationFunctor
 An exception thrown when problems are found when reading or writing FITS files. More...
 
class  MemFileManager
 Lifetime-management for memory that goes into FITS memory files. More...
 
class  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...
 

Functions

std::string makeErrorMessage (std::string const &fileName="", int status=0, std::string const &msg="")
 Return an error message reflecting FITS I/O errors. More...
 
std::string makeErrorMessage (std::string const &fileName, int status, boost::format const &msg)
 
std::string makeErrorMessage (void *fptr, int status=0, std::string const &msg="")
 Return an error message reflecting FITS I/O errors. More...
 
std::string makeErrorMessage (void *fptr, int status, boost::format const &msg)
 
template<typename T >
int getBitPix ()
 Return the cfitsio integer BITPIX code for the given data type. More...
 
boost::shared_ptr
< daf::base::PropertyList
readMetadata (std::string const &fileName, int hdu=0, bool strip=false)
 Read FITS header. More...
 
boost::shared_ptr
< daf::base::PropertyList
readMetadata (fits::MemFileManager &manager, int hdu=0, bool strip=false)
 Read FITS header. More...
 
boost::shared_ptr
< daf::base::PropertyList
readMetadata (fits::Fits &fitsfile, bool strip=false)
 Read FITS header. More...
 

Function Documentation

template<typename T >
int lsst::afw::fits::getBitPix ( )

Return the cfitsio integer BITPIX code for the given data type.

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.

Parameters
[in]fileNameFITS filename to be included in the error message.
[in]statusThe last status value returned by the cfitsio library; if nonzero, the error message will include a description from cfitsio.
[in]msgAn additional custom message to include.
std::string lsst::afw::fits::makeErrorMessage ( std::string const &  fileName,
int  status,
boost::format const &  msg 
)
inline

Definition at line 69 of file fits.h.

69  {
70  return makeErrorMessage(fileName, status, msg.str());
71 }
int status
std::string makeErrorMessage(std::string const &fileName="", int status=0, std::string const &msg="")
Return an error message reflecting FITS I/O errors.
std::string lsst::afw::fits::makeErrorMessage ( void *  fptr,
int  status = 0,
std::string const &  msg = "" 
)

Return an error message reflecting FITS I/O errors.

Parameters
[in]fptrA cfitsio fitsfile pointer to be inspected for a filename. Passed as void* to avoid including fitsio.h in the header file.
[in]statusThe last status value returned by the cfitsio library; if nonzero, the error message will include a description from cfitsio.
[in]msgAn additional custom message to include.
std::string lsst::afw::fits::makeErrorMessage ( void *  fptr,
int  status,
boost::format const &  msg 
)
inline

Definition at line 83 of file fits.h.

83  {
84  return makeErrorMessage(fptr, status, msg.str());
85 }
int status
std::string makeErrorMessage(std::string const &fileName="", int status=0, std::string const &msg="")
Return an error message reflecting FITS I/O errors.
boost::shared_ptr< daf::base::PropertyList > lsst::afw::fits::readMetadata ( std::string const &  fileName,
int  hdu = 0,
bool  strip = false 
)
inline

Read FITS header.

If 'strip' is true, common FITS keys that usually have non-metadata intepretations (e.g. NAXIS, BITPIX) will be ignored.

Includes support for the INHERIT convention: if 'INHERIT = T' is in the header, the PHU will be read as well, and nominated HDU will override any duplicated values.

Read FITS header.

Deprecated:
Use lsst::afw::fits::readMetadata instead.
Parameters
[in]fileNameFile to read.
[in]hduHDU to read, 1-indexed. The special value of 0 will read the first non-empty HDU.
[in]stripIf true, ignore special header keys usually managed by cfitsio (e.g. NAXIS).

Definition at line 62 of file Utils.h.

62  {
63  return afw::fits::readMetadata(fileName, hdu, strip);
64 }
boost::shared_ptr< daf::base::PropertyList > readMetadata(std::string const &fileName, int hdu=0, bool strip=false)
Read FITS header.
Definition: Utils.h:62
boost::shared_ptr< daf::base::PropertyList > lsst::afw::fits::readMetadata ( fits::MemFileManager &  manager,
int  hdu = 0,
bool  strip = false 
)

Read FITS header.

If 'strip' is true, common FITS keys that usually have non-metadata intepretations (e.g. NAXIS, BITPIX) will be ignored.

Includes support for the INHERIT convention: if 'INHERIT = T' is in the header, the PHU will be read as well, and nominated HDU will override any duplicated values.

Read FITS header.

Deprecated:
Use lsst::afw::fits::readMetadata instead.
Parameters
[in]fileNameFile to read.
[in]hduHDU to read, 1-indexed. The special value of 0 will read the first non-empty HDU.
[in]stripIf true, ignore special header keys usually managed by cfitsio (e.g. NAXIS).
boost::shared_ptr< daf::base::PropertyList > lsst::afw::fits::readMetadata ( fits::Fits &  fitsfile,
bool  strip = false 
)

Read FITS header.

If 'strip' is true, common FITS keys that usually have non-metadata intepretations (e.g. NAXIS, BITPIX) will be ignored.

Includes support for the INHERIT convention: if 'INHERIT = T' is in the header, the PHU will be read as well, and nominated HDU will override any duplicated values.

Read FITS header.

Deprecated:
Use lsst::afw::fits::readMetadata instead.
Parameters
[in]fileNameFile to read.
[in]hduHDU to read, 1-indexed. The special value of 0 will read the first non-empty HDU.
[in]stripIf true, ignore special header keys usually managed by cfitsio (e.g. NAXIS).