|
musrfit 1.10.0
|
Theory function evaluator and expression tree manager. More...
#include <PTheory.h>

Public Member Functions | |
| PTheory (PMsrHandler *msrInfo, UInt_t runNo, const Bool_t hasParent=false) | |
| Constructor that parses the THEORY block and builds the expression tree. | |
| virtual | ~PTheory () |
| Destructor that recursively cleans up the expression tree. | |
| virtual Bool_t | IsValid () |
| Checks if the entire theory expression tree is valid. | |
| virtual Double_t | Func (Double_t t, const PDoubleVector ¶mValues, const PDoubleVector &funcValues) const |
| Evaluates the theory function at a given time point. | |
Private Member Functions | |
| virtual void | CleanUp (PTheory *theo) |
| Recursively deletes child theory nodes (fAdd and fMul). | |
| virtual Int_t | SearchDataBase (TString name) |
| Searches fgTheoDataBase for a function by name or abbreviation. | |
| virtual Int_t | GetUserFcnIdx (UInt_t lineNo) const |
| Returns the index of user functions up to the given line. | |
| virtual void | MakeCleanAndTidyTheoryBlock (PMsrLines *fullTheoryBlock) |
| Reformats the theory block for clean MSR file output. | |
| virtual void | MakeCleanAndTidyPolynom (UInt_t i, PMsrLines *fullTheoryBlock) |
| Formats a polynomial theory line with proper spacing. | |
| virtual void | MakeCleanAndTidyUserFcn (UInt_t i, PMsrLines *fullTheoryBlock) |
| Formats a user function theory line with proper spacing. | |
| virtual Double_t | Constant (const PDoubleVector ¶mValues, const PDoubleVector &funcValues) const |
| Returns constant value. Formula: c. | |
| virtual Double_t | Asymmetry (const PDoubleVector ¶mValues, const PDoubleVector &funcValues) const |
| Returns asymmetry value. Formula: A. | |
| virtual Double_t | SimpleExp (Double_t t, const PDoubleVector ¶mValues, const PDoubleVector &funcValues) const |
| Simple exponential relaxation. Formula: exp(-λt) | |
| virtual Double_t | GeneralExp (Double_t t, const PDoubleVector ¶mValues, const PDoubleVector &funcValues) const |
| General (stretched) exponential. Formula: exp(-(λt)^β) | |
| virtual Double_t | SimpleGauss (Double_t t, const PDoubleVector ¶mValues, const PDoubleVector &funcValues) const |
| Simple Gaussian relaxation. Formula: exp(-σ²t²/2) | |
| virtual Double_t | StaticGaussKT (Double_t t, const PDoubleVector ¶mValues, const PDoubleVector &funcValues) const |
| Static Gaussian Kubo-Toyabe (ZF). Formula: 1/3 + 2/3(1-σ²t²)exp(-σ²t²/2) | |
| virtual Double_t | StaticGaussKTLF (Double_t t, const PDoubleVector ¶mValues, const PDoubleVector &funcValues) const |
| Static Gaussian Kubo-Toyabe (LF). Requires numerical integration. | |
| virtual Double_t | DynamicGaussKTLF (Double_t t, const PDoubleVector ¶mValues, const PDoubleVector &funcValues) const |
| Dynamic Gaussian Kubo-Toyabe (LF). Strong collision model. | |
| virtual Double_t | StaticLorentzKT (Double_t t, const PDoubleVector ¶mValues, const PDoubleVector &funcValues) const |
| Static Lorentzian Kubo-Toyabe (ZF). Formula: 1/3 + 2/3(1-at)exp(-at) | |
| virtual Double_t | StaticLorentzKTLF (Double_t t, const PDoubleVector ¶mValues, const PDoubleVector &funcValues) const |
| Static Lorentzian Kubo-Toyabe (LF). Requires numerical integration. | |
| virtual Double_t | DynamicLorentzKTLF (Double_t t, const PDoubleVector ¶mValues, const PDoubleVector &funcValues) const |
| Dynamic Lorentzian Kubo-Toyabe (LF). Strong collision model. | |
| virtual Double_t | DynamicGauLorKTZFFast (Double_t t, const PDoubleVector ¶mValues, const PDoubleVector &funcValues) const |
| Fast dynamic Gaussian-Lorentzian KT (ZF). Approximate fast calculation. | |
| virtual Double_t | DynamicGauLorKTLFFast (Double_t t, const PDoubleVector ¶mValues, const PDoubleVector &funcValues) const |
| Fast dynamic Gaussian-Lorentzian KT (LF). Approximate fast calculation. | |
| virtual Double_t | DynamicGauLorKTLF (Double_t t, const PDoubleVector ¶mValues, const PDoubleVector &funcValues) const |
| Dynamic Gaussian-Lorentzian KT (LF). Full numerical calculation. | |
| virtual Double_t | CombiLGKT (Double_t t, const PDoubleVector ¶mValues, const PDoubleVector &funcValues) const |
| Combined Lorentzian-Gaussian KT. Product of both relaxation types. | |
| virtual Double_t | StrKT (Double_t t, const PDoubleVector ¶mValues, const PDoubleVector &funcValues) const |
| Stretched Kubo-Toyabe. Formula: exp(-(σt)^β) with KT-like recovery. | |
| virtual Double_t | SpinGlass (Double_t t, const PDoubleVector ¶mValues, const PDoubleVector &funcValues) const |
| Spin glass relaxation function. Edwards-Anderson order parameter. | |
| virtual Double_t | RandomAnisotropicHyperfine (Double_t t, const PDoubleVector ¶mValues, const PDoubleVector &funcValues) const |
| Random anisotropic hyperfine coupling. Powder average of anisotropic coupling. | |
| virtual Double_t | Abragam (Double_t t, const PDoubleVector ¶mValues, const PDoubleVector &funcValues) const |
| Abragam relaxation. Motional narrowing formula. | |
| virtual Double_t | TFCos (Double_t t, const PDoubleVector ¶mValues, const PDoubleVector &funcValues) const |
| Transverse field cosine. Formula: cos(φ + 2πνt) | |
| virtual Double_t | InternalField (Double_t t, const PDoubleVector ¶mValues, const PDoubleVector &funcValues) const |
| Internal field distribution. Gaussian field distribution model. | |
| virtual Double_t | InternalFieldGK (Double_t t, const PDoubleVector ¶mValues, const PDoubleVector &funcValues) const |
| Internal field (Kornilov model). Vortex lattice field distribution. | |
| virtual Double_t | InternalFieldLL (Double_t t, const PDoubleVector ¶mValues, const PDoubleVector &funcValues) const |
| Internal field (Larkin-Ovchinnikov model). Vortex lattice field distribution. | |
| virtual Double_t | Bessel (Double_t t, const PDoubleVector ¶mValues, const PDoubleVector &funcValues) const |
| Bessel function precession. Formula: J₀(2πνt + φ) | |
| virtual Double_t | InternalBessel (Double_t t, const PDoubleVector ¶mValues, const PDoubleVector &funcValues) const |
| Internal Bessel field distribution. Combines Bessel with relaxation. | |
| virtual Double_t | SkewedGauss (Double_t t, const PDoubleVector ¶mValues, const PDoubleVector &funcValues) const |
| Skewed Gaussian. Asymmetric relaxation rates before/after zero crossing. | |
| virtual Double_t | StaticNKZF (Double_t t, const PDoubleVector ¶mValues, const PDoubleVector &funcValues) const |
| Static Nakajima-Keren (ZF). Combined nuclear and electronic relaxation. | |
| virtual Double_t | StaticNKTF (Double_t t, const PDoubleVector ¶mValues, const PDoubleVector &funcValues) const |
| Static Nakajima-Keren (TF). Combined nuclear and electronic relaxation with precession. | |
| virtual Double_t | DynamicNKZF (Double_t t, const PDoubleVector ¶mValues, const PDoubleVector &funcValues) const |
| Dynamic Nakajima-Keren (ZF). With spin fluctuations. | |
| virtual Double_t | DynamicNKTF (Double_t t, const PDoubleVector ¶mValues, const PDoubleVector &funcValues) const |
| Dynamic Nakajima-Keren (TF). With spin fluctuations and precession. | |
| virtual Double_t | FmuF (Double_t t, const PDoubleVector ¶mValues, const PDoubleVector &funcValues) const |
| F-μ-F oscillation. Muon bound between two fluorine atoms. | |
| virtual Double_t | MuMinusExpTF (Double_t t, const PDoubleVector ¶mValues, const PDoubleVector &funcValues) const |
| μ⁻ exponential TF. Negative muon in transverse field. | |
| virtual Double_t | Polynom (Double_t t, const PDoubleVector ¶mValues, const PDoubleVector &funcValues) const |
| Polynomial function. Formula: Σᵢ pᵢtⁱ | |
| virtual Double_t | UserFcn (Double_t t, const PDoubleVector ¶mValues, const PDoubleVector &funcValues) const |
| User-defined function. Calls external shared library function. | |
| virtual void | CalculateGaussLFIntegral (const Double_t *val) const |
| Calculates and caches Gaussian LF integral for static KT. | |
| virtual void | CalculateLorentzLFIntegral (const Double_t *val) const |
| Calculates and caches Lorentzian LF integral for static KT. | |
| virtual Double_t | GetLFIntegralValue (const Double_t t) const |
| Retrieves cached LF integral value at time t using interpolation. | |
| virtual void | CalculateDynKTLF (const Double_t *val, Int_t tag) const |
| Calculates dynamic KT in LF using integral equation approach. | |
| virtual Double_t | GetDynKTLFValue (const Double_t t) const |
| Retrieves cached dynamic KT LF value at time t. | |
| virtual Double_t | GetDyn_GL_KTLFValue (const Double_t t) const |
| Retrieves cached dynamic Gauss-Lorentz KT LF value at time t. | |
Private Attributes | |
| Bool_t | fValid |
| True if this theory node and its parse state are valid. | |
| UInt_t | fType |
| Theory function type (THEORY_CONST, THEORY_SIMPLE_EXP, etc.) | |
| std::vector< UInt_t > | fParamNo |
| Resolved parameter indices (0-based). Values >= MSR_PARAM_FUN_OFFSET are function references. | |
| UInt_t | fNoOfParam |
| Expected number of parameters for this function type. | |
| PTheory * | fAdd |
| Pointer to addition child node (left branch of tree) | |
| PTheory * | fMul |
| Pointer to multiplication child node (right branch of tree) | |
| Int_t | fUserFcnIdx |
| Index of this user function among all userFcn entries (for global state) | |
| TString | fUserFcnClassName |
| ROOT class name for user function (e.g., "TMyFunction") | |
| TString | fUserFcnSharedLibName |
| Shared library path (e.g., "libMyFunctions.so") | |
| PUserFcnBase * | fUserFcn |
| Pointer to instantiated user function object. | |
| PDoubleVector | fUserParam |
| Resolved parameter values for user function calls. | |
| PMsrHandler * | fMsrInfo |
| Pointer to MSR file handler (not owned) | |
| Double_t | fSamplingTime |
| Time step for LF integral calculation (default 1 ns = 0.001 μs) | |
| Double_t | fPrevParam [THEORY_MAX_PARAM] |
| Previous parameter values for cache invalidation check. | |
| PDoubleVector | fLFIntegral |
| Cached static LF KT integral values. | |
| Double_t | fDynLFdt |
| Time step for dynamic LF integral equation. | |
| PDoubleVector | fDynLFFuncValue |
| Cached dynamic Gaussian/Lorentzian LF KT values. | |
| PDoubleVector | fDyn_GL_LFFuncValue |
| Cached dynamic Gauss-Lorentz LF KT values. | |
Theory function evaluator and expression tree manager.
PTheory is the core class responsible for parsing, validating, and evaluating theory functions specified in the THEORY block of MSR files. It implements a binary expression tree to handle complex combinations of theory functions.
The theory describes the expected muon polarization as a function of time. Different physical phenomena (relaxation, precession, field distributions) are represented by different theory functions that can be combined.
Theory expressions are parsed into a binary tree where:
Example MSR theory block:
* THEORY * a 1 # asymmetry * tf 2 3 # TFieldCos * se 4 # simpleExp * + * a 5 * tf 6 7 *
Becomes: (par1 * cos(φ₂ + 2πν₃t) * exp(-λ₄t)) + (par5 * cos(φ₆ + 2πν₇t))
Function specification:
Parameter types:
1, 2, 3 → parameter index (1-based)map1, map2 → indirection via RUN block mapfun1, fun2 → evaluated FUNCTIONS block entryOperators:
+ on separate line: Addition of following termsBasic:
const (c): Constant valueasymmetry (a): Initial asymmetrysimplExpo (se): exp(-λt)generExpo (ge): exp(-(λt)^β)simpleGss (sg): exp(-σ²t²/2)Kubo-Toyabe (Gaussian):
statGssKt (stg): Static ZF Gaussian KTstatGssKTLF (sgktlf): Static LF Gaussian KTdynGssKTLF (dgktlf): Dynamic LF Gaussian KTKubo-Toyabe (Lorentzian):
statExpKT (sekt): Static ZF Lorentzian KTstatExpKTLF (sektlf): Static LF Lorentzian KTdynExpKTLF (dektlf): Dynamic LF Lorentzian KTPrecession:
TFieldCos (tf): cos(φ + 2πνt)bessel (b): J₀(2πνt + φ)internFld (ifld): Internal field distributionSpecial:
spinGlass (spg): Spin glass relaxationabragam (ab): Motional narrowinguserFcn (u): User-defined external functionLF Kubo-Toyabe functions require numerical integration which is cached for efficiency. The cache is invalidated when parameters change. Caching variables:
External functions can be loaded from shared libraries:
User functions must inherit from PUserFcnBase and implement:
| PTheory::PTheory | ( | PMsrHandler * | msrInfo, |
| UInt_t | runNo, | ||
| const Bool_t | hasParent = false ) |
Constructor that parses the THEORY block and builds the expression tree.
Parses the THEORY block and builds a binary expression tree.
Parses the theory block from the MSR file, validates function names and parameter counts, resolves parameter references, and recursively builds the expression tree for operators (+ and *).
Parsing algorithm:
| msrInfo | Pointer to MSR file handler containing theory block |
| runNo | Run number (0-based) for parameter map resolution |
| hasParent | False for root theory, true for child nodes. Controls static counter reset for recursive parsing. |
The constructor recursively parses the theory block from the MSR file and builds a binary tree structure. Each theory function becomes a node, with multiplication creating right children and addition creating left children.
Example Theory Block:
THEORY
a 1 # asymmetry
tf 2 3 # TFieldCos (phase, frequency)
se 4 # simpleExp (rate)
+
a 5
tf 6 7
se 8
+
a 9
tf 10 11
Resulting Binary Tree:
a 1
+/ \*
a 5 tf 2 3
+ / \* \ *
a 9 a 5 se 4
\* \*
tf 10 11 tf 6 7
\*
se 8
The tree is evaluated as: (a1 * tf23 * se4) + (a5 * tf67 * se8) + (a9 * tf1011)
Parsing Algorithm:
User Function Handling: User functions require special parsing:
| msrInfo | Pointer to MSR file handler (NOT owned, must outlive PTheory) |
| runNo | Zero-based run number for map parameter resolution |
| hasParent | false (default) for root theory node, true for child nodes. Controls reset of static line/depth counters. |
Definition at line 125 of file PTheory.cpp.
References fAdd, fDynLFdt, fgTheoDataBase, PMsrLineStructure::fLine, PMsrLineStructure::fLineNo, fMsrInfo, fMul, fNoOfParam, fParamNo, fPrevParam, fSamplingTime, fType, fUserFcn, fUserFcnClassName, fUserFcnIdx, fUserFcnSharedLibName, fUserParam, fValid, PMsrHandler::GetFuncIndex(), PMsrHandler::GetMsrRunList(), PMsrHandler::GetMsrTheory(), GetUserFcnIdx(), gGlobalUserFcn, MakeCleanAndTidyTheoryBlock(), MSR_PARAM_FUN_OFFSET, PTheory(), SearchDataBase(), status, THEORY_MAX_PARAM, THEORY_POLYNOM, THEORY_UNDEFINED, and THEORY_USER_FCN.
|
virtual |
Destructor that recursively cleans up the expression tree.
Releases all allocated resources:
Releases all resources allocated by this theory node and its children:
Definition at line 375 of file PTheory.cpp.
References CleanUp(), fDynLFFuncValue, fLFIntegral, fParamNo, fUserFcn, fUserParam, and gGlobalUserFcn.
|
privatevirtual |
Abragam relaxation. Motional narrowing formula.
theory function: Abragam function
![\[ = \exp\left[-\frac{\sigma^2}{\gamma^2}\left(e^{-\gamma t}-1+\gamma t\right)\right] \]](form_162.png)
or the time shifted version of it.
meaning of paramValues: 


return: function value
| t | time in ![]() |
| paramValues | parameter values |
| funcValues | vector with the functions (i.e. functions of the parameters) |
Definition at line 2274 of file PTheory.cpp.
References fParamNo, and MSR_PARAM_FUN_OFFSET.
Referenced by Func().
|
privatevirtual |
Returns asymmetry value. Formula: A.
Returns the initial asymmetry value.
Mathematical form:
![\[ P(t) = A \]](form_131.png)
The asymmetry represents the initial polarization of the muon beam and is typically used as a multiplicative prefactor for oscillating/relaxing functions. Typical values range from 0.15 to 0.30 depending on detector geometry.
Parameters:
| paramValues | Vector of fit parameter values |
| funcValues | Vector of evaluated function values |
Definition at line 1187 of file PTheory.cpp.
References fParamNo, and MSR_PARAM_FUN_OFFSET.
Referenced by Func().
|
privatevirtual |
Bessel function precession. Formula: J₀(2πνt + φ)
theory function: spherical bessel function including phase
![\[ = j_0(2\pi\nu t + \varphi) \]](form_172.png)
or the time shifted version of it.
meaning of paramValues: 


return: function value
| t | time in ![]() |
| paramValues | parameter values |
| funcValues | vector with the functions (i.e. functions of the parameters) |
Definition at line 2505 of file PTheory.cpp.
References DEG_TO_RAD, fParamNo, MSR_PARAM_FUN_OFFSET, and TWO_PI.
Referenced by Func().
|
privatevirtual |
Calculates dynamic KT in LF using integral equation approach.
Referenced by DynamicGauLorKTLF(), DynamicGaussKTLF(), and DynamicLorentzKTLF().
|
privatevirtual |
Calculates and caches Gaussian LF integral for static KT.
Referenced by StaticGaussKTLF().
|
privatevirtual |
Calculates and caches Lorentzian LF integral for static KT.
Referenced by StaticLorentzKTLF().
|
privatevirtual |
Recursively deletes child theory nodes (fAdd and fMul).
Recursively clean up theory
If data were a pointer to some data on the heap, here, we would call delete on it. If it were a "composed" object, its destructor would get called automatically after our own destructor, so we would not have to worry about it.
So all we have to clean up is the left and right subchild. It turns out that we don't have to check for null pointers; C++ automatically ignores a call to delete on a NULL pointer (according to the man page, the same is true with malloc() in C)
the COOLEST part is that if right is a non-null pointer, the destructor gets called recursively!
| theo | pointer to the theory object |
Definition at line 830 of file PTheory.cpp.
References fAdd, fMul, and PTheory().
Referenced by ~PTheory().
|
privatevirtual |
Combined Lorentzian-Gaussian KT. Product of both relaxation types.
theory function: dynamic Lorentzain Kubo-Toyabe in longitudinal applied field
![\[ = 1/3 + 2/3 \left(1-(\sigma t)^2-\lambda t\right) \exp\left(-1/2(\sigma t)^2-\lambda t\right)\]](form_155.png)
or the time shifted version of it.
meaning of paramValues: 


return: function value
| t | time in ![]() |
| paramValues | parameter values |
| funcValues | vector with the functions (i.e. functions of the parameters) |
Definition at line 2083 of file PTheory.cpp.
References fParamNo, and MSR_PARAM_FUN_OFFSET.
Referenced by Func().
|
privatevirtual |
Returns constant value. Formula: c.
Returns a constant value (baseline, background).
Mathematical form:
![\[ P(t) = c \]](form_130.png)
Used for constant offsets, fixed backgrounds, or baseline corrections.
Parameters:
| paramValues | Vector of fit parameter values |
| funcValues | Vector of evaluated function values |
Definition at line 1152 of file PTheory.cpp.
References fParamNo, and MSR_PARAM_FUN_OFFSET.
Referenced by Func().
|
privatevirtual |
Dynamic Gaussian-Lorentzian KT (LF). Full numerical calculation.
Local Gaussian, global Lorentzian in LF. For details see "Muon Spin Rotation, Relaxation, and Resonance", A. Yaouanc and P. Dalmas Sec. 6.4, Eq.(6.86).
| t | time in ![]() |
| paramValues | parameter values |
| funcValues | vector with the functions (i.e. functions of the parameters) |
Definition at line 1954 of file PTheory.cpp.
References CalculateDynKTLF(), fDyn_GL_LFFuncValue, fParamNo, fPrevParam, GetDyn_GL_KTLFValue(), GetDynKTLFValue(), MSR_PARAM_FUN_OFFSET, and TWO_PI.
Referenced by Func().
|
privatevirtual |
Fast dynamic Gaussian-Lorentzian KT (LF). Approximate fast calculation.
Local Gaussian, global Lorentzian approximation in the limit
![\[ \nu_c \gg \gamma_\mu \Delta_{\rm L} \]](form_154.png)
in LF. For details see "Muon Spin Rotation, Relaxation, and Resonance", A. Yaouanc and P. Dalmas Sec. 6.4, Eq.(6.93).
| t | time in ![]() |
| paramValues | parameter values |
| funcValues | vector with the functions (i.e. functions of the parameters) |
Definition at line 1907 of file PTheory.cpp.
References fParamNo, and MSR_PARAM_FUN_OFFSET.
Referenced by Func().
|
privatevirtual |
Fast dynamic Gaussian-Lorentzian KT (ZF). Approximate fast calculation.
Local Gaussian, global Lorentzian approximation in the limit
![\[ \nu_c \gg \gamma_\mu \Delta_{\rm L} \]](form_154.png)
in ZF. For details see "Muon Spin Rotation, Relaxation, and Resonance", A. Yaouanc and P. Dalmas Sec. 6.4, Eq.(6.89).
| t | time in ![]() |
| paramValues | parameter values |
| funcValues | vector with the functions (i.e. functions of the parameters) |
Definition at line 1867 of file PTheory.cpp.
References fParamNo, and MSR_PARAM_FUN_OFFSET.
Referenced by Func().
|
privatevirtual |
Dynamic Gaussian Kubo-Toyabe (LF). Strong collision model.
theory function: dynamic Gaussian Kubo-Toyabe in longitudinal applied field
![\[ = \frac{1}{2\pi \imath}\int_{\gamma-\imath\infty}^{\gamma+\imath\infty}
\frac{f_{\mathrm{G}}(s+\Gamma)}{1-\Gamma f_{\mathrm{G}}(s+\Gamma)} \exp(s t) \mathrm{d}s,
\mathrm{~where~}\,f_{\mathrm{G}}(s)\equiv \int_0^{\infty}G_{\mathrm{G,LF}}(t)\exp(-s t) \mathrm{d}t\]](form_145.png)
or the time shifted version of it. 
The current implementation is not realized via the above formulas, but ...
meaning of paramValues: 



return: function value
| t | time in ![]() |
| paramValues | parameter values |
| funcValues | vector with the functions (i.e. functions of the parameters) |
Definition at line 1521 of file PTheory.cpp.
References CalculateDynKTLF(), fParamNo, fPrevParam, GetDynKTLFValue(), MSR_PARAM_FUN_OFFSET, and TWO_PI.
Referenced by Func().
|
privatevirtual |
Dynamic Lorentzian Kubo-Toyabe (LF). Strong collision model.
theory function: dynamic Lorentzain Kubo-Toyabe in longitudinal applied field (see R. S. Hayano et al., Phys. Rev. B 20 (1979) 850; P. Dalmas de Reotier and A. Yaouanc, J. Phys.: Condens. Matter 4 (1992) 4533; A. Keren, Phys. Rev. B 50 (1994) 10039).
![\[ = \frac{1}{2\pi \imath}\int_{\gamma-\imath\infty}^{\gamma+\imath\infty}
\frac{f_{\mathrm{L}}(s+\Gamma)}{1-\Gamma f_{\mathrm{L}}(s+\Gamma)} \exp(s t) \mathrm{d}s,
\mathrm{~where~}\,f_{\mathrm{L}}(s)\equiv \int_0^{\infty}G_{\mathrm{L,LF}}(t)\exp(-s t) \mathrm{d}t\]](form_152.png)
or the time shifted version of it. 
The current implementation is not realized via the above formulas, but ...
meaning of paramValues: 



return: function value
| t | time in ![]() |
| paramValues | parameter values |
| funcValues | vector with the functions (i.e. functions of the parameters) |
Definition at line 1759 of file PTheory.cpp.
References CalculateDynKTLF(), fParamNo, fPrevParam, GetDynKTLFValue(), and MSR_PARAM_FUN_OFFSET.
Referenced by Func().
|
privatevirtual |
Dynamic Nakajima-Keren (TF). With spin fluctuations and precession.
theory function: dynamicNKTF (see D.R. Noakes and G.M. Kalvius Phys. Rev. B 56, 2352 (1997) and A. Yaouanc and P. Dalmas de Reotiers, "Muon Spin Rotation, Relaxation, and Resonance" Oxford, Section 6.4.1.3) However, I have rewritten it using the identity 




![\begin{eqnarray*}\Theta(t) &=& \frac{\exp(-\nu_c t) - 1 - \nu_c t}{\nu_c^2} \\
P_{X}^{\rm dyn}(t) &=& \sqrt{\frac{1}{1+2 R_b^2 \Delta_0^2 \Theta(t)}}\,\exp\left[-\frac{\Delta_0^2 \Theta(t)}{1+2 R_b^2 \Delta_0^2 \Theta(t)}\right]\,\cos(\gamma B_{\rm ext} t + \varphi)
\end{eqnarray*}](form_187.png)
meaning of paramValues: 





return: function value
| t | time in ![]() |
| paramValues | parameter values |
| funcValues | vector with the functions (i.e. functions of the parameters) |
Definition at line 2856 of file PTheory.cpp.
References DEG_TO_RAD, fParamNo, MSR_PARAM_FUN_OFFSET, and TWO_PI.
Referenced by Func().
|
privatevirtual |
Dynamic Nakajima-Keren (ZF). With spin fluctuations.
theory function: dynamicNKZF (see D.R. Noakes and G.M. Kalvius Phys. Rev. B 56, 2352 (1997) and A. Yaouanc and P. Dalmas de Reotiers, "Muon Spin Rotation, Relaxation, and Resonance" Oxford, Section 6.4.1.3) However, I have rewritten it using the identity 




![\begin{eqnarray*}\Theta(t) &=& \frac{\exp(-\nu_c t) - 1 - \nu_c t}{\nu_c^2} \\
P_{Z}^{\rm dyn}(t) &=& \sqrt{\frac{1}{1+4 R_b^2 \Delta_0^2 \Theta(t)}}\,\exp\left[-\frac{2 \Delta_0^2 \Theta(t)}{1+4 R_b^2 \Delta_0^2 \Theta(t)}\right]
\end{eqnarray*}](form_185.png)
meaning of paramValues: 



return: function value
| t | time in ![]() |
| paramValues | parameter values |
| funcValues | vector with the functions (i.e. functions of the parameters) |
Definition at line 2795 of file PTheory.cpp.
References fParamNo, and MSR_PARAM_FUN_OFFSET.
Referenced by Func().
|
privatevirtual |
F-μ-F oscillation. Muon bound between two fluorine atoms.
Referenced by Func().
|
virtual |
Evaluates the theory function at a given time point.
Evaluates the theory expression tree at a given time point.
Recursively evaluates the expression tree at time t using the provided parameter values. The evaluation follows the tree structure:
| t | Time in microseconds (μs) for μSR fits, or x-value for non-μSR |
| paramValues | Vector of current fit parameter values (FITPARAMETER block) |
| funcValues | Vector of evaluated function values (FUNCTIONS block) |
Recursively evaluates the binary tree, combining function values according to the tree structure (multiplication for consecutive lines, addition for '+' separated sections).
Evaluation Algorithm: Based on tree structure, one of four cases applies:
Parameter Resolution: Within each function, parameters are accessed via fParamNo indices:
LF Caching: Longitudinal field functions (StaticGaussKTLF, DynamicLorentzKTLF, etc.) use cached integral values that are recalculated only when parameters change. This is handled transparently within each LF function.
| t | Time in microseconds for μSR fits, or x-axis value for non-μSR data |
| paramValues | Vector of current fit parameter values from FITPARAMETER block |
| funcValues | Vector of evaluated function values from FUNCTIONS block |
Definition at line 468 of file PTheory.cpp.
References Abragam(), Asymmetry(), Bessel(), CombiLGKT(), Constant(), DynamicGauLorKTLF(), DynamicGauLorKTLFFast(), DynamicGauLorKTZFFast(), DynamicGaussKTLF(), DynamicLorentzKTLF(), DynamicNKTF(), DynamicNKZF(), fAdd, FmuF(), fMul, fType, GeneralExp(), InternalBessel(), InternalField(), InternalFieldGK(), InternalFieldLL(), MuMinusExpTF(), Polynom(), RandomAnisotropicHyperfine(), SimpleExp(), SimpleGauss(), SkewedGauss(), SpinGlass(), StaticGaussKT(), StaticGaussKTLF(), StaticLorentzKT(), StaticLorentzKTLF(), StaticNKTF(), StaticNKZF(), StrKT(), TFCos(), THEORY_ABRAGAM, THEORY_ASYMMETRY, THEORY_BESSEL, THEORY_COMBI_LGKT, THEORY_CONST, THEORY_DYNAMIC_GAULOR_FAST_KT_LF, THEORY_DYNAMIC_GAULOR_FAST_KT_ZF, THEORY_DYNAMIC_GAULOR_KT_LF, THEORY_DYNAMIC_GAUSS_KT_LF, THEORY_DYNAMIC_LORENTZ_KT_LF, THEORY_DYNAMIC_TF_NK, THEORY_DYNAMIC_ZF_NK, THEORY_F_MU_F, THEORY_GENERAL_EXP, THEORY_INTERNAL_BESSEL, THEORY_INTERNAL_FIELD, THEORY_INTERNAL_FIELD_KORNILOV, THEORY_INTERNAL_FIELD_LARKIN, THEORY_MU_MINUS_EXP, THEORY_POLYNOM, THEORY_RANDOM_ANISOTROPIC_HYPERFINE, THEORY_SIMPLE_EXP, THEORY_SIMPLE_GAUSS, THEORY_SKEWED_GAUSS, THEORY_SPIN_GLASS, THEORY_STATIC_GAUSS_KT, THEORY_STATIC_GAUSS_KT_LF, THEORY_STATIC_LORENTZ_KT, THEORY_STATIC_LORENTZ_KT_LF, THEORY_STATIC_TF_NK, THEORY_STATIC_ZF_NK, THEORY_STR_KT, THEORY_TF_COS, THEORY_USER_FCN, and UserFcn().
|
privatevirtual |
General (stretched) exponential. Formula: exp(-(λt)^β)
Generalized (stretched) exponential relaxation function.
Mathematical form:
![\[ P(t) = \exp\left(-[\lambda t]^\beta\right) \]](form_134.png)
or with time shift:
![\[ P(t) = \exp\left(-[\lambda (t-t_{\rm shift})]^\beta\right) \]](form_135.png)
The stretched exponential (Kohlrausch function) represents relaxation in systems with a distribution of correlation times:
Parameters:
| t | Time in μs |
| paramValues | Vector of fit parameter values |
| funcValues | Vector of evaluated function values |
Definition at line 1277 of file PTheory.cpp.
References fParamNo, and MSR_PARAM_FUN_OFFSET.
Referenced by Func().
|
privatevirtual |
Retrieves cached dynamic Gauss-Lorentz KT LF value at time t.
Referenced by DynamicGauLorKTLF().
|
privatevirtual |
Retrieves cached dynamic KT LF value at time t.
Referenced by DynamicGauLorKTLF(), DynamicGaussKTLF(), and DynamicLorentzKTLF().
|
privatevirtual |
Retrieves cached LF integral value at time t using interpolation.
Referenced by StaticGaussKTLF(), and StaticLorentzKTLF().
|
privatevirtual |
Returns the index of user functions up to the given line.
Counts user function occurrences in theory block up to a given line.
| lineNo | Current line number in theory block |
Scans the theory block from line 1 to lineNo (inclusive) and counts how many lines contain "userFcn". This index is used to:
| lineNo | Current line number being parsed (1-based in theory block) |
Definition at line 896 of file PTheory.cpp.
References fMsrInfo.
Referenced by PTheory().
|
privatevirtual |
Internal Bessel field distribution. Combines Bessel with relaxation.
theory function: internal field bessel function
![\[ = \alpha\,j_0\left(2\pi\nu t+\frac{\pi\varphi}{180}\right)\exp\left(-\lambda_{\mathrm{T}}t\right)+(1-\alpha)\,\exp\left(-\lambda_{\mathrm{L}}t\right)\]](form_173.png)
or the time shifted version of it.
meaning of paramValues: 





return: function value
| t | time in ![]() |
| paramValues | parameter values |
| funcValues | vector with the functions (i.e. functions of the parameters) |
Definition at line 2546 of file PTheory.cpp.
References DEG_TO_RAD, fParamNo, MSR_PARAM_FUN_OFFSET, and TWO_PI.
Referenced by Func().
|
privatevirtual |
Internal field distribution. Gaussian field distribution model.
theory function: internal field function
![\[ = \alpha\,\cos\left(2\pi\nu t+\frac{\pi\varphi}{180}\right)\exp\left(-\lambda_{\mathrm{T}}t\right)+(1-\alpha)\,\exp\left(-\lambda_{\mathrm{L}}t\right)\]](form_165.png)
or the time shifted version of it.
meaning of paramValues: 





return: function value
| t | time in ![]() |
| paramValues | parameter values |
| funcValues | vector with the functions (i.e. functions of the parameters) |
Definition at line 2359 of file PTheory.cpp.
References DEG_TO_RAD, fParamNo, MSR_PARAM_FUN_OFFSET, and TWO_PI.
Referenced by Func().
|
privatevirtual |
Internal field (Kornilov model). Vortex lattice field distribution.
theory function: internal field function Gauss-Kornilov (see Physics Letters A 153, 364 (1991)).
![\[ = \alpha\,\left[\cos(2\pi\nu t)-\frac{\sigma^2 t}{2\pi\nu}\sin(2\pi\nu t)\right]\exp(-[\sigma t]^2/2)+(1-\alpha)\,\exp(-(\lambda t)^\beta)\]](form_169.png)
or the time shifted version of it. For the powder averaged case, 
meaning of paramValues: 





return: function value
| t | time in ![]() |
| paramValues | parameter values |
| funcValues | vector with the functions (i.e. functions of the parameters) |
Definition at line 2401 of file PTheory.cpp.
References fParamNo, MSR_PARAM_FUN_OFFSET, and TWO_PI.
Referenced by Func().
|
privatevirtual |
Internal field (Larkin-Ovchinnikov model). Vortex lattice field distribution.
theory function: internal field function Lorentz-Larkin (see Physica B: Condensed Matter 289-290, 153 (2000)).
![\[ = \alpha\,\left[\cos(2\pi\nu t)-\frac{a}{2\pi\nu}\sin(2\pi\nu t)\right]\exp(-a t)+(1-\alpha)\,\exp(-(\lambda t)^\beta)\]](form_171.png)
or the time shifted version of it. For the powder averaged case, 
meaning of paramValues: 





return: function value
| t | time in ![]() |
| paramValues | parameter values |
| funcValues | vector with the functions (i.e. functions of the parameters) |
Definition at line 2453 of file PTheory.cpp.
References fParamNo, MSR_PARAM_FUN_OFFSET, and TWO_PI.
Referenced by Func().
|
virtual |
Checks if the entire theory expression tree is valid.
Recursively checks if the entire theory expression tree is valid.
Recursively validates all nodes in the tree. A theory is valid only if this node and all its children (fAdd and fMul) are valid.
Traverses the binary tree and checks fValid for this node and all descendant nodes. A theory tree is valid only if ALL nodes are valid.
Validation logic:
Definition at line 415 of file PTheory.cpp.
|
privatevirtual |
Formats a polynomial theory line with proper spacing.
Polynomial functions have variable parameter count, so they require special formatting. Creates output in format:
* polynom tshift p0 p1 p2 ... pn (tshift p0 p1 ... pn) *
| i | Line index (1-based) in the theory block |
| fullTheoryBlock | Pointer to theory block lines (modified in place) |
Definition at line 1040 of file PTheory.cpp.
References PMsrLineStructure::fLine.
Referenced by MakeCleanAndTidyTheoryBlock().
|
privatevirtual |
Reformats the theory block for clean MSR file output.
Reformats the theory block with consistent spacing and comments.
Processes each line in the theory block to produce clean, well-formatted output suitable for writing back to MSR files. Formatting includes:
Example transformation:
* Input: "tf 2 3" * Output: "TFieldCos 2 3 (phase frequency)" *
Special handling for:
| fullTheoryBlock | Pointer to theory block lines (modified in place) |
Definition at line 943 of file PTheory.cpp.
References fgTheoDataBase, PMsrLineStructure::fLine, MakeCleanAndTidyPolynom(), MakeCleanAndTidyUserFcn(), THEORY_MAX, and THEORY_UNDEFINED.
Referenced by PTheory().
|
privatevirtual |
Formats a user function theory line with proper spacing.
User functions have variable structure (library, class, parameters), so they require special formatting. Creates output in format:
* userFcn libName.so ClassName param1 param2 ... paramN *
| i | Line index (1-based) in the theory block |
| fullTheoryBlock | Pointer to theory block lines (modified in place) |
Definition at line 1103 of file PTheory.cpp.
References PMsrLineStructure::fLine.
Referenced by MakeCleanAndTidyTheoryBlock().
|
privatevirtual |
μ⁻ exponential TF. Negative muon in transverse field.
Referenced by Func().
|
privatevirtual |
Polynomial function. Formula: Σᵢ pᵢtⁱ
Referenced by Func().
|
privatevirtual |
Random anisotropic hyperfine coupling. Powder average of anisotropic coupling.
theory function: random anisotropic hyperfine function (see R. E. Turner and D. R. Harshman, Phys. Rev. B 34 (1986) 4467)
![\[ = \frac{1}{6}\left(1-\frac{\nu t}{2}\right)\exp\left(-\frac{\nu t}{2}\right)+\frac{1}{3}\left(1-\frac{\nu t}{4}\right)\exp\left(-\frac{\nu t + 2.44949\lambda t}{4}\right)\]](form_161.png)
or the time shifted version of it.
meaning of paramValues: 


return: function value
| t | time in ![]() |
| paramValues | parameter values |
| funcValues | vector with the functions (i.e. functions of the parameters) |
Definition at line 2229 of file PTheory.cpp.
References fParamNo, and MSR_PARAM_FUN_OFFSET.
Referenced by Func().
|
privatevirtual |
Searches fgTheoDataBase for a function by name or abbreviation.
Searches fgTheoDataBase for a theory function by name or abbreviation.
| name | Function name (e.g., "simplExpo") or abbreviation (e.g., "se") |
Performs case-insensitive search through the theory database to find a matching function. If found, sets fType and fNoOfParam member variables.
Search matches either:
| name | Function name or abbreviation to search for |
Definition at line 862 of file PTheory.cpp.
References fgTheoDataBase, fNoOfParam, fType, THEORY_MAX, and THEORY_UNDEFINED.
Referenced by PTheory().
|
privatevirtual |
Simple exponential relaxation. Formula: exp(-λt)
Simple exponential relaxation function.
Mathematical form:
![\[ P(t) = \exp\left(-\lambda t\right) \]](form_132.png)
or with time shift:
![\[ P(t) = \exp\left(-\lambda [t-t_{\rm shift}] \right) \]](form_133.png)
Represents exponential muon spin relaxation due to dynamic fluctuations in the fast-fluctuation limit (BPP-type relaxation).
Parameters:
| t | Time in μs |
| paramValues | Vector of fit parameter values |
| funcValues | Vector of evaluated function values |
Definition at line 1225 of file PTheory.cpp.
References fParamNo, and MSR_PARAM_FUN_OFFSET.
Referenced by Func().
|
privatevirtual |
Simple Gaussian relaxation. Formula: exp(-σ²t²/2)
Simple Gaussian relaxation function.
Mathematical form:
![\[ P(t) = \exp\left(-\frac{1}{2} [\sigma t]^2\right) \]](form_136.png)
or with time shift:
![\[ P(t) = \exp\left(-\frac{1}{2} [\sigma (t-t_{\rm shift})]^2\right) \]](form_137.png)
Represents Gaussian muon spin relaxation due to static random fields with a Gaussian distribution. The parameter σ = γ_μ ΔB where ΔB is the RMS field width.
Parameters:
| t | Time in μs |
| paramValues | Vector of fit parameter values |
| funcValues | Vector of evaluated function values |
Definition at line 1334 of file PTheory.cpp.
References fParamNo, and MSR_PARAM_FUN_OFFSET.
Referenced by Func().
|
privatevirtual |
Skewed Gaussian. Asymmetric relaxation rates before/after zero crossing.
theory function: skewed Gaussian function
![\begin{eqnarray*} &=& \frac{\sigma_{-}}{\sigma_{+}+\sigma_{-}}\exp\left[-\frac{\sigma_{-}^2t^2}{2}\right]
\left\lbrace\cos\left(2\pi\nu t+\frac{\pi\varphi}{180}\right)+
\sin\left(2\pi\nu t+\frac{\pi\varphi}{180}\right)\mathrm{Erfi}\left(\frac{\sigma_{-}t}{\sqrt{2}}\right)\right\rbrace+\\
& & \frac{\sigma_{+}}{\sigma_{+}+\sigma_{-}}
\exp\left[-\frac{\sigma_{+}^2t^2}{2}\right]\left\lbrace\cos\left(2\pi\nu t+\frac{\pi\varphi}{180}\right)-
\sin\left(2\pi\nu t+\frac{\pi\varphi}{180}\right)\mathrm{Erfi}\left(\frac{\sigma_{+}t}{\sqrt{2}}\right)\right\rbrace
\end{eqnarray*}](form_174.png)
or the time shifted version of it.
meaning of paramValues: 




return: function value
| t | time in ![]() |
| paramValues | parameter values |
| funcValues | vector with the functions (i.e. functions of the parameters) |
Definition at line 2595 of file PTheory.cpp.
References DEG_TO_RAD, fParamNo, MSR_PARAM_FUN_OFFSET, SQRT_PI, SQRT_TWO, and TWO_PI.
Referenced by Func().
|
privatevirtual |
Spin glass relaxation function. Edwards-Anderson order parameter.
theory function: spin glass function
![\[ = \frac{1}{3}\exp\left(-\sqrt{\frac{4\lambda^2(1-q)t}{\gamma}}\right)+\frac{2}{3}\left(1-\frac{q\lambda^2t^2}{\sqrt{\frac{4\lambda^2(1-q)t}{\gamma}+q\lambda^2t^2}}\right)\exp\left(-\sqrt{\frac{4\lambda^2(1-q)t}{\gamma}+q\lambda^2t^2}\right)\]](form_158.png)
or the time shifted version of it.
meaning of paramValues: 



return: function value
| t | time in ![]() |
| paramValues | parameter values |
| funcValues | vector with the functions (i.e. functions of the parameters) |
Definition at line 2178 of file PTheory.cpp.
References fParamNo, and MSR_PARAM_FUN_OFFSET.
Referenced by Func().
|
privatevirtual |
Static Gaussian Kubo-Toyabe (ZF). Formula: 1/3 + 2/3(1-σ²t²)exp(-σ²t²/2)
Static Gaussian Kubo-Toyabe relaxation function in zero field.
Mathematical form:
![\[ P(t) = \frac{1}{3} + \frac{2}{3} \left[1-(\sigma t)^2\right] \exp\left[-\frac{1}{2} (\sigma t)^2\right] \]](form_138.png)
or with time shift:
![\[ P(t) = \frac{1}{3} + \frac{2}{3} \left[1-(\sigma \{t-t_{\rm shift}\})^2\right] \exp\left[-\frac{1}{2} (\sigma \{t-t_{\rm shift}\})^2\right] \]](form_139.png)
The Kubo-Toyabe function describes muon spin relaxation in a powder sample with random static nuclear magnetic moments creating a Gaussian field distribution at the muon site.
Physical interpretation:
Parameters:
| t | Time in μs |
| paramValues | Vector of fit parameter values |
| funcValues | Vector of evaluated function values |
Definition at line 1390 of file PTheory.cpp.
References fParamNo, and MSR_PARAM_FUN_OFFSET.
Referenced by Func().
|
privatevirtual |
Static Gaussian Kubo-Toyabe (LF). Requires numerical integration.
theory function: static Gaussian Kubo-Toyabe in longitudinal applied field
![\[ = 1-\frac{2\sigma^2}{(2\pi\nu)^2}\left[1-\exp\left(-1/2 \{\sigma t\}^2\right)\cos(2\pi\nu t)\right] +
\frac{2\sigma^4}{(2\pi\nu)^3}\int^t_0 \exp\left(-1/2 \{\sigma \tau\}^2\right)\sin(2\pi\nu\tau)\mathrm{d}\tau \]](form_140.png)
or the time shifted version of it.
meaning of paramValues: 


return: function value
| t | time in ![]() |
| paramValues | parameter values |
| funcValues | vector with the functions (i.e. functions of the parameters) |
Definition at line 1432 of file PTheory.cpp.
References CalculateGaussLFIntegral(), fParamNo, fPrevParam, GetLFIntegralValue(), and MSR_PARAM_FUN_OFFSET.
Referenced by Func().
|
privatevirtual |
Static Lorentzian Kubo-Toyabe (ZF). Formula: 1/3 + 2/3(1-at)exp(-at)
theory function: static Lorentzain Kubo-Toyabe in zero applied field (see Uemura et al. PRB 31, 546 (85)).
![\[ = 1/3 + 2/3 [1 - \lambda t] \exp(-\lambda t) \]](form_148.png)
or the time shifted version of it.
meaning of paramValues: 

return: function value
| t | time in ![]() |
| paramValues | parameter values |
| funcValues | vector with the functions (i.e. functions of the parameters) |
Definition at line 1619 of file PTheory.cpp.
References fParamNo, and MSR_PARAM_FUN_OFFSET.
Referenced by Func().
|
privatevirtual |
Static Lorentzian Kubo-Toyabe (LF). Requires numerical integration.
theory function: static Lorentzain Kubo-Toyabe in longitudinal applied field (see Uemura et al. PRB 31, 546 (85)).
![\[ = 1-\frac{a}{2\pi\nu}j_1(2\pi\nu t)\exp\left(-at\right)-
\left(\frac{a}{2\pi\nu}\right)^2 \left[j_0(2\pi\nu t)\exp\left(-at\right)-1\right]-
a\left[1+\left(\frac{a}{2\pi\nu}\right)^2\right]\int^t_0 \exp\left(-a\tau\right)j_0(2\pi\nu\tau)\mathrm{d}\tau) \]](form_150.png)
or the time shifted version of it.
meaning of paramValues: 


return: function value
| t | time in ![]() |
| paramValues | parameter values |
| funcValues | vector with the functions (i.e. functions of the parameters) |
Definition at line 1662 of file PTheory.cpp.
References CalculateLorentzLFIntegral(), fParamNo, fPrevParam, GetLFIntegralValue(), and MSR_PARAM_FUN_OFFSET.
Referenced by Func().
|
privatevirtual |
Static Nakajima-Keren (TF). Combined nuclear and electronic relaxation with precession.
theory function: staticNKTF (see D.R. Noakes and G.M. Kalvius Phys. Rev. B 56, 2352 (1997) and A. Yaouanc and P. Dalmas de Reotiers, "Muon Spin Rotation, Relaxation, and Resonance" Oxford, Section 6.4.1.3) However, I have rewritten it using the identity 




![\[ = \frac{1}{\sqrt{1+(R_b \gamma\Delta_0 t)^2}}\,
\exp\left[-\frac{(\gamma\Delta_0 t)^2}{2(1+(R_b \gamma\Delta_0 t)^2)}\right]\,
\cos(\gamma B_{\rm ext} t + \varphi) \]](form_183.png)
meaning of paramValues: 




return: function value
| t | time in ![]() |
| paramValues | parameter values |
| funcValues | vector with the functions (i.e. functions of the parameters) |
Definition at line 2739 of file PTheory.cpp.
References DEG_TO_RAD, fParamNo, MSR_PARAM_FUN_OFFSET, and TWO_PI.
Referenced by Func().
|
privatevirtual |
Static Nakajima-Keren (ZF). Combined nuclear and electronic relaxation.
theory function: staticNKZF (see D.R. Noakes and G.M. Kalvius Phys. Rev. B 56, 2352 (1997) and A. Yaouanc and P. Dalmas de Reotiers, "Muon Spin Rotation, Relaxation, and Resonance" Oxford, Section 6.4.1.3) However, I have rewritten it using the identity 




![\[ = \frac{1}{3} + \frac{2}{3}\,\frac{1}{\left(1+(R_b \Delta_0 t)^2\right)^{3/2}}\,
\left(1 - \frac{(\Delta_0 t)^2}{\left(1+(R_b \Delta_0 t)^2\right)}\right)\,
\exp\left[\frac{(\Delta_0 t)^2}{2\left(1+(R_b \Delta_0 t)^2\right)}\right] \]](form_181.png)
meaning of paramValues: 


return: function value
| t | time in ![]() |
| paramValues | parameter values |
| funcValues | vector with the functions (i.e. functions of the parameters) |
Definition at line 2684 of file PTheory.cpp.
References fParamNo, and MSR_PARAM_FUN_OFFSET.
Referenced by Func().
|
privatevirtual |
Stretched Kubo-Toyabe. Formula: exp(-(σt)^β) with KT-like recovery.
theory function: stretched Kubo-Toyabe in zero field. Ref: Crook M. R. and Cywinski R., J. Phys. Condens. Matter, 9 (1997) 1149.
![\[ = 1/3 + 2/3 \left(1-(\sigma t)^\beta \right) \exp\left(-(\sigma t)^\beta / \beta\right)\]](form_156.png)
or the time shifted version of it.
meaning of paramValues: 


return: function value
| t | time in ![]() |
| paramValues | parameter values |
| funcValues | vector with the functions (i.e. functions of the parameters) |
Definition at line 2129 of file PTheory.cpp.
References fParamNo, and MSR_PARAM_FUN_OFFSET.
Referenced by Func().
|
privatevirtual |
Transverse field cosine. Formula: cos(φ + 2πνt)
theory function: cosine including phase
![\[ = \cos(2\pi\nu t + \varphi) \]](form_163.png)
or the time shifted version of it.
meaning of paramValues: 


return: function value
| t | time in ![]() |
| paramValues | parameter values |
| funcValues | vector with the functions (i.e. functions of the parameters) |
Definition at line 2318 of file PTheory.cpp.
References DEG_TO_RAD, fParamNo, MSR_PARAM_FUN_OFFSET, and TWO_PI.
Referenced by Func().
|
privatevirtual |
User-defined function. Calls external shared library function.
Referenced by Func().
|
private |
|
mutableprivate |
Cached dynamic Gauss-Lorentz LF KT values.
Definition at line 655 of file PTheory.h.
Referenced by DynamicGauLorKTLF().
|
mutableprivate |
|
mutableprivate |
Cached dynamic Gaussian/Lorentzian LF KT values.
Definition at line 654 of file PTheory.h.
Referenced by ~PTheory().
|
mutableprivate |
Cached static LF KT integral values.
Definition at line 652 of file PTheory.h.
Referenced by ~PTheory().
|
private |
Pointer to MSR file handler (not owned)
Definition at line 647 of file PTheory.h.
Referenced by GetUserFcnIdx(), and PTheory().
|
private |
|
private |
Expected number of parameters for this function type.
Definition at line 636 of file PTheory.h.
Referenced by PTheory(), and SearchDataBase().
|
private |
Resolved parameter indices (0-based). Values >= MSR_PARAM_FUN_OFFSET are function references.
Definition at line 635 of file PTheory.h.
Referenced by Abragam(), Asymmetry(), Bessel(), CombiLGKT(), Constant(), DynamicGauLorKTLF(), DynamicGauLorKTLFFast(), DynamicGauLorKTZFFast(), DynamicGaussKTLF(), DynamicLorentzKTLF(), DynamicNKTF(), DynamicNKZF(), GeneralExp(), InternalBessel(), InternalField(), InternalFieldGK(), InternalFieldLL(), PTheory(), RandomAnisotropicHyperfine(), SimpleExp(), SimpleGauss(), SkewedGauss(), SpinGlass(), StaticGaussKT(), StaticGaussKTLF(), StaticLorentzKT(), StaticLorentzKTLF(), StaticNKTF(), StaticNKZF(), StrKT(), TFCos(), and ~PTheory().
|
mutableprivate |
Previous parameter values for cache invalidation check.
Definition at line 651 of file PTheory.h.
Referenced by DynamicGauLorKTLF(), DynamicGaussKTLF(), DynamicLorentzKTLF(), PTheory(), StaticGaussKTLF(), and StaticLorentzKTLF().
|
mutableprivate |
|
private |
Theory function type (THEORY_CONST, THEORY_SIMPLE_EXP, etc.)
Definition at line 634 of file PTheory.h.
Referenced by Func(), PTheory(), and SearchDataBase().
|
private |
Pointer to instantiated user function object.
Definition at line 644 of file PTheory.h.
Referenced by PTheory(), and ~PTheory().
|
private |
|
private |
|
private |
|
mutableprivate |
Resolved parameter values for user function calls.
Definition at line 645 of file PTheory.h.
Referenced by PTheory(), and ~PTheory().
|
private |