15 #ifndef BORNAGAIN_SAMPLE_CORRELATIONS_PROFILES1D_H
16 #define BORNAGAIN_SAMPLE_CORRELATIONS_PROFILES1D_H
31 IProfile1D(
const std::vector<double>& PValues);
39 virtual double decayFT(
double q)
const = 0;
47 virtual std::unique_ptr<IDistribution1DSampler>
createSampler()
const = 0;
69 std::string
className() const final {
return "Profile1DCauchy"; }
71 std::vector<ParaMeta>
parDefs() const final
73 return {{
"Omega",
"nm",
"Half-width", 0,
INF, 1.}};
76 double decayFT(
double q)
const override;
79 std::unique_ptr<IDistribution1DSampler>
createSampler()
const override;
93 std::string
className() const final {
return "Profile1DGauss"; }
95 std::vector<ParaMeta>
parDefs() const final
97 return {{
"Omega",
"nm",
"Half-width", 0,
INF, 1.}};
100 double decayFT(
double q)
const override;
103 std::unique_ptr<IDistribution1DSampler>
createSampler()
const override;
117 std::string
className() const final {
return "Profile1DGate"; }
121 return {{
"Omega",
"nm",
"Half-width", 0,
INF, 1.}};
124 double decayFT(
double q)
const override;
127 std::unique_ptr<IDistribution1DSampler>
createSampler()
const override;
142 std::string
className() const final {
return "Profile1DTriangle"; }
146 return {{
"Omega",
"nm",
"Half-width", 0,
INF, 1.}};
149 double decayFT(
double q)
const override;
152 std::unique_ptr<IDistribution1DSampler>
createSampler()
const override;
167 std::string
className() const final {
return "Profile1DCosine"; }
171 return {{
"Omega",
"nm",
"Half-width", 0,
INF, 1.}};
174 double decayFT(
double q)
const override;
177 std::unique_ptr<IDistribution1DSampler>
createSampler()
const override;
192 std::string
className() const final {
return "Profile1DVoigt"; }
196 return {{
"Omega",
"nm",
"Half-width", 0,
INF, 1.},
197 {
"Eta",
"",
"balances between Gauss (eta=0) and Lorentz (eta=1) limiting cases", 0,
201 double decayFT(
double q)
const override;
205 std::unique_ptr<IDistribution1DSampler>
createSampler()
const override;
Defines and implements the standard mix-in ICloneable.
Defines interface class IProfile1D, and children thereof.
Interface for polymorphic classes that should not be copied, except by explicit cloning.
Base class for tree-like structures containing parameterized objects.
Interface for a one-dimensional distribution, with normalization adjusted so that the Fourier transfo...
virtual double standardizedFT(double q) const =0
Returns Fourier transform of the normalized distribution; is a decay function starting at standardize...
virtual std::string pythonConstructor() const
Creates the Python constructor of this class (or derived classes)
virtual double decayFT(double q) const =0
Returns Fourier transform of the distribution scaled as decay function f(x)/f(0).
double decayLength() const
virtual double qSecondDerivative() const =0
Returns the negative of the second order derivative in q space around q=0.
IProfile1D(const std::vector< double > &PValues)
virtual std::unique_ptr< IDistribution1DSampler > createSampler() const =0
IProfile1D * clone() const override=0
Exponential IProfile1D exp(-|omega*x|); its Fourier transform standardizedFT(q) is a Cauchy-Lorentzia...
double standardizedFT(double q) const override
Returns Fourier transform of the normalized distribution; is a decay function starting at standardize...
double qSecondDerivative() const override
Returns the negative of the second order derivative in q space around q=0.
Profile1DCauchy * clone() const override
std::unique_ptr< IDistribution1DSampler > createSampler() const override
Profile1DCauchy(std::vector< double > P)
double decayFT(double q) const override
Returns Fourier transform of the distribution scaled as decay function f(x)/f(0).
std::vector< ParaMeta > parDefs() const final
Returns the parameter definitions, to be hard-coded in each leaf class.
std::string className() const final
Returns the class name, to be hard-coded in each leaf class that inherits from INode.
IProfile1D consisting of one cosine wave [1+cos(pi*x/omega) if |x|<omega, and 0 otherwise]; its Fouri...
double qSecondDerivative() const override
Returns the negative of the second order derivative in q space around q=0.
double decayFT(double q) const override
Returns Fourier transform of the distribution scaled as decay function f(x)/f(0).
double standardizedFT(double q) const override
Returns Fourier transform of the normalized distribution; is a decay function starting at standardize...
Profile1DCosine * clone() const override
std::string className() const final
Returns the class name, to be hard-coded in each leaf class that inherits from INode.
Profile1DCosine(std::vector< double > P)
std::unique_ptr< IDistribution1DSampler > createSampler() const override
std::vector< ParaMeta > parDefs() const final
Returns the parameter definitions, to be hard-coded in each leaf class.
Square gate IProfile1D; its Fourier transform standardizedFT(q) is a sinc function starting at standa...
double decayFT(double q) const override
Returns Fourier transform of the distribution scaled as decay function f(x)/f(0).
std::string className() const final
Returns the class name, to be hard-coded in each leaf class that inherits from INode.
double standardizedFT(double q) const override
Returns Fourier transform of the normalized distribution; is a decay function starting at standardize...
std::vector< ParaMeta > parDefs() const final
Returns the parameter definitions, to be hard-coded in each leaf class.
std::unique_ptr< IDistribution1DSampler > createSampler() const override
Profile1DGate(std::vector< double > P)
double qSecondDerivative() const override
Returns the negative of the second order derivative in q space around q=0.
Profile1DGate * clone() const override
Gaussian IProfile1D; its Fourier transform standardizedFT(q) is a Gaussian starting at standardizedFT...
std::vector< ParaMeta > parDefs() const final
Returns the parameter definitions, to be hard-coded in each leaf class.
Profile1DGauss(std::vector< double > P)
Profile1DGauss * clone() const override
double standardizedFT(double q) const override
Returns Fourier transform of the normalized distribution; is a decay function starting at standardize...
std::string className() const final
Returns the class name, to be hard-coded in each leaf class that inherits from INode.
std::unique_ptr< IDistribution1DSampler > createSampler() const override
double qSecondDerivative() const override
Returns the negative of the second order derivative in q space around q=0.
double decayFT(double q) const override
Returns Fourier transform of the distribution scaled as decay function f(x)/f(0).
Triangle IProfile1D [1-|x|/omega if |x|<omega, and 0 otherwise]; its Fourier transform standardizedFT...
double decayFT(double q) const override
Returns Fourier transform of the distribution scaled as decay function f(x)/f(0).
std::vector< ParaMeta > parDefs() const final
Returns the parameter definitions, to be hard-coded in each leaf class.
Profile1DTriangle(std::vector< double > P)
double standardizedFT(double q) const override
Returns Fourier transform of the normalized distribution; is a decay function starting at standardize...
std::string className() const final
Returns the class name, to be hard-coded in each leaf class that inherits from INode.
std::unique_ptr< IDistribution1DSampler > createSampler() const override
double qSecondDerivative() const override
Returns the negative of the second order derivative in q space around q=0.
Profile1DTriangle * clone() const override
IProfile1D that provides a Fourier transform standardizedFT(q) in form of a pseudo-Voigt decay functi...
Profile1DVoigt * clone() const override
double standardizedFT(double q) const override
Returns Fourier transform of the normalized distribution; is a decay function starting at standardize...
std::string pythonConstructor() const override
Creates the Python constructor of this class (or derived classes)
double decayFT(double q) const override
Returns Fourier transform of the distribution scaled as decay function f(x)/f(0).
std::string className() const final
Returns the class name, to be hard-coded in each leaf class that inherits from INode.
Profile1DVoigt(std::vector< double > P)
std::vector< ParaMeta > parDefs() const final
Returns the parameter definitions, to be hard-coded in each leaf class.
double qSecondDerivative() const override
Returns the negative of the second order derivative in q space around q=0.
std::unique_ptr< IDistribution1DSampler > createSampler() const override