2 #ifndef AFW_TABLE_IO_FitsReader_h_INCLUDED 3 #define AFW_TABLE_IO_FitsReader_h_INCLUDED 70 template <
typename ContainerT>
75 FitsReader const* reader = _lookupFitsReader(*metadata);
77 reader->_setupArchive(fits, mapper, archive, ioFlags);
79 ContainerT container(std::dynamic_pointer_cast<typename ContainerT::Table>(table));
80 if (!container.getTable()) {
84 container.reserve(nRows);
103 template <
typename ContainerT,
typename SourceT>
108 return apply<ContainerT>(
fits, ioFlags, archive);
132 int ioFlags,
bool stripMetadata)
const;
153 #endif // !AFW_TABLE_IO_FitsReader_h_INCLUDED std::size_t countRows()
Return the number of row in a table.
static ContainerT apply(SourceT &source, int hdu, int ioFlags, std::shared_ptr< InputArchive > archive=std::shared_ptr< InputArchive >())
Create a new Catalog by reading a FITS file.
A utility class for reading FITS binary tables.
Class for storing ordered metadata with comments.
FitsReader(std::string const &persistedClassName)
Construct a FitsReader, registering it to be used for all persisted tables with the given tag...
A simple struct that combines the two arguments that must be passed to most cfitsio routines and cont...
A base class for image defects.
virtual ~FitsReader()=default
const char * source()
Source function that allows astChannel to source from a Stream.
FitsReader & operator=(FitsReader const &)=default
void setHdu(int hdu, bool relative=false)
Set the current HDU.
virtual std::shared_ptr< BaseTable > makeTable(FitsSchemaInputMapper &mapper, std::shared_ptr< daf::base::PropertyList > metadata, int ioFlags, bool stripMetadata) const
Callback to create a Table object from a FITS binary table schema.
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
static ContainerT apply(afw::fits::Fits &fits, int ioFlags, std::shared_ptr< InputArchive > archive=std::shared_ptr< InputArchive >())
Create a new Catalog by reading a FITS binary table.
virtual bool usesArchive(int ioFlags) const
Callback that should return true if the FitsReader subclass makes use of an InputArchive to read firs...
void readMetadata(daf::base::PropertySet &metadata, bool strip=false)
Read a FITS header into a PropertySet or PropertyList.
Reports errors that are due to events beyond the control of the program.