45 #define G_READ "GModelSpatialRadialProfileGauss::read(GXmlElement&)"
46 #define G_WRITE "GModelSpatialRadialProfileGauss::write(GXmlElement&)"
110 const double& sigma) :
178 if (
this != &model) {
350 result.append(
"=== GModelSpatialRadialProfileGauss ===");
355 for (
int i = 0; i <
size(); ++i) {
378 m_type =
"GaussianProfile";
442 double sigma2 = sigma_rad * sigma_rad;
443 double theta2 = theta * theta;
444 double value =
std::exp(-0.5 * theta2 / sigma2) /
GModelPar m_sigma
Gaussian width (deg)
virtual GModelSpatialRadialProfileGauss & operator=(const GModelSpatialRadialProfileGauss &model)
Assignment operator.
void free_members(void)
Delete class members.
const std::string & name(void) const
Return parameter name.
XML element node class interface definition.
double gradient(void) const
Return parameter gradient.
virtual void write(GXmlElement &xml) const
Write model into XML element.
int size(void) const
Return number of parameters.
void write(GXmlElement &xml) const
Set or update parameter attributes in XML element.
GModelSpatialRadialProfileGauss(void)
Void constructor.
const GModelSpatialRadialDisk g_radial_disk_seed
Interface definition for the spatial model registry class.
double min(void) const
Return parameter minimum boundary.
virtual double theta_min(void) const
Return maximum model radius (in radians)
Radial Gaussian profile model class interface definition.
void init_members(void)
Initialise class members.
void init_members(void)
Initialise class members.
virtual double theta_max(void) const
Return maximum model radius (in radians)
const double & scale(void) const
Return parameter scale.
bool has_grad(void) const
Signal if parameter gradient is computed analytically.
const GSkyDir & dir(void) const
Return position of radial spatial model.
void free_members(void)
Delete class members.
void free_members(void)
Delete class members.
void free(void)
Free a parameter.
std::vector< GModelPar * > m_pars
Parameter pointers.
GXmlElement * xml_need_par(const std::string &origin, GXmlElement &xml, const std::string &name)
Return pointer to parameter with given name in XML element.
virtual void read(const GXmlElement &xml)
Read model from XML element.
void clear(void)
Clear parameter.
Spatial model registry class definition.
void init_members(void)
Initialise class members.
std::string type(void) const
Return model type.
virtual void clear(void)
Clear radial Gaussian profile model.
void xml_check_parnum(const std::string &origin, const GXmlElement &xml, const int &number)
Checks number of parameters.
virtual ~GModelSpatialRadialProfileGauss(void)
Destructor.
virtual void write(GXmlElement &xml) const
Write model into XML element.
double sigma(void) const
Return Gaussian sigma.
void free_members(void)
Delete class members.
std::string m_type
Spatial model type.
virtual GModelSpatialRadialProfileGauss * clone(void) const
Clone radial Gaussian profile model.
void read(const GXmlElement &xml)
Extract parameter attributes from XML element.
double value(void) const
Return parameter value.
virtual GModelSpatialRadialProfile & operator=(const GModelSpatialRadialProfile &model)
Assignment operator.
const std::string & unit(void) const
Return parameter unit.
Exception handler interface definition.
virtual double profile_value(const double &theta) const
Radial profile.
GVector exp(const GVector &vector)
Computes exponential of vector elements.
void init_members(void)
Initialise class members.
void copy_members(const GModelSpatialRadialProfileGauss &model)
Copy class members.
std::string parformat(const std::string &s, const int &indent=0)
Convert string in parameter format.
virtual void read(const GXmlElement &xml)
Read model from XML element.
const GXmlElement * xml_get_par(const std::string &origin, const GXmlElement &xml, const std::string &name)
Return pointer to parameter with given name in XML element.
bool m_coord_indep
True if model independent of sky coordinates.
Mathematical function definitions.
virtual std::string print(const GChatter &chatter=NORMAL) const
Print information.
std::string str(const unsigned short int &value)
Convert unsigned short integer value into string.
void xml_check_type(const std::string &origin, GXmlElement &xml, const std::string &type)
Checks the model type.