26#include <CCfits/CCfits>
27#include <boost/regex.hpp>
39using boost::regex_match;
50 if (dataset_name.
empty()) {
56 return (dataset_name);
70 CCfits::ExtHDU& table_hdu = fits->extension(1);
72 table_hdu.readAllKeys();
73 auto keyword_map = table_hdu.keyWord();
74 auto iter = keyword_map.find(key_word);
75 if (iter != keyword_map.end()) {
76 iter->second->value(value);
90 CCfits::FITS::setVerboseMode(
true);
96 const CCfits::ExtHDU& table_hdu = fits->extension(1);
102 for (
auto row : table) {
106 }
catch (CCfits::FitsException& fits_except) {
111 return (dataset_ptr);
118 bool is_a_dataset_file =
true;
121 const CCfits::ExtHDU& table_hdu = fits->extension(1);
122 ELEMENTS_UNUSED auto& temp =
dynamic_cast<const CCfits::Table&
>(table_hdu);
123 }
catch (CCfits::FitsException& fits_except) {
124 is_a_dataset_file =
false;
126 return is_a_dataset_file;
TableReader implementation for reading FITS tables.
Table read(long rows=-1)
Reads next rows as a table.
std::unique_ptr< XYDataset > getDataset(const std::string &file) override
Get a XYDataset object reading data from an FITS file.
std::string getName(const std::string &file) override
Get the dataset name of a FITS file.
bool isDatasetFile(const std::string &file) override
Check that the FITS file is a dataset file(with at least one HDU table)
std::string getParameter(const std::string &file, const std::string &key_word) override
Get the parameter identified by a given key_word value from a file.
std::string m_name_keyword
This module provides an interface for accessing two dimensional datasets (pairs of (X,...
std::string removeExtension(const std::string &input_str)
std::string removeAllBeforeLastSlash(const std::string &input_str)