GammaLib  2.1.0.dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GCTAModelSkyCube Class Reference

CTA sky cube model class. More...

#include <GCTAModelSkyCube.hpp>

Inheritance diagram for GCTAModelSkyCube:
GModelData GModel GBase

Public Member Functions

 GCTAModelSkyCube (void)
 Void constructor. More...
 
 GCTAModelSkyCube (const GXmlElement &xml)
 XML constructor. More...
 
 GCTAModelSkyCube (const GFilename &filename, const GModelSpectral &spectral)
 Construct from filename and spectral component. More...
 
 GCTAModelSkyCube (const GFilename &filename, const GModelSpectral &spectral, const GModelTemporal &temporal)
 Construct from model components. More...
 
 GCTAModelSkyCube (const GCTAModelSkyCube &bgd)
 Copy constructor. More...
 
virtual ~GCTAModelSkyCube (void)
 Destructor. More...
 
virtual GCTAModelSkyCubeoperator= (const GCTAModelSkyCube &model)
 Assignment operator. More...
 
virtual void clear (void)
 Clear CTA sky cube model. More...
 
virtual GCTAModelSkyCubeclone (void) const
 Clone CTA sky cube model. More...
 
virtual std::string classname (void) const
 Return class name. More...
 
virtual std::string type (void) const
 Return data model type. More...
 
virtual bool is_constant (void) const
 Signals if sky model is temporally constant. More...
 
virtual double eval (const GEvent &event, const GObservation &obs, const bool &gradients=false) const
 Return event rate in units of events MeV \(^{-1}\) s \(^{-1}\) sr \(^{-1}\). More...
 
virtual double npred (const GEnergy &obsEng, const GTime &obsTime, const GObservation &obs) const
 Return spatially integrated event rate in units of events MeV \(^{-1}\) s \(^{-1}\). More...
 
virtual GCTAEventListmc (const GObservation &obs, GRan &ran) const
 Return simulated list of events. More...
 
virtual void read (const GXmlElement &xml)
 Read CTA sky cube model from XML element. More...
 
virtual void write (GXmlElement &xml) const
 Write CTA cube background model into XML element. More...
 
virtual std::string print (const GChatter &chatter=NORMAL) const
 Print CTA cube background model information. More...
 
void load (const GFilename &filename)
 Load sky cube. More...
 
const GFilenamefilename (void) const
 Return filename. More...
 
GModelSpectralspectral (void) const
 Return spectral model component. More...
 
GModelTemporaltemporal (void) const
 Return temporal model component. More...
 
void spectral (const GModelSpectral *spectral)
 Set spectral model component. More...
 
void temporal (const GModelTemporal *temporal)
 Set temporal model component. More...
 
- Public Member Functions inherited from GModelData
 GModelData (void)
 Void constructor. More...
 
 GModelData (const GXmlElement &xml)
 XML constructor. More...
 
 GModelData (const GModelData &model)
 Copy constructor. More...
 
virtual ~GModelData (void)
 Destructor. More...
 
virtual GModelDataoperator= (const GModelData &model)
 Assignment operator. More...
 
virtual GVector eval (const GObservation &obs, GMatrixSparse *gradients=NULL) const
 Return model values and gradients. More...
 
- Public Member Functions inherited from GModel
 GModel (void)
 Void constructor. More...
 
 GModel (const GXmlElement &xml)
 XML constructor. More...
 
 GModel (const GModel &model)
 Copy constructor. More...
 
virtual ~GModel (void)
 Destructor. More...
 
virtual GModeloperator= (const GModel &model)
 Assignment operator. More...
 
virtual GModelParoperator[] (const int &index)
 Returns reference to model parameter by index. More...
 
virtual const GModelParoperator[] (const int &index) const
 Returns reference to model parameter by index (const version) More...
 
virtual GModelParoperator[] (const std::string &name)
 Returns reference to model parameter by name. More...
 
virtual const GModelParoperator[] (const std::string &name) const
 Returns reference to model parameter by name const version) More...
 
int size (void) const
 Return number of parameters in model. More...
 
int scales (void) const
 Return number of scale parameters in model. More...
 
GModelParat (const int &index)
 Returns reference to model parameter by index. More...
 
const GModelParat (const int &index) const
 Returns reference to model parameter by index (const version) More...
 
bool has_par (const std::string &name) const
 Checks if parameter name exists. More...
 
bool has_scales (void) const
 Signals that model has scales. More...
 
const std::string & name (void) const
 Return parameter name. More...
 
void name (const std::string &name)
 Set parameter name. More...
 
const double & ts (void) const
 Return Test Statistic value. More...
 
void ts (const double &ts)
 Set Test Statistic value. More...
 
const bool & tscalc (void) const
 Return Test Statistic computation flag. More...
 
void tscalc (const bool &tscalc)
 Set Test Statistic computation flag. More...
 
const bool & has_ts (void) const
 Signals that model has Test Statistics value. More...
 
std::string instruments (void) const
 Returns instruments to which model applies. More...
 
void instruments (const std::string &instruments)
 Set instruments to which model applies. More...
 
GModelParscale (const int &index)
 Returns reference to scale parameter by index. More...
 
const GModelParscale (const int &index) const
 Returns reference to scale parameter by index (const version) More...
 
GModelPar scale (const std::string &instrument) const
 Returns model scale factor for a given instrument. More...
 
void scale (const GModelPar &par)
 Set model scale factor for a given instrument. More...
 
std::string ids (void) const
 Returns observation identifiers to which model applies. More...
 
void ids (const std::string &ids)
 Set observation identifiers to which model applies. More...
 
bool is_valid (const std::string &instruments, const std::string &ids) const
 Verifies if model is valid for a given instrument and identifier. More...
 
const GModelAssociationsassociations (void) const
 Return model associations. More...
 
void associations (const GModelAssociations &associations)
 Set model associations. More...
 
const bool & has_eval_indices (void) const
 Signals that parameter indices updated by eval() method were set. More...
 
const std::vector< int > & eval_indices (void) const
 Return vector of parameter indices updated by eval() method. 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 GCTAModelSkyCube &bgd)
 Copy class members. More...
 
void free_members (void)
 Delete class members. More...
 
void set_pointers (void)
 Set pointers. More...
 
bool valid_model (void) const
 Verifies if model has all components. More...
 
void read_xml_spatial (const GXmlElement &xml)
 Read spatial model from XML element. More...
 
void write_xml_spatial (GXmlElement &xml) const
 Write spatial model into XML element. More...
 
GModelSpectralxml_spectral (const GXmlElement &spectral) const
 Return pointer to spectral model from XML element. More...
 
GModelTemporalxml_temporal (const GXmlElement &temporal) const
 Return pointer to temporal model from XML element. More...
 
- Protected Member Functions inherited from GModelData
void init_members (void)
 Initialise class members. More...
 
void copy_members (const GModelData &model)
 Copy class members. More...
 
void free_members (void)
 Delete class members. More...
 
- Protected Member Functions inherited from GModel
void init_members (void)
 Initialise class members. More...
 
void copy_members (const GModel &model)
 Copy class members. More...
 
void free_members (void)
 Delete class members. More...
 
void read_attributes (const GXmlElement &xml)
 Read model attributes. More...
 
void write_attributes (GXmlElement &xml) const
 Write model attributes. More...
 
std::string print_attributes (void) const
 Print model attributes. More...
 
void read_scales (const GXmlElement &xml)
 Read instrument scales from XML element. More...
 
void write_scales (GXmlElement &xml) const
 Write instrument scales into XML element. More...
 

Protected Attributes

GFilename m_filename
 Filename. More...
 
GSkyMap m_cube
 Sky cube. More...
 
GEbounds m_ebounds
 Energy boundaries of sky cube. More...
 
GNodeArray m_elogmeans
 Mean log10(TeV) energies for the sky cube. More...
 
GModelPar m_norm
 Normalisation parameter. More...
 
GModelSpectralm_spectral
 Spectral model. More...
 
GModelTemporalm_temporal
 Temporal model. More...
 
std::vector< std::string > m_npred_names
 Model names. More...
 
std::vector< GEnergym_npred_energies
 Model energy. More...
 
std::vector< GTimem_npred_times
 Model time. More...
 
std::vector< double > m_npred_values
 Model values. More...
 
- Protected Attributes inherited from GModel
std::string m_name
 Model name. More...
 
std::vector< std::string > m_instruments
 Instruments to which model applies. More...
 
std::vector< GModelParm_scales
 Model instrument scale factors. More...
 
std::vector< std::string > m_ids
 Identifiers to which model applies. More...
 
std::vector< GModelPar * > m_pars
 Pointers to all model parameters. More...
 
GModelAssociations m_associations
 Model associations. More...
 
bool m_has_ts
 Signals if TS is available. More...
 
bool m_has_tscalc
 Signals if tscalc attribute is available. More...
 
bool m_tscalc
 Signals if TS should be computed. More...
 
double m_ts
 Test Statistic of the model. More...
 
bool m_has_eval_inx
 
std::vector< int > m_eval_inx
 

Detailed Description

CTA sky cube model class.

This class implements a sky cube model for CTA.

Definition at line 56 of file GCTAModelSkyCube.hpp.

Constructor & Destructor Documentation

GCTAModelSkyCube::GCTAModelSkyCube ( void  )

Void constructor.

Definition at line 74 of file GCTAModelSkyCube.cpp.

References init_members().

Referenced by clone().

GCTAModelSkyCube::GCTAModelSkyCube ( const GXmlElement xml)
explicit

XML constructor.

Parameters
[in]xmlXML element.

Constructs a CTA sky cube model from the information provided by an XML element (see GCTAModelSkyCube::read method).

Definition at line 92 of file GCTAModelSkyCube.cpp.

References init_members(), read(), and set_pointers().

GCTAModelSkyCube::GCTAModelSkyCube ( const GFilename filename,
const GModelSpectral spectral 
)

Construct from filename and spectral component.

Parameters
[in]filenameCube file name.
[in]spectralSpectral model component.

Constructs a CTA sky cube model from a cube filename and a spectral model component. The temporal component is assumed to be constant.

Definition at line 117 of file GCTAModelSkyCube.cpp.

References GModelTemporalConst::clone(), GModelSpectral::clone(), init_members(), load(), m_spectral, m_temporal, set_pointers(), and temporal().

GCTAModelSkyCube::GCTAModelSkyCube ( const GFilename filename,
const GModelSpectral spectral,
const GModelTemporal temporal 
)

Construct from model components.

Parameters
[in]filenameCube file name.
[in]spectralSpectral model component.
[in]temporalTemporal model component.

Constructs a CTA sky cube model from a cube filename, a spectral model component and a temporal component.

Definition at line 152 of file GCTAModelSkyCube.cpp.

References GModelTemporal::clone(), GModelSpectral::clone(), init_members(), load(), m_spectral, m_temporal, and set_pointers().

GCTAModelSkyCube::GCTAModelSkyCube ( const GCTAModelSkyCube sky)

Copy constructor.

Parameters
[in]skyCTA sky cube model.

Definition at line 180 of file GCTAModelSkyCube.cpp.

References copy_members(), and init_members().

GCTAModelSkyCube::~GCTAModelSkyCube ( void  )
virtual

Destructor.

Definition at line 197 of file GCTAModelSkyCube.cpp.

References free_members().

Member Function Documentation

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

Return class name.

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

Implements GModelData.

Definition at line 133 of file GCTAModelSkyCube.hpp.

void GCTAModelSkyCube::clear ( void  )
virtual

Clear CTA sky cube model.

This method properly resets the CTA sky cube model to an initial state.

Implements GModelData.

Definition at line 254 of file GCTAModelSkyCube.cpp.

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

Referenced by load(), and read().

GCTAModelSkyCube * GCTAModelSkyCube::clone ( void  ) const
virtual

Clone CTA sky cube model.

Returns
Pointer to deep copy of CTA sky cube model.

Implements GModelData.

Definition at line 274 of file GCTAModelSkyCube.cpp.

References GCTAModelSkyCube().

void GCTAModelSkyCube::copy_members ( const GCTAModelSkyCube sky)
protected

Copy class members.

Parameters
[in]skyCTA sky cube model.

Definition at line 893 of file GCTAModelSkyCube.cpp.

References GModelTemporal::clone(), GModelSpectral::clone(), m_cube, m_ebounds, m_elogmeans, m_filename, m_norm, m_npred_energies, m_npred_names, m_npred_times, m_npred_values, m_spectral, m_temporal, and set_pointers().

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

double GCTAModelSkyCube::eval ( const GEvent event,
const GObservation obs,
const bool &  gradients = false 
) const
virtual

Return event rate in units of events MeV \(^{-1}\) s \(^{-1}\) sr \(^{-1}\).

Parameters
[in]eventObserved event.
[in]obsObservation.
[in]gradientsCompute gradients?
Returns
Event rate (events MeV \(^{-1}\) s \(^{-1}\) sr \(^{-1}\)).

Evaluates the sky cube model. The method returns a measured rate, defined as the number of counts per MeV, steradian and ontime.

If the gradients flag is true the method will also set the parameter gradients of the model parameters.

Implements GModelData.

Definition at line 395 of file GCTAModelSkyCube.cpp.

References abs(), gammalib::cta_dir(), GCTAInstDir::dir(), GEvent::energy(), GModelTemporal::eval(), GModelSpectral::eval(), exp(), GOptimizerPar::factor_gradient(), G_EVAL, GNodeArray::inx_left(), GNodeArray::inx_right(), GOptimizerPar::is_free(), log(), GEnergy::log10TeV(), m_cube, m_elogmeans, m_norm, GOptimizerPar::scale(), GNodeArray::set_value(), GModelTemporal::size(), GEvent::size(), GModelSpectral::size(), spectral(), temporal(), GEvent::time(), GOptimizerPar::value(), GNodeArray::wgt_left(), and GNodeArray::wgt_right().

const GFilename & GCTAModelSkyCube::filename ( void  ) const
inline

Return filename.

Returns
Filename.

Definition at line 176 of file GCTAModelSkyCube.hpp.

References m_filename.

Referenced by load(), and read_xml_spatial().

void GCTAModelSkyCube::free_members ( void  )
protected

Delete class members.

Definition at line 923 of file GCTAModelSkyCube.cpp.

References m_spectral, and m_temporal.

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

bool GCTAModelSkyCube::is_constant ( void  ) const
inlinevirtual

Signals if sky model is temporally constant.

Returns
True if sky model is temporally constant, false otherwise.

Signals if the sky model is temporally constant. A temporally constant model is a model that has a temporal component of type "Constant". If the model has no temporal component it is also consider being constant.

Implements GModelData.

Definition at line 163 of file GCTAModelSkyCube.hpp.

References m_temporal, and GModelTemporal::type().

void GCTAModelSkyCube::load ( const GFilename filename)

Load sky cube.

Parameters
[in]filenameSky cube filename.

Load the sky cube from the primary image extension.

Definition at line 287 of file GCTAModelSkyCube.cpp.

References GNodeArray::append(), clear(), GFits::close(), GEbounds::elogmean(), gammalib::extname_ebounds, filename(), GFits::image(), GEnergy::log10TeV(), m_cube, m_ebounds, m_elogmeans, m_filename, GEbounds::read(), GSkyMap::read(), GEbounds::size(), and GFits::table().

Referenced by GCTAModelSkyCube(), and read_xml_spatial().

GCTAEventList * GCTAModelSkyCube::mc ( const GObservation obs,
GRan ran 
) const
virtual

Return simulated list of events.

Parameters
[in]obsObservation.
[in]ranRandom number generator.
Returns
Pointer to list of simulated events (needs to be de-allocated by client)
Exceptions
GException::feature_not_implementedClass does not support the generation of event lists.

The simulation of an event list from a sky cube model is not implemented, hence the method will always throw an exception.

Implements GModelData.

Definition at line 613 of file GCTAModelSkyCube.cpp.

References G_MC.

double GCTAModelSkyCube::npred ( const GEnergy obsEng,
const GTime obsTime,
const GObservation obs 
) const
virtual

Return spatially integrated event rate in units of events MeV \(^{-1}\) s \(^{-1}\).

Parameters
[in]obsEngMeasured event energy.
[in]obsTimeMeasured event time.
[in]obsObservation.
Returns
Spatially integrated event rate (events MeV \(^{-1}\) s \(^{-1}\))

Spatially integrates the sky cube model for a given measured event energy and event time.

Implements GModelData.

Definition at line 507 of file GCTAModelSkyCube.cpp.

References GModelTemporal::eval(), GModelSpectral::eval(), GObservation::id(), GObservation::instrument(), GNodeArray::inx_left(), GNodeArray::inx_right(), gammalib::is_infinite(), gammalib::is_notanumber(), GEnergy::log10TeV(), m_cube, m_elogmeans, m_norm, m_npred_energies, m_npred_names, m_npred_times, m_npred_values, GSkyMap::npix(), GNodeArray::set_value(), spectral(), gammalib::str(), temporal(), valid_model(), GOptimizerPar::value(), gammalib::warning(), GNodeArray::wgt_left(), and GNodeArray::wgt_right().

GCTAModelSkyCube & GCTAModelSkyCube::operator= ( const GCTAModelSkyCube sky)
virtual

Assignment operator.

Parameters
[in]skyCTA sky cube model.
Returns
CTA sky cube model.

Definition at line 219 of file GCTAModelSkyCube.cpp.

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

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

Print CTA cube background model information.

Parameters
[in]chatterChattiness.
Returns
String containing CTA cube background model information.

Implements GModelData.

Definition at line 793 of file GCTAModelSkyCube.cpp.

References gammalib::parformat(), GModel::print_attributes(), SILENT, GModelTemporal::size(), GModelSpectral::size(), GModel::size(), spectral(), gammalib::str(), temporal(), and type().

void GCTAModelSkyCube::read ( const GXmlElement xml)
virtual

Read CTA sky cube model from XML element.

Parameters
[in]xmlXML element.

Set up CTA sky cube model from the information provided by an XML element. The XML element is expected to have the following structure

<source name="CTA sky cube" type="CTASkyCube" instrument="CTA">
  <spatialModel type="ModelCube" file="model_cube.fits">
    <parameter name="Normalization" scale="1" value="1" min="0.1" max="10" free="0"/>
  </spatialModel>
  <spectrum type="...">
    ...
  </spectrum>
</source>

Optionally, a temporal model may be provided using the following syntax

<source name="CTA sky cube" type="CTASkyCube" instrument="CTA">
  <spatialModel type="ModelCube" file="model_cube.fits">
    <parameter name="Normalization" scale="1" value="1" min="0.1" max="10" free="0"/>
  </spatialModel>
  <spectrum type="...">
    ...
  </spectrum>
  <temporal type="...">
    ...
  </temporal>
</source>

If no temporal component is found a constant model is assumed.

Implements GModelData.

Definition at line 659 of file GCTAModelSkyCube.cpp.

References clear(), GModelTemporalConst::clone(), GXmlNode::element(), GXmlNode::elements(), m_spectral, m_temporal, GModel::read_attributes(), read_xml_spatial(), set_pointers(), temporal(), xml_spectral(), and xml_temporal().

Referenced by GCTAModelSkyCube().

void GCTAModelSkyCube::read_xml_spatial ( const GXmlElement xml)
protected

Read spatial model from XML element.

Parameters
[in]xmlXML element.
Exceptions
GException::invalid_valueInvalid XML format encountered.

Read sky cube information from the spatial XML element. The expected format of the XML element is

<spatialModel type="ModelCube" file="model_cube.fits">
  <parameter name="Normalization" ../>
</spatialModel>

Definition at line 1008 of file GCTAModelSkyCube.cpp.

References GXmlElement::attribute(), filename(), G_READ_XML_SPATIAL, load(), m_norm, GOptimizerPar::name(), norm(), GModelPar::read(), gammalib::xml_file_expand(), and gammalib::xml_get_par().

Referenced by read().

void GCTAModelSkyCube::set_pointers ( void  )
protected

Set pointers.

Set pointers to all model parameters. The pointers are stored in a vector that is member of the GModelData base class.

Definition at line 944 of file GCTAModelSkyCube.cpp.

References m_norm, GModel::m_pars, GModelTemporal::size(), GModelSpectral::size(), spectral(), and temporal().

Referenced by copy_members(), GCTAModelSkyCube(), read(), spectral(), and temporal().

GModelSpectral * GCTAModelSkyCube::spectral ( void  ) const
inline

Return spectral model component.

Returns
Pointer to spectral model component.

Returns a pointer to the spectral model component of the model. The pointer is of type GModelSpectral. Note that a NULL pointer may be returned if the sky model has no spectral model component.

Definition at line 192 of file GCTAModelSkyCube.hpp.

References m_spectral.

Referenced by eval(), npred(), print(), set_pointers(), valid_model(), and write().

void GCTAModelSkyCube::spectral ( const GModelSpectral spectral)

Set spectral model component.

Parameters
[in]spectralPointer to spectral model component.

Sets the spectral model component of the model.

Definition at line 333 of file GCTAModelSkyCube.cpp.

References GModelSpectral::clone(), m_spectral, and set_pointers().

GModelTemporal * GCTAModelSkyCube::temporal ( void  ) const
inline

Return temporal model component.

Returns
Pointer to temporal model component.

Returns a pointer to the temporal model component of the model. The pointer is of type GModelTemporal. Note that a NULL pointer may be returned if the sky model has no temporal model component.

Definition at line 208 of file GCTAModelSkyCube.hpp.

References m_temporal.

Referenced by eval(), GCTAModelSkyCube(), npred(), print(), read(), set_pointers(), valid_model(), and write().

void GCTAModelSkyCube::temporal ( const GModelTemporal temporal)

Set temporal model component.

Parameters
[in]temporalPointer to temporal model component.

Sets the temporal model component of the model.

Definition at line 360 of file GCTAModelSkyCube.cpp.

References GModelTemporal::clone(), m_temporal, and set_pointers().

std::string GCTAModelSkyCube::type ( void  ) const
inlinevirtual

Return data model type.

Returns
Data model type.

Returns the type of the data model.

Implements GModelData.

Definition at line 147 of file GCTAModelSkyCube.hpp.

Referenced by print().

bool GCTAModelSkyCube::valid_model ( void  ) const
protected

Verifies if model has all components.

Returns 'true' if models has a spectral and a temporal component. Otherwise returns 'false'.

Definition at line 983 of file GCTAModelSkyCube.cpp.

References spectral(), and temporal().

Referenced by npred().

void GCTAModelSkyCube::write ( GXmlElement xml) const
virtual

Write CTA cube background model into XML element.

Parameters
[in]xmlXML element.

Write CTA cube background model information into an XML element. The XML element will have the following structure

<source name="CTA sky cube" type="CTASkyCube" instrument="CTA">
  <spatialModel type="ModelCube" file="model_cube.fits">
    <parameter name="Normalization" scale="1" value="1" min="0.1" max="10" free="0"/>
  </spatialModel>
  <spectrum type="...">
    ...
  </spectrum>
</source>

If the model contains a non-constant temporal model, the temporal component will also be written following the syntax

<source name="CTA sky cube" type="CTASkyCube" instrument="CTA">
  <spatialModel type="ModelCube" file="model_cube.fits">
    <parameter name="Normalization" scale="1" value="1" min="0.1" max="10" free="0"/>
  </spatialModel>
  <spectrum type="...">
    ...
  </spectrum>
  <temporal type="...">
    ...
  </temporal>
</source>

If no temporal component is found a constant model is assumed.

Implements GModelData.

Definition at line 727 of file GCTAModelSkyCube.cpp.

References GXmlNode::append(), GXmlElement::attribute(), GXmlNode::element(), GXmlNode::elements(), m_temporal, GModel::name(), spectral(), temporal(), GModelTemporal::type(), GModelTemporal::write(), GModelSpectral::write(), GModel::write_attributes(), and write_xml_spatial().

void GCTAModelSkyCube::write_xml_spatial ( GXmlElement xml) const
protected

Write spatial model into XML element.

Parameters
[in]xmlXML element.
Exceptions
GException::invalid_valueInvalid XML format encountered.

Write sky cube information into the spatial XML element. The format of the XML element is

<spatialModel type="ModelCube" file="model_cube.fits">
  <parameter name="Normalization" ../>
</spatialModel>

Definition at line 1051 of file GCTAModelSkyCube.cpp.

References GXmlElement::attribute(), G_WRITE_XML_SPATIAL, m_filename, m_norm, GOptimizerPar::name(), norm(), GModelPar::write(), gammalib::xml_file_reduce(), and gammalib::xml_need_par().

Referenced by write().

GModelSpectral * GCTAModelSkyCube::xml_spectral ( const GXmlElement spectral) const
protected

Return pointer to spectral model from XML element.

Parameters
[in]spectralXML element.
Returns
Pointer to spectral model.

Returns pointer to spectral model that is defined in an XML element.

Definition at line 1089 of file GCTAModelSkyCube.cpp.

References GModelSpectralRegistry::alloc().

Referenced by read().

GModelTemporal * GCTAModelSkyCube::xml_temporal ( const GXmlElement temporal) const
protected

Return pointer to temporal model from XML element.

Parameters
[in]temporalXML element.
Returns
Pointer to temporal model.

Returns pointer to temporal model that is defined in an XML element.

Definition at line 1108 of file GCTAModelSkyCube.cpp.

References GModelTemporalRegistry::alloc().

Referenced by read().

Member Data Documentation

GSkyMap GCTAModelSkyCube::m_cube
protected

Sky cube.

Definition at line 112 of file GCTAModelSkyCube.hpp.

Referenced by copy_members(), eval(), init_members(), load(), and npred().

GEbounds GCTAModelSkyCube::m_ebounds
protected

Energy boundaries of sky cube.

Definition at line 113 of file GCTAModelSkyCube.hpp.

Referenced by copy_members(), init_members(), and load().

GNodeArray GCTAModelSkyCube::m_elogmeans
protected

Mean log10(TeV) energies for the sky cube.

Definition at line 114 of file GCTAModelSkyCube.hpp.

Referenced by copy_members(), eval(), init_members(), load(), and npred().

GFilename GCTAModelSkyCube::m_filename
protected

Filename.

Definition at line 111 of file GCTAModelSkyCube.hpp.

Referenced by copy_members(), filename(), init_members(), load(), and write_xml_spatial().

GModelPar GCTAModelSkyCube::m_norm
protected

Normalisation parameter.

Definition at line 115 of file GCTAModelSkyCube.hpp.

Referenced by copy_members(), eval(), init_members(), npred(), read_xml_spatial(), set_pointers(), and write_xml_spatial().

std::vector<GEnergy> GCTAModelSkyCube::m_npred_energies
mutableprotected

Model energy.

Definition at line 121 of file GCTAModelSkyCube.hpp.

Referenced by copy_members(), init_members(), and npred().

std::vector<std::string> GCTAModelSkyCube::m_npred_names
mutableprotected

Model names.

Definition at line 120 of file GCTAModelSkyCube.hpp.

Referenced by copy_members(), init_members(), and npred().

std::vector<GTime> GCTAModelSkyCube::m_npred_times
mutableprotected

Model time.

Definition at line 122 of file GCTAModelSkyCube.hpp.

Referenced by copy_members(), init_members(), and npred().

std::vector<double> GCTAModelSkyCube::m_npred_values
mutableprotected

Model values.

Definition at line 123 of file GCTAModelSkyCube.hpp.

Referenced by copy_members(), init_members(), and npred().

GModelSpectral* GCTAModelSkyCube::m_spectral
protected

Spectral model.

Definition at line 116 of file GCTAModelSkyCube.hpp.

Referenced by copy_members(), free_members(), GCTAModelSkyCube(), init_members(), read(), and spectral().

GModelTemporal* GCTAModelSkyCube::m_temporal
protected

Temporal model.

Definition at line 117 of file GCTAModelSkyCube.hpp.

Referenced by copy_members(), free_members(), GCTAModelSkyCube(), init_members(), is_constant(), read(), temporal(), and write().


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