17#include <boost/math/special_functions/bessel.hpp>
38 declareParameter(
"Radius", 0.98,
"Radius of rotation (Angstroms)");
47 auto HeightConstraint = std::make_unique<BConstraint>(
this,
"Height", std::numeric_limits<double>::epsilon(),
true);
50 auto RadiusConstraint = std::make_unique<BConstraint>(
this,
"Radius", std::numeric_limits<double>::epsilon(),
true);
62 if (R < std::numeric_limits<double>::epsilon()) {
63 return std::numeric_limits<double>::infinity();
66 return pow(boost::math::sph_bessel(0, Q * R), 2);
#define DECLARE_FUNCTION(classname)
Macro for declaring a new type of function to be used with the FunctionFactory.
Attribute is a non-fitting parameter.
double asDouble() const
Returns double value if attribute is a double, throws exception otherwise.
virtual Attribute getAttribute(const std::string &name) const
Return a value of attribute attName.
virtual void addConstraint(std::unique_ptr< IConstraint > ic)
Add a constraint to function.
double getParameter(size_t i) const override
Get i-th parameter.
A boundary constraint is designed to be used to set either upper or lower (or both) boundaries on a s...
Elastic part of the DiffSphere function.
void init() override
overwrite IFunction base class method, which declare function parameters
double HeightPrefactor() const override
A rescaling of the peak intensity.
The Logger class is in charge of the publishing messages from the framework through various channels.