26 #include <boost/regex.hpp>
29 #include <CCfits/CCfits>
39 using boost::regex_match;
59 CCfits::ExtHDU& table_hdu = fits->extension(1);
61 table_hdu.readAllKeys();
62 auto keyword_map = table_hdu.keyWord();
64 if (iter != keyword_map.end()) {
65 iter->second->value(dataset_name);
73 return (dataset_name);
84 CCfits::FITS::setVerboseMode(
true);
90 const CCfits::ExtHDU& table_hdu = fits->extension(1);
96 for (
auto row : table) {
101 catch (CCfits::FitsException& fits_except){
113 bool is_a_dataset_file =
true;
116 const CCfits::ExtHDU& table_hdu = fits->extension(1);
117 ELEMENTS_UNUSED auto& temp =
dynamic_cast<const CCfits::Table&
>(table_hdu);
119 catch (CCfits::FitsException& fits_except){
120 is_a_dataset_file =
false;
122 return is_a_dataset_file;
std::string removeAllBeforeLastSlash(const std::string &input_str)
bool isDatasetFile(const std::string &file) override
Check that the FITS file is a dataset file(with at least one HDU table)
std::string m_name_keyword
Table read(long rows=-1)
Reads next rows as a table.
std::string removeExtension(const std::string &input_str)
This module provides an interface for accessing two dimensional datasets (pairs of (X...
TableReader implementation for reading FITS tables.
std::string getName(const std::string &file) override
Get the dataset name of a FITS file.
std::unique_ptr< XYDataset > getDataset(const std::string &file) override
Get a XYDataset object reading data from an FITS file.