27#ifndef GMWLSPECTRUM_HPP
28#define GMWLSPECTRUM_HPP
65 virtual void clear(
void);
67 virtual std::string
classname(
void)
const;
68 virtual int size(
void)
const;
69 virtual int dim(
void)
const;
70 virtual int naxis(
const int& axis)
const;
73 const bool& clobber =
false)
const;
76 virtual int number(
void)
const;
80 void read(
const GFits& file,
const std::string& extname);
81 void read(
const GFits& file,
const int& extno);
94 const std::string& unit);
111 return (
"GMWLSpectrum");
123 return (
int)
m_data.size();
148 return (
int)
m_data.size();
Energy value class definition.
Abstract event bin container class interface definition.
FITS table abstract base class interface definition.
Multi-wavelength spectral point class interface definition.
Class that handles energies in a unit independent way.
Abstract event bin container class.
Abstract interface for FITS table.
Multi-wavelength spectral point class.
Multi-wavelength spectrum class interface.
virtual std::string print(const GChatter &chatter=NORMAL) const
Print spectrum.
virtual void load(const GFilename &filename)
Load spectrum.
virtual int dim(void) const
Return dimension of spectrum.
void free_members(void)
Delete class members.
virtual void read(const GFits &file)
Read spectrum from FITS file.
GEnergy conv_energy(const double &energy, const std::string &unit)
Convert value into energy.
std::string m_telescope
Telescope name.
virtual void save(const GFilename &filename, const bool &clobber=false) const
Save spectrum.
virtual GMWLSpectrum & operator=(const GMWLSpectrum &spec)
Assignment operator.
virtual void clear(void)
Clear spectrum.
virtual int naxis(const int &axis) const
Return number of spectral bins per dimension.
virtual GMWLDatum * operator[](const int &index)
Spectral point access operator.
double conv_flux(const GEnergy &energy, const double &flux, const std::string &unit)
Convert value into flux.
void init_members(void)
Initialise class members.
void copy_members(const GMWLSpectrum &spec)
Copy class members.
const std::string & telescope(void) const
Return telescope name.
virtual ~GMWLSpectrum(void)
Destructor.
virtual std::string classname(void) const
Return class name.
virtual GMWLSpectrum * clone(void) const
Clone spectrum.
std::string m_instrument
Instrument name.
GMWLSpectrum(void)
Void constructor.
virtual void write(GFits &file) const
Write spectrum into FITS file.
virtual int size(void) const
Return number of spectral bins.
void set_ebounds(void)
Set energy boundaries.
virtual int number(void) const
Return number of points in spectrum.
void read_fits(const GFitsTable &table)
Read spectrum from FITS file.
std::vector< GMWLDatum > m_data
Spectral data.
const std::string & instrument(void) const
Return instrument name.