added polynom and improved prettyfing
This commit is contained in:
@ -68,28 +68,30 @@
|
||||
#define THEORY_BESSEL 13
|
||||
#define THEORY_INTERNAL_BESSEL 14
|
||||
#define THEORY_SKEWED_GAUSS 15
|
||||
#define THEORY_USER_FCN 16
|
||||
#define THEORY_POLYNOM 16
|
||||
#define THEORY_USER_FCN 17
|
||||
|
||||
// function parameter tags, i.e. how many parameters has a specific function
|
||||
// if there is a comment with a (tshift), the number of parameters is increased by one
|
||||
#define THEORY_PARAM_ASYMMETRY 1 // asymetry
|
||||
#define THEORY_PARAM_SIMPLE_EXP 1 // damping
|
||||
#define THEORY_PARAM_GENERAL_EXP 2 // damping, exponents
|
||||
#define THEORY_PARAM_SIMPLE_GAUSS 1 // damping
|
||||
#define THEORY_PARAM_STATIC_GAUSS_KT 1 // damping
|
||||
#define THEORY_PARAM_STATIC_KT_LF 2 // frequency, damping
|
||||
#define THEORY_PARAM_DYNAMIC_KT_LF 3 // frequency, damping, hop-rate
|
||||
#define THEORY_PARAM_COMBI_LGKT 2 // Lorentz rate, Gauss rate
|
||||
#define THEORY_PARAM_SPIN_GLASS 3 // rate, hop-rate, order parameter
|
||||
#define THEORY_PARAM_RANDOM_ANISOTROPIC_HYPERFINE 2 // frequency, rate
|
||||
#define THEORY_PARAM_ABRAGAM 2 // rate, hop-rate
|
||||
#define THEORY_PARAM_INTERNAL_FIELD 4 // phase, frequency, TF damping, damping
|
||||
#define THEORY_PARAM_TF_COS 2 // phase, frequency
|
||||
#define THEORY_PARAM_BESSEL 2 // phase, frequency
|
||||
#define THEORY_PARAM_INTERNAL_BESSEL 5 // fraction, phase, frequency, TF damping, damping
|
||||
#define THEORY_PARAM_SKEWED_GAUSS 4 // phase, frequency, rate minus, rate plus
|
||||
#define THEORY_PARAM_SIMPLE_EXP 1 // damping (tshift)
|
||||
#define THEORY_PARAM_GENERAL_EXP 2 // damping, exponents (tshift)
|
||||
#define THEORY_PARAM_SIMPLE_GAUSS 1 // damping (tshift)
|
||||
#define THEORY_PARAM_STATIC_GAUSS_KT 1 // damping (tshift)
|
||||
#define THEORY_PARAM_STATIC_KT_LF 2 // frequency, damping (tshift)
|
||||
#define THEORY_PARAM_DYNAMIC_KT_LF 3 // frequency, damping, hop-rate (tshift)
|
||||
#define THEORY_PARAM_COMBI_LGKT 2 // Lorentz rate, Gauss rate (tshift)
|
||||
#define THEORY_PARAM_SPIN_GLASS 3 // rate, hop-rate, order parameter (tshift)
|
||||
#define THEORY_PARAM_RANDOM_ANISOTROPIC_HYPERFINE 2 // frequency, rate (tshift)
|
||||
#define THEORY_PARAM_ABRAGAM 2 // rate, hop-rate (tshift)
|
||||
#define THEORY_PARAM_INTERNAL_FIELD 4 // phase, frequency, TF damping, damping (tshift)
|
||||
#define THEORY_PARAM_TF_COS 2 // phase, frequency (tshift)
|
||||
#define THEORY_PARAM_BESSEL 2 // phase, frequency (tshift)
|
||||
#define THEORY_PARAM_INTERNAL_BESSEL 5 // fraction, phase, frequency, TF damping, damping (tshift)
|
||||
#define THEORY_PARAM_SKEWED_GAUSS 4 // phase, frequency, rate minus, rate plus (tshift)
|
||||
|
||||
// number of available user functions
|
||||
#define THEORY_MAX 17
|
||||
#define THEORY_MAX 18
|
||||
|
||||
// deg -> rad factor
|
||||
#define DEG_TO_RAD 0.0174532925199432955
|
||||
@ -165,6 +167,9 @@ static PTheoDataBase fgTheoDataBase[THEORY_MAX] = {
|
||||
{THEORY_SKEWED_GAUSS, THEORY_PARAM_SKEWED_GAUSS, false,
|
||||
"skewedGss", "skg", "(phase frequency rate_m rate_p)"},
|
||||
|
||||
{THEORY_POLYNOM, 0, false,
|
||||
"polynom", "p", "(tshift p0 p1 ... pn)"},
|
||||
|
||||
{THEORY_USER_FCN, 0, false,
|
||||
"userFcn", "u", ""}};
|
||||
|
||||
@ -184,6 +189,8 @@ class PTheory
|
||||
private:
|
||||
virtual int SearchDataBase(TString name);
|
||||
virtual void MakeCleanAndTidyTheoryBlock(PMsrLines* fullTheoryBlock);
|
||||
virtual void MakeCleanAndTidyPolynom(unsigned int i, PMsrLines* fullTheoryBlock);
|
||||
virtual void MakeCleanAndTidyUserFcn(unsigned int i, PMsrLines* fullTheoryBlock);
|
||||
|
||||
virtual double Asymmetry(const PDoubleVector& paramValues, const PDoubleVector& funcValues) const;
|
||||
virtual double SimpleExp(register double t, const PDoubleVector& paramValues, const PDoubleVector& funcValues) const;
|
||||
@ -201,6 +208,7 @@ class PTheory
|
||||
virtual double Bessel(register double t, const PDoubleVector& paramValues, const PDoubleVector& funcValues) const;
|
||||
virtual double InternalBessel(register double t, const PDoubleVector& paramValues, const PDoubleVector& funcValues) const;
|
||||
virtual double SkewedGauss(register double t, const PDoubleVector& paramValues, const PDoubleVector& funcValues) const;
|
||||
virtual double Polynom(register double t, const PDoubleVector& paramValues, const PDoubleVector& funcValues) const;
|
||||
virtual double UserFcn(register double t, const PDoubleVector& paramValues, const PDoubleVector& funcValues) const;
|
||||
|
||||
// variables
|
||||
|
Reference in New Issue
Block a user