lsst.afw g9029821c7d+808890523f
Public Types | Public Member Functions | List of all members
lsst::afw::image::ExposureFitsReader::ArchiveReader Class Reference

Public Types

enum  Component {
  PSF = 0 , WCS , COADD_INPUTS , AP_CORR_MAP ,
  VALID_POLYGON , TRANSMISSION_CURVE , DETECTOR , PHOTOCALIB ,
  N_ARCHIVE_COMPONENTS
}
 

Public Member Functions

 ArchiveReader (daf::base::PropertyList &metadata)
 
template<typename T >
std::shared_ptr< T > readComponent (afw::fits::Fits *fitsFile, Component c)
 Read a known component, if available. More...
 
template<typename T >
std::shared_ptr< T > readComponent (afw::fits::Fits *fitsFile, std::string c)
 Read an arbitrary component, if available. More...
 
std::map< std::string, std::shared_ptr< table::io::Persistable > > readExtraComponents (afw::fits::Fits *fitsFile)
 Read the components that are stored using arbitrary-component support. More...
 

Detailed Description

Definition at line 217 of file ExposureFitsReader.cc.

Member Enumeration Documentation

◆ Component

Enumerator
PSF 
WCS 
COADD_INPUTS 
AP_CORR_MAP 
VALID_POLYGON 
TRANSMISSION_CURVE 
DETECTOR 
PHOTOCALIB 
N_ARCHIVE_COMPONENTS 

Definition at line 219 of file ExposureFitsReader.cc.

Constructor & Destructor Documentation

◆ ArchiveReader()

lsst::afw::image::ExposureFitsReader::ArchiveReader::ArchiveReader ( daf::base::PropertyList metadata)
inlineexplicit

Definition at line 231 of file ExposureFitsReader.cc.

Member Function Documentation

◆ readComponent() [1/2]

template<typename T >
std::shared_ptr< T > lsst::afw::image::ExposureFitsReader::ArchiveReader::readComponent ( afw::fits::Fits fitsFile,
Component  c 
)
inline

Read a known component, if available.

Parameters
fitsFileThe file from which to read the component. Must match the metadata used to construct this object.
cThe component to read. Must be convertible to T.
Returns
The desired component, or nullptr if the file could not be read.

Definition at line 293 of file ExposureFitsReader.cc.

◆ readComponent() [2/2]

template<typename T >
std::shared_ptr< T > lsst::afw::image::ExposureFitsReader::ArchiveReader::readComponent ( afw::fits::Fits fitsFile,
std::string  c 
)
inline

Read an arbitrary component, if available.

Parameters
fitsFileThe file from which to read the component. Must match the metadata used to construct this object.
cThe archive ID of the component to read.
Returns
The desired component, or nullptr if the file could not be read.
Exceptions
pex::exceptions::NotFoundErrorThrown if the component is registered in the file metadata but could not be found.
Note
When accessing from python, components with derived subclasses, such as TransmissionCurve, are not properly type converted and thus the specialized reader must be used instead of readComponent.

Definition at line 320 of file ExposureFitsReader.cc.

◆ readExtraComponents()

std::map< std::string, std::shared_ptr< table::io::Persistable > > lsst::afw::image::ExposureFitsReader::ArchiveReader::readExtraComponents ( afw::fits::Fits fitsFile)
inline

Read the components that are stored using arbitrary-component support.

Parameters
fitsFileThe file from which to read the components. Must match the metadata used to construct this object.
Returns
a map from string IDs to components, or an empty map if the file could not be read.

Definition at line 342 of file ExposureFitsReader.cc.


The documentation for this class was generated from the following file: