27 #ifndef GCTARESPONSETABLE_HPP
28 #define GCTARESPONSETABLE_HPP
64 std::vector<double>
operator()(
const double& arg)
const;
65 std::vector<double>
operator()(
const double& arg1,
const double& arg2)
const;
66 std::vector<double>
operator()(
const double& arg1,
const double& arg2,
67 const double& arg3)
const;
68 const double&
operator()(
const int& element)
const;
70 const double&
operator()(
const int& table,
const int& element)
const;
71 double&
operator()(
const int& table,
const int& element);
72 double operator()(
const int& table,
const double& arg)
const;
73 double operator()(
const int& table,
const double& arg1,
74 const double& arg2)
const;
75 double operator()(
const int& index,
const double& arg1,
76 const double& arg2,
const double& arg3)
const;
82 bool has_table(
const std::string& name)
const;
83 bool has_axis(
const std::string& name)
const;
84 const int&
axes(
void)
const;
85 const int&
tables(
void)
const;
87 int axis(
const std::string& name)
const;
88 int table(
const std::string& name)
const;
89 const std::string&
unit(
const int& table)
const;
90 void scale(
const int& table,
const double&
scale);
92 const double&
axis_lo(
const int& axis,
const int& bin)
const;
93 const double&
axis_hi(
const int& axis,
const int& bin)
const;
102 const std::string&
telescope(
void)
const;
103 void telescope(
const std::string& telescope);
104 void append_axis(
const std::vector<double>& axis_lo,
105 const std::vector<double>& axis_hi,
106 const std::string& name,
107 const std::string& unit);
109 const std::string& unit);
122 void update(
const double& arg)
const;
123 void update(
const double& arg1,
const double& arg2)
const;
124 void update(
const double& arg1,
const double& arg2,
125 const double& arg3)
const;
179 return (
"GCTAResponseTable");
int m_inx_left
Index of left node.
const GNodeArray & axis_nodes(const int &axis) const
Return axis nodes.
int m_inx5
Index of upper left node.
void append_table(const std::string &name, const std::string &unit)
Append table to response table.
GCTAResponseTable(void)
Void constructor.
int m_ntables
Number of tables.
std::vector< std::string > m_units_hi
Upper boundaries units.
GCTAResponseTable & operator=(const GCTAResponseTable &table)
Assignment operator.
void update(const double &arg) const
Update 1D cache.
double m_wgt6
Weight of lower left node.
void axis_linear(const int &axis)
Set nodes for a linear axis.
double m_wgt2
Weight of lower left node.
Definition of interface for all GammaLib classes.
std::vector< double > operator()(const double &arg) const
Linear interpolation operator for 1D tables.
void init_members(void)
Initialise response table members.
int m_inx2
Index of lower left node.
const int & tables(void) const
Return number of tables.
int m_inx3
Index of upper right node.
void scale(const int &table, const double &scale)
Scale table.
void read_colnames(const GFitsTable &hdu)
Read column names from FITS HDU.
void read_axes(const GFitsTable &hdu)
Read axes definitions from FITS HDU.
std::vector< std::vector< double > > m_axis_hi
Axes upper boundaries.
void axis_radians(const int &axis)
Set nodes for a radians axis.
virtual ~GCTAResponseTable(void)
Destructor.
void read(const GFitsTable &table)
Read response table from FITS table HDU.
int m_inx4
Index of lower right node.
const double & axis_lo(const int &axis, const int &bin) const
Return lower bin boundary for bin in axis.
std::vector< std::vector< double > > m_tables
Tables.
void write(GFitsTable &table) const
Write response table into FITS table HDU.
int axis(const std::string &name) const
Determine index of an axis.
const std::string & unit(const int &table) const
Return table unit.
double m_wgt4
Weight of lower right node.
Node array class interface definition.
bool has_table(const std::string &name) const
Check whether a table exists.
void clear(void)
Clear response table.
Interface class for all GammaLib classes.
std::vector< std::string > m_colname_table
Column names for table.
std::string classname(void) const
Return class name.
double m_wgt3
Weight of upper right node.
int m_inx7
Index of upper right node.
const int & elements(void) const
Return number of elements per table.
GCTAResponseTable * clone(void) const
Clone response table.
Abstract interface for FITS table.
double m_wgt_left
Weight of left node.
std::string print(const GChatter &chatter=NORMAL) const
Print response table information.
void free_members(void)
Delete response table members.
void axis_log10(const int &axis)
Set nodes for a logarithmic (base 10) axis.
int table(const std::string &name) const
Determine index of table.
double m_wgt1
Weight of upper left node.
void copy_members(const GCTAResponseTable &table)
Copy response table members.
double m_wgt8
Weight of lower right node.
std::vector< std::string > m_units_table
Parameter units.
double m_wgt7
Weight of upper right node.
const std::string & telescope(void) const
Return telescope string.
int axis_bins(const int &axis) const
Return number bins in an axis.
std::vector< std::vector< double > > m_axis_lo
Axes lower boundaries.
void append_axis(const std::vector< double > &axis_lo, const std::vector< double > &axis_hi, const std::string &name, const std::string &unit)
Append an axis to the response table.
const std::string & axis_lo_name(const int &axis) const
Return lower bin boundary FITS table column name for axis.
int m_inx_right
Index of right node.
std::vector< std::string > m_colname_hi
Column names for upper boundaries.
int m_inx6
Index of lower left node.
std::vector< std::string > m_colname_lo
Column names for lower boundaries.
bool has_axis(const std::string &name) const
Check whether an axis exists.
const double & axis_hi(const int &axis, const int &bin) const
Return upper bin boundary for bin in axis.
const std::string & axis_hi_name(const int &axis) const
Return upper bin boundary FITS table column name for axis.
int m_naxes
Number of axes.
std::vector< GNodeArray > m_axis_nodes
Axes node arrays.
void read_tables(const GFitsTable &hdu)
Read tables.
CTA response table class.
int m_inx1
Index of upper left node.
const std::string & axis_lo_unit(const int &axis) const
Return lower bin boundary unit for axis.
const std::string & axis_hi_unit(const int &axis) const
Return upper bin boundary unit for axis.
double m_wgt5
Weight of upper left node.
int m_inx8
Index of lower right node.
const int & axes(void) const
Return number of axes of the tables.
int m_nelements
Number of elements per table.
std::vector< std::string > m_units_lo
Lower boundaries units.
double m_wgt_right
Weight of right node.
FITS table abstract base class interface definition.
std::string m_telescope
Telescope keyword.