DataBuilder Functions to create TableData objects from FITS files. More...
#include <string>
#include "Constants.h"
#include "Converter.h"
#include "FitsFile.h"
#include "Logger.h"
#include "MyException.h"
#include "StringOps.h"
#include "TableData.hxx"
#include "TableInfo.h"
Go to the source code of this file.
Classes | |
class | InsertDataException |
Functions | |
template<typename DataType > | |
void | insertExtNum (FitsFile &ff, TableInfo &info, TableData< DataType > &data) |
template<typename DataType > | |
void | insertKeywordValue (int colNo, int rowNo, FitsFile &ff, std::string keyword, TableData< DataType > &data) |
Insert the value for the given FITS keyword into the data structure. | |
template<typename DataType > | |
void | insertFitsPrimaryHeader (int rowNo, FitsFile &ff, TableInfo &info, TableData< DataType > &data) |
template<typename DataType > | |
void | insertFitsExtensionHeader (int rowNo, FitsFile &ff, TableInfo &info, TableData< DataType > &data) |
template<typename DataType > | |
void | insertFitsColumns (int firstRow, FitsFile &ff, TableInfo &info, TableData< DataType > &data) |
DataBuilder Functions to create TableData objects from FITS files.
void insertExtNum | ( | FitsFile & | ff, | |
TableInfo & | info, | |||
TableData< DataType > & | data | |||
) | [inline] |
Insert the FITS file extension numbers into the data object if the schema requires it. The data object could correspond to image metadata or catalog data. This routine assumes that the row structure within the data object will match up with the FITS file structure.
References TableData< DataType >::assign(), TableInfo::ColNotFound, ExpectNames::extNum, TableInfo::getAttNo(), FitsFile::getNumHdus(), FitsFile::getNumRows(), FitsFile::isBinaryTable(), FitsFile::isImageHdu(), and FitsFile::movabsHdu().
Referenced by Extension< DataType >::build().
void insertFitsColumns | ( | int | firstRow, | |
FitsFile & | ff, | |||
TableInfo & | info, | |||
TableData< DataType > & | data | |||
) | [inline] |
Insert data from columns in a binary table extension into the data object according to the schema
References Logger::addWarning(), TableData< DataType >::assign(), Converter::getFactor(), TableInfo::getFitsColumnName(), TableInfo::getNumAttributes(), FitsFile::getNumRows(), TableInfo::getUnits(), TableData< DataType >::loadFitsColumn(), FitsFile::readColumnUnit(), TableData< DataType >::setundef(), and TableData< DataType >::value().
void insertFitsExtensionHeader | ( | int | rowNo, | |
FitsFile & | ff, | |||
TableInfo & | info, | |||
TableData< DataType > & | data | |||
) | [inline] |
Insert all extension FITS header keys into the data object according to the given schema.
References TableInfo::getFitsKeywordName(), TableInfo::getNumAttributes(), insertKeywordValue(), FitsFile::isBinaryTable(), FitsFile::isImageHdu(), and StringOps::splitDoublet().
Referenced by Primary< DataType >::build(), and Extension< DataType >::build().
void insertFitsPrimaryHeader | ( | int | rowNo, | |
FitsFile & | ff, | |||
TableInfo & | info, | |||
TableData< DataType > & | data | |||
) | [inline] |
Insert all primary FITS header keys into the data object according to the given schema.
References TableInfo::getFitsKeywordName(), TableInfo::getNumAttributes(), insertKeywordValue(), FitsFile::movabsHdu(), and StringOps::splitDoublet().
Referenced by Primary< DataType >::build(), and Extension< DataType >::build().
void insertKeywordValue | ( | int | colNo, | |
int | rowNo, | |||
FitsFile & | ff, | |||
std::string | keyword, | |||
TableData< DataType > & | data | |||
) | [inline] |
Insert the value for the given FITS keyword into the data structure.
References Logger::addWarning(), TableData< DataType >::assign(), FitsFile::getFileName(), FitsFile::getHduNum(), FitsFile::movabsHdu(), StringOps::NumToString(), FitsFile::readKey(), TableData< DataType >::setundef(), and PreSuffixNames::tileSuffix.
Referenced by insertFitsExtensionHeader(), and insertFitsPrimaryHeader().