GammaLib  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GMWLResponse Class Reference

Multi-wavelength response class. More...

#include <GMWLResponse.hpp>

Inheritance diagram for GMWLResponse:
GResponse GBase

Public Member Functions

 GMWLResponse (void)
 Void constructor. More...
 
 GMWLResponse (const GMWLResponse &rsp)
 Copy constructor. More...
 
virtual ~GMWLResponse (void)
 Destructor. More...
 
virtual GMWLResponseoperator= (const GMWLResponse &rsp)
 Assignment operator. More...
 
virtual void clear (void)
 Clear instance. More...
 
virtual GMWLResponseclone (void) const
 Clone instance. More...
 
virtual std::string classname (void) const
 Return class name. More...
 
virtual bool use_edisp (void) const
 Signal if response uses energy dispersion. More...
 
virtual bool use_tdisp (void) const
 Signal if response uses time dispersion. More...
 
virtual double irf (const GEvent &event, const GPhoton &photon, const GObservation &obs) const
 Return instrument response function. More...
 
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. More...
 
virtual GEbounds ebounds (const GEnergy &obsEnergy) const
 Return true energy boundaries for a specific observed energy. More...
 
virtual std::string print (const GChatter &chatter=NORMAL) const
 Print response information. More...
 
virtual double irf_spatial (const GEvent &event, const GSource &source, const GObservation &obs) const
 Return instrument response function. More...
 
- Public Member Functions inherited from GResponse
 GResponse (void)
 Void constructor. More...
 
 GResponse (const GResponse &rsp)
 Copy constructor. More...
 
virtual ~GResponse (void)
 Destructor. More...
 
virtual GResponseoperator= (const GResponse &rsp)
 Assignment operator. More...
 
virtual double convolve (const GModelSky &model, const GEvent &event, const GObservation &obs, const bool &grad=true) const
 Convolve sky model with the instrument response. More...
 
virtual GVector convolve (const GModelSky &model, const GObservation &obs, GMatrixSparse *gradients=NULL) const
 Convolve sky model with the instrument response. More...
 
virtual GVector irf_spatial (const GModelSky &model, const GObservation &obs, GMatrix *gradients=NULL) const
 Return instrument response vector integrated over the spatial model. More...
 
virtual void remove_response_cache (const std::string &name)
 Remove response cache for model. More...
 
- Public Member Functions inherited from GBase
virtual ~GBase (void)
 Destructor. More...
 

Protected Member Functions

void init_members (void)
 Initialise class members. More...
 
void copy_members (const GMWLResponse &pnt)
 Copy class members. More...
 
void free_members (void)
 Delete class members. More...
 
- Protected Member Functions inherited from GResponse
void init_members (void)
 Initialise class members. More...
 
void copy_members (const GResponse &rsp)
 Copy class members. More...
 
void free_members (void)
 Delete class members. More...
 
double eval_prob (const GModelSky &model, const GEvent &event, const GEnergy &srcEng, const GTime &srcTime, const GObservation &obs, const bool &grad) const
 Convolve sky model with the instrument response. More...
 
GVector eval_probs (const GModelSky &model, const GObservation &obs, GMatrixSparse *gradients=NULL) const
 Convolve sky model with the instrument response. More...
 
int size_edisp_vector (const GModelSky &model, const GObservation &obs, const bool &grad) const
 Return size of vector for energy dispersion computation. More...
 
GEbounds ebounds_model (const GModelSky &model) const
 Return true energy intervals for sky model. More...
 
virtual double irf_ptsrc (const GEvent &event, const GSource &source, const GObservation &obs) const
 Return instrument response to point source. More...
 
virtual double irf_radial (const GEvent &event, const GSource &source, const GObservation &obs) const
 Return instrument response to radial source. More...
 
virtual double irf_elliptical (const GEvent &event, const GSource &source, const GObservation &obs) const
 Return instrument response to elliptical source. More...
 
virtual double irf_diffuse (const GEvent &event, const GSource &source, const GObservation &obs) const
 Return instrument response to diffuse source. More...
 
virtual double irf_composite (const GEvent &event, const GSource &source, const GObservation &obs) const
 Return instrument response to composite source. More...
 
virtual GVector irf_ptsrc (const GModelSky &model, const GObservation &obs, GMatrix *gradients=NULL) const
 Return instrument response to point source sky model. More...
 
virtual GVector irf_radial (const GModelSky &model, const GObservation &obs, GMatrix *gradients=NULL) const
 Return instrument response to radial source sky model. More...
 
virtual GVector irf_elliptical (const GModelSky &model, const GObservation &obs, GMatrix *gradients=NULL) const
 Return instrument response to ellipitical source sky model. More...
 
virtual GVector irf_diffuse (const GModelSky &model, const GObservation &obs, GMatrix *gradients=NULL) const
 Return instrument response to diffuse source sky model. More...
 
virtual GVector irf_composite (const GModelSky &model, const GObservation &obs, GMatrix *gradients=NULL) const
 Return instrument response to composite source sky model. More...
 

Additional Inherited Members

- Protected Attributes inherited from GResponse
bool m_use_irf_cache
 Control usage of irf cache. More...
 
bool m_use_nroi_cache
 Control usage of nroi cache. More...
 
int m_irf_radial_iter_theta
 Radial model integration theta iterations. More...
 
int m_irf_radial_iter_phi
 Radial model integration phi iterations. More...
 
int m_irf_elliptical_iter_theta
 Elliptical model integration theta iterations. More...
 
int m_irf_elliptical_iter_phi
 Elliptical model integration phi iterations. More...
 
double m_irf_diffuse_resolution
 Angular resolution for diffuse model. More...
 
GResponseCache m_irf_cache
 
GResponseCache m_nroi_cache
 
GResponseVectorCache m_irf_vector_cache
 

Detailed Description

Multi-wavelength response class.

This class implements a dummy response class for multi-wavelength observations. Since the multi-wavelength instrument classes handles data that a provided in photon space, no instrument response is in fact needed. The dummy response implemented by this class provides a simple diagonal response matrix that allows integration of multi-wavelength observations using the standard instrument specific interface.

Definition at line 55 of file GMWLResponse.hpp.

Constructor & Destructor Documentation

GMWLResponse::GMWLResponse ( void  )

Void constructor.

Definition at line 56 of file GMWLResponse.cpp.

References init_members().

Referenced by clone().

GMWLResponse::GMWLResponse ( const GMWLResponse rsp)

Copy constructor.

Parameters
[in]rspResponse.

Definition at line 71 of file GMWLResponse.cpp.

References copy_members(), and init_members().

GMWLResponse::~GMWLResponse ( void  )
virtual

Destructor.

Definition at line 87 of file GMWLResponse.cpp.

References free_members().

Member Function Documentation

std::string GMWLResponse::classname ( void  ) const
inlinevirtual

Return class name.

Returns
String containing the class name ("GMWLResponse").

Implements GResponse.

Definition at line 101 of file GMWLResponse.hpp.

void GMWLResponse::clear ( void  )
virtual

Clear instance.

Implements GResponse.

Definition at line 141 of file GMWLResponse.cpp.

References free_members(), GResponse::free_members(), init_members(), and GResponse::init_members().

Referenced by GMWLObservation::init_members().

GMWLResponse * GMWLResponse::clone ( void  ) const
virtual

Clone instance.

Implements GResponse.

Definition at line 159 of file GMWLResponse.cpp.

References GMWLResponse().

void GMWLResponse::copy_members ( const GMWLResponse rsp)
protected

Copy class members.

Parameters
[in]rspResponse.

Definition at line 264 of file GMWLResponse.cpp.

Referenced by GMWLResponse(), and operator=().

GEbounds GMWLResponse::ebounds ( const GEnergy obsEnergy) const
virtual

Return true energy boundaries for a specific observed energy.

Parameters
[in]obsEnergyObserved Energy.
Returns
True energy boundaries for given observed energy.
Exceptions
GException::feature_not_implementedMethod is not implemented.

Implements GResponse.

Definition at line 201 of file GMWLResponse.cpp.

References G_EBOUNDS.

void GMWLResponse::free_members ( void  )
protected

Delete class members.

Definition at line 274 of file GMWLResponse.cpp.

Referenced by clear(), operator=(), and ~GMWLResponse().

void GMWLResponse::init_members ( void  )
protected

Initialise class members.

Definition at line 252 of file GMWLResponse.cpp.

Referenced by clear(), GMWLResponse(), and operator=().

double GMWLResponse::irf ( const GEvent event,
const GPhoton photon,
const GObservation obs 
) const
inlinevirtual

Return instrument response function.

Parameters
[in]eventEvent.
[in]photonPhoton.
[in]obsObservation.
Returns
Instrument response function (always 1).

Implements GResponse.

Definition at line 141 of file GMWLResponse.hpp.

double GMWLResponse::irf_spatial ( const GEvent event,
const GSource source,
const GObservation obs 
) const
inlinevirtual

Return instrument response function.

Parameters
[in]eventEvent.
[in]sourceSource.
[in]obsObservation.
Returns
Instrument response function (always 1).

Reimplemented from GResponse.

Definition at line 159 of file GMWLResponse.hpp.

double GMWLResponse::nroi ( const GModelSky model,
const GEnergy obsEng,
const GTime obsTime,
const GObservation obs 
) const
virtual

Return integral of event probability for a given sky model over ROI.

Parameters
[in]modelSky model.
[in]obsEngObserved photon energy.
[in]obsTimeObserved photon arrival time.
[in]obsObservation.
Returns
0.0
Exceptions
GException::feature_not_implementedMethod is not implemented.

Implements GResponse.

Definition at line 177 of file GMWLResponse.cpp.

References G_NROI.

GMWLResponse & GMWLResponse::operator= ( const GMWLResponse rsp)
virtual

Assignment operator.

Parameters
[in]rspResponse.

Definition at line 108 of file GMWLResponse.cpp.

References copy_members(), free_members(), init_members(), and GResponse::operator=().

std::string GMWLResponse::print ( const GChatter chatter = NORMAL) const
virtual

Print response information.

Parameters
[in]chatterChattiness (defaults to NORMAL).
Returns
String containing response information

Implements GResponse.

Definition at line 221 of file GMWLResponse.cpp.

References SILENT.

bool GMWLResponse::use_edisp ( void  ) const
inlinevirtual

Signal if response uses energy dispersion.

Returns
True if response uses energy dispersion.

Implements GResponse.

Definition at line 113 of file GMWLResponse.hpp.

bool GMWLResponse::use_tdisp ( void  ) const
inlinevirtual

Signal if response uses time dispersion.

Returns
True if response uses time dispersion.

Implements GResponse.

Definition at line 125 of file GMWLResponse.hpp.


The documentation for this class was generated from the following files: