27 #ifndef GSPIRESPONSE_HPP
28 #define GSPIRESPONSE_HPP
76 virtual void clear(
void);
78 virtual std::string
classname(
void)
const;
96 const double&
dlogE(
void)
const;
97 const double&
gamma(
void)
const;
102 const int& ireg)
const;
109 const bool& clobber =
false)
const;
129 const double& emax)
const;
165 return (
"GSPIResponse");
295 return (
m_spix[ipt].dist(dir));
double m_wcs_xmin
Minimum X value (radians)
double m_wcs_ymax
Maximum Y value (radians)
Abstract FITS image base class.
double azimuth(const int &ipt, const GSkyDir &dir) const
Return azimuth angle of sky direction for pointing in radians.
virtual void clear(void)
Clear instance.
GSkyMap m_irfs
IRFs stored as sky map.
void set_cache(const GSPIEventCube *cube)
Set computation cache.
double m_max_zenith
Maximum zenith angle (radians)
std::vector< GSkyDir > m_spix
SPI pointing direction.
virtual bool use_edisp(void) const
Signal if energy dispersion will be used.
double m_energy_keV
IRF line energy (optional)
Abstract interface for the event classes.
virtual GEbounds ebounds(const GEnergy &obsEnergy) const
Return true energy boundaries for a specific observed energy.
virtual ~GSPIResponse(void)
Destructor.
const double & gamma(void) const
Return power-law index for continuum IRFs.
virtual std::string print(const GChatter &chatter=NORMAL) const
Print INTEGRAL/SPI response information.
void write_detids(GFits &fits) const
Write detector identifiers into FITS object.
virtual std::string classname(void) const
Return class name.
double m_wcs_ybin
Y value bin size (radians)
Sky map class definition.
virtual double irf(const GEvent &event, const GPhoton &photon, const GObservation &obs) const
Return value of INTEGRAL/SPI instrument response for a photon.
int irf_detid(const int &detid) const
Convert detector identifier into IRF detector identifier.
double m_dlogE
Logarithmic energy step for IRF band.
void write_energies(GFits &fits) const
Write energies into FITS object.
Class that handles photons.
void set_wcs(const GFitsImage *image)
Set IRF image limits.
INTEGRAL/SPI event bin container class.
virtual GSPIResponse * clone(void) const
Clone instance.
double zenith(const int &ipt, const GSkyDir &dir) const
Return zenith angle of sky direction for pointing in radians.
Node array class interface definition.
void read_detids(const GFits &fits)
Read detector identifiers from FITS object.
void copy_members(const GSPIResponse &rsp)
Copy class members.
Energy boundaries container class.
double m_wcs_xpix_max
Maximum X pixel index.
const GFilename & rspname(void) const
Get response group file name.
void set_detids(const GSPIEventCube *cube)
Set vector of detector identifiers used by the observation.
double m_wcs_xmax
Maximum X value (radians)
void read_energies(const GFits &fits)
Read energies from FITS object.
double m_wcs_xbin
X value bin size (radians)
bool is_empty(void) const
Signal if there are no energy boundaries.
virtual GSPIResponse & operator=(const GSPIResponse &rsp)
Assignment operator.
std::vector< int > m_detids
Vector of detector IDs.
GSkyMap compute_irf(const double &emin, const double &emax) const
Compute as sky map.
double irf_weight(const double &beta, const double &emin, const double &emax) const
Compute weight of logarithmic energy bin.
void save(const GFilename &filename, const bool &clobber=false) const
Save SPI response into file.
void load_irfs(const int ®ion)
Load Instrument Response Functions.
GNodeArray m_energies
Node array of IRF energies.
double m_wcs_ymin
Minimum Y value (radians)
GSkyMap load_irf(const GFilename &rspname) const
Load IRF as sky map.
double irf_value(const GSkyDir &srcDir, const GSPIEventBin &bin, const int &ireg) const
Return value of INTEGRAL/SPI instrument response for sky direction and event bin. ...
Abstract observation base class.
double m_wcs_ypix_max
Maximum Y pixel index.
Abstract response base class definition.
std::vector< double > m_posang
Position angle of Y axis (CEL, radians)
INTEGRAL/SPI observation class.
bool is_precomputed(void) const
Signals if response is precomputed.
GSPIResponse(void)
Void constructor.
const double & dlogE(void) const
Return logarithmic step size for continuum IRFs.
Energy boundaries class interface definition.
INTEGRAL/SPI event bin class.
void read(const GFits &fits)
Read SPI response from FITS object.
GFilename m_rspname
File name of response group.
GEbounds m_ebounds
Energy bounaries of IRF.
INTEGRAL/SPI instrument response function class.
double m_gamma
Power-law spectral index for IRF band.
bool m_has_wcs
Has WCS information.
virtual bool use_tdisp(void) const
Signal if time dispersion will be used.
void init_members(void)
Initialise class members.
void load(const GFilename &filename)
Load SPI response from file.
Abstract instrument response base class.
Class that handles gamma-ray sources.
void write(GFits &fits) const
Write SPI response into FITS object.
virtual double nroi(const GModelSky &model, const GEnergy &obsEng, const GTime &obsTime, const GObservation &obs) const
Return integral of event probability for a given sky model over ROI.
void free_members(void)
Delete class members.
Filename class interface definition.
const double & energy_keV(void) const
Return line IRF energy in keV.
Class that handles energies in a unit independent way.
void set(const GSPIObservation &obs, const GEnergy &energy=GEnergy())
Set response for a specific observation.