27#ifndef GMODELSPATIALDIFFUSECUBE_HPP
28#define GMODELSPATIALDIFFUSECUBE_HPP
67 const double&
value = 1.0);
70 const double&
value = 1.0);
78 virtual void clear(
void);
80 virtual std::string
classname(
void)
const;
82 const bool& gradients =
false)
const;
87 const double& radius)
const;
89 const double& margin = 0.0)
const;
100 double value(
void)
const;
113 const bool& clobber =
false)
const;
153 return (
"GModelSpatialDiffuseCube");
257 const double& radius)
const
Energy boundaries class interface definition.
Filename class interface definition.
Model parameter class interface definition.
Abstract diffuse spatial model base class interface definition.
Spectral nodes model class definition.
Abstract spectral model base class interface definition.
Node array class interface definition.
Sky direction class interface definition.
Sky map class definition.
Circular sky region class interface definition.
Energy boundaries container class.
Class that handles energies in a unit independent way.
void set_energy_boundaries(void)
Set energy boundaries.
const GFilename & filename(void) const
Get file name.
void load_cube(const GFilename &filename)
Load map cube.
void update_mc_cache(void)
Update Monte Carlo cache.
double m_mc_one_minus_cosrad
1-cosine of radius
GModelSpatialDiffuseCube(void)
Void constructor.
const GSkyMap & cube(void) const
Get map cube.
void load(const GFilename &filename)
Load cube into the model class.
std::vector< double > m_mc_max
Maximum values for MC.
virtual GSkyDir mc(const GEnergy &energy, const GTime &time, GRan &ran) const
Returns MC sky direction.
virtual double mc_norm(const GSkyDir &dir, const double &radius) const
Return normalization of diffuse cube for Monte Carlo simulations.
virtual std::string classname(void) const
Return class name.
const GSkyRegionCircle & mc_cone(void) const
Get Monte Carlo simulation cone.
double cube_intensity(const GPhoton &photon) const
Compute cube intensity by log-log interpolation.
const GModelSpectralNodes & spectrum(void) const
Get map cube spectrum.
bool m_loaded
Signals if map cube has been loaded.
void copy_members(const GModelSpatialDiffuseCube &model)
Copy class members.
virtual std::string print(const GChatter &chatter=NORMAL) const
Print map cube information.
virtual double flux(const GSkyRegion ®ion, const GEnergy &srcEng=GEnergy(), const GTime &srcTime=GTime()) const
Returns diffuse cube flux integrated in sky region.
virtual void write(GXmlElement &xml) const
Write model into XML element.
GModelSpectralNodes m_mc_spectrum
Map cube spectrum.
virtual void read(const GXmlElement &xml)
Read model from XML element.
GFilename m_filename
Name of map cube.
double value(void) const
Get model value.
GNodeArray m_logE
Log10(energy) values of the maps.
void init_members(void)
Initialise class members.
void free_members(void)
Delete class members.
virtual double eval(const GPhoton &photon, const bool &gradients=false) const
Evaluate function.
void save(const GFilename &filename, const bool &clobber=false) const
Save cube into FITS file.
GEbounds m_ebounds
Energy bounds of the maps.
void fetch_cube(void) const
Fetch cube.
GEnergies energies(void)
Returns map cube energies.
virtual GModelSpatialDiffuseCube & operator=(const GModelSpatialDiffuseCube &model)
Assignment operator.
GSkyRegionCircle m_mc_cone
MC cone.
virtual bool contains(const GSkyDir &dir, const double &margin=0.0) const
Signals whether model contains sky direction.
virtual void clear(void)
Clear map cube model.
virtual ~GModelSpatialDiffuseCube(void)
Destructor.
virtual GModelSpatialDiffuseCube * clone(void) const
Clone map cube model.
virtual void set_region(void) const
Set boundary sky region.
Abstract diffuse spatial model base class.
std::string type(void) const
Return model type.
const GSkyRegion * region(void) const
Return boundary sky region.
Spectral nodes model class.
double value(void) const
Return parameter value.
Class that handles photons.
Random number generator class.
Interface for the circular sky region class.
Abstract interface for the sky region class.