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