78 explicit GPha(
const int& bins);
89 const double&
operator[](
const int& index)
const;
90 double&
operator()(
const int& index,
const int& col);
91 const double&
operator()(
const int& index,
const int& col)
const;
94 std::vector<double>&
operator[](
const std::string& colname);
95 const std::vector<double>&
operator[](
const std::string& colname)
const;
101 int size(
void)
const;
103 double&
at(
const int& index);
104 const double&
at(
const int& index)
const;
105 double&
at(
const int& index,
const int& col);
106 const double&
at(
const int& index,
const int& col)
const;
107 void append(
const std::string& name,
108 const std::vector<double>& column);
110 double counts(
void)
const;
113 const double&
areascal(
const int& index)
const;
115 const double&
backscal(
const int& index)
const;
119 const double&
outflow(
void)
const;
127 const std::string&
backfile(
void)
const;
129 const std::string&
corrfile(
void)
const;
131 const std::string&
respfile(
void)
const;
133 const std::string&
ancrfile(
void)
const;
134 void fill(
const GEnergy& energy,
const double& value = 1.0);
137 const bool& clobber =
false)
const;
151 void alloc(
const int& size);
GArf operator/(const GArf &arf, const double &scale)
Auxiliary Response File vision operator friend.
const double & exposure(void) const
Return exposure time.
const std::string & ancrfile(void) const
Return Ancilliary Response File name.
GPha * clone(void) const
Clone object.
void append(const std::string &name, const std::vector< double > &column)
Append additional column to spectrum.
virtual ~GPha(void)
Destructor.
double m_overflow
Number of overflowing events.
const double & underflow(void) const
Return number of underflow counts.
const GEnergy & emin_obs(void) const
Return minimum energy of observations.
double m_exposure
Deadtime corr. exp. time (sec)
const GEbounds & ebounds(void) const
Return energy boundaries.
double m_underflow
Number of underflowing events.
double counts(void) const
Number of counts in spectrum.
Definition of interface for all GammaLib classes.
GNdarray counts_spectrum(void) const
Get number of counts in spectrum as GNdarray.
GFilename m_filename
Filename of origin.
void backscal(const int &index, const double &backscal)
Set background scaling factor.
std::vector< double > m_areascal
Area scaling.
GPha & operator*=(const double &scale)
Scale spectrum values.
void fill(const GEnergy &energy, const double &value=1.0)
Fill spectrum with a value.
void init_members(void)
Initialise class members.
GArf operator+(const GArf &a, const GArf &b)
Auxiliary Response File addition operator friend.
void load(const GFilename &filename)
Load Pulse Height Analyzer spectrum.
const GFitsHeader & header(void) const
Return FITS header.
double m_outflow
Number of outflowing events.
GEbounds m_ebounds
Energy boundaries.
int column_index(const std::string &colname) const
Returns index of additional vector column.
const GFilename & filename(void) const
Return file name.
std::vector< std::vector< double > > m_coldata
Additional column data.
Energy boundaries container class.
const std::string & corrfile(void) const
Return correction file name.
std::string m_respfile
RMF file.
const std::string & respfile(void) const
Return Redistribution Matrix File name.
N-dimensional array class interface definition.
std::string m_corrfile
Correction file.
GPha & operator=(const GPha &pha)
Assignment operator.
Interface class for all GammaLib classes.
const double & overflow(void) const
Return number of overflow counts.
friend GPha operator/(const GPha &pha, const double &scale)
Spectrum division operator friend.
double & operator[](const int &index)
Return content of spectral bin.
void free_members(void)
Delete class members.
Abstract interface for FITS table.
GArf operator*(const GArf &arf, const double &scale)
Auxiliary Response File scaling operator friend.
N-dimensional array class.
const std::string extname_pha
void clear(void)
Clear object.
GPha & operator/=(const double &scale)
Divide spectrum values.
const std::string & backfile(void) const
Return background file name.
GPha & operator+=(const GPha &pha)
Add spectrum.
void write(GFits &fits) const
Write Pulse Height Analyzer spectrum.
void save(const GFilename &filename, const bool &clobber=false) const
Save Pulse Height Analyzer spectrum.
std::vector< double > m_counts
Counts data.
std::string m_backfile
Background file.
GEnergy m_emin_obs
Minimum energy of observation.
std::string classname(void) const
Return class name.
void copy_members(const GPha &pha)
Copy class members.
std::string print(const GChatter &chatter=NORMAL) const
Print Pulse Height Analyzer spectrum.
int size(void) const
Return number of bins in spectrum.
void read(const GFits &fits)
Read Pulse Height Analyzer spectrum.
GPha(void)
Void constructor.
friend GPha operator+(const GPha &a, const GPha &b)
Spectrum addition operator friend.
const GEnergy & emax_obs(void) const
Return maximum energy of observations.
Energy boundaries class interface definition.
double & operator()(const int &index, const int &col)
Return content of additional columns.
GFitsHeader m_header
FITS header cards.
friend GPha operator-(const GPha &a, const GPha &b)
Spectrum subtraction operator friend.
friend GPha operator*(const GPha &pha, const double &scale)
Spectrum scaling operator friend.
double & at(const int &index)
Return content of spectral bin.
void areascal(const int &index, const double &areascal)
Set area scaling factor.
void alloc(const int &size)
Allocate spectrum.
std::string m_ancrfile
ARF file.
std::vector< std::string > m_colnames
Additional column names.
std::vector< double > m_backscal
Background scaling.
int columns(void) const
Return number of additional columns.
Pulse Height Analyzer class.
GArf operator-(const GArf &a, const GArf &b)
Auxiliary Response File subtraction operator friend.
GNdarray backscal_spectrum(void) const
Get background scaling factors as GNdarray.
GPha & operator-=(const GPha &pha)
Subtract spectrum.
const double & outflow(void) const
Return number of outflow counts.
GEnergy m_emax_obs
Minimum energy of observation.
Filename class interface definition.
Class that handles energies in a unit independent way.