45 #define G_READ "GModelSpatialRadialProfileDMBurkert::read(GXmlElement&)"
46 #define G_WRITE "GModelSpatialRadialProfileDMBurkert::write(GXmlElement&)"
153 if (
this != &model) {
260 if (theta > theta_max) {
391 result.append(
"=== GModelSpatialRadialProfileDMBurkert ===");
396 for (
int i = 0; i <
size(); ++i) {
419 m_type =
"DMBurkertProfile";
621 double r = los * los;
718 const double minradian = 0.0;
719 const int npoints = 200;
723 double dr = (angle - minradian) / npoints ;
726 for (
int i = 0; i < npoints; ++i) {
729 double r = minradian + (i * dr);
virtual ~GModelSpatialRadialProfileDMBurkert(void)
Destructor.
void free_members(void)
Delete class members.
virtual void write(GXmlElement &xml) const
Write model into XML element.
const std::string & name(void) const
Return parameter name.
double mass_density(const double &radius) const
Calculate Halo Mass Density.
XML element node class interface definition.
double gradient(void) const
Return parameter gradient.
int size(void) const
Return number of parameters.
void write(GXmlElement &xml) const
Set or update parameter attributes in XML element.
GVector cos(const GVector &vector)
Computes cosine of vector elements.
const GModelSpatialRadialDisk g_radial_disk_seed
double scale_radius(void) const
Return scale radius.
virtual std::string print(const GChatter &chatter=NORMAL) const
Print information.
virtual GModelSpatialRadialProfileDMBurkert & operator=(const GModelSpatialRadialProfileDMBurkert &model)
Assignment operator.
GIntegral class interface definition.
Interface definition for the spatial model registry class.
double min(void) const
Return parameter minimum boundary.
GModelPar m_scale_density
Scale density of halo profile.
void init_members(void)
Initialise class members.
void init_members(void)
Initialise class members.
const double & scale(void) const
Return parameter scale.
virtual double theta_max(void) const
Return maximum model radius (in radians)
GVector sqrt(const GVector &vector)
Computes square root of vector elements.
bool has_grad(void) const
Signal if parameter gradient is computed analytically.
double m_scale_density_squared
GModelPar m_theta_min
Minimum theta angle.
void free_members(void)
Delete class members.
double m_last_scale_density
void init_members(void)
Initialise class members.
void free_members(void)
Delete class members.
void free(void)
Free a parameter.
std::vector< GModelPar * > m_pars
Parameter pointers.
void fix(void)
Fix a parameter.
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.
GModelPar m_theta_max
Maximum theta angle.
void clear(void)
Clear parameter.
Spatial model registry class definition.
virtual GModelSpatialRadialProfileDMBurkert * clone(void) const
Clone radial DMBurkert profile model.
double angle(const GVector &a, const GVector &b)
Computes angle between vectors.
std::string type(void) const
Return model type.
double m_last_scale_radius
GModelPar m_halo_distance
Distance from Earth to halo center.
void xml_check_parnum(const std::string &origin, const GXmlElement &xml, const int &number)
Checks number of parameters.
double eval(const double &los)
Kernel for halo density profile squared.
double jfactor(const double &angle) const
Calculate J-factor.
virtual void write(GXmlElement &xml) const
Write model into XML element.
void update(void) const
Update precomputation cache.
void free_members(void)
Delete class members.
virtual double theta_min(void) const
Return minimum model radius (in radians)
Dark Matter Burkert profile model class interface definition.
std::string m_type
Spatial model type.
void read(const GXmlElement &xml)
Extract parameter attributes from XML element.
double value(void) const
Return parameter value.
GModelPar m_core_radius
Core radius.
virtual GModelSpatialRadialProfile & operator=(const GModelSpatialRadialProfile &model)
Assignment operator.
const std::string & unit(void) const
Return parameter unit.
double scale_density(void) const
Return scale density.
Exception handler interface definition.
virtual void clear(void)
Clear radial DMBurkert profile model.
void init_members(void)
Initialise class members.
virtual double profile_value(const double &theta) const
Radial profile.
std::string parformat(const std::string &s, const int &indent=0)
Convert string in parameter format.
GModelSpatialRadialProfileDMBurkert(void)
Void constructor.
GModelPar m_scale_radius
Scale radius of halo profile.
GVector atan(const GVector &vector)
Computes arctan of vector elements.
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.
void copy_members(const GModelSpatialRadialProfileDMBurkert &model)
Copy class members.
virtual void read(const GXmlElement &xml)
Read model from XML element.
Mathematical function definitions.
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.