calamari.fitting.models#
Built-in magnetometry fit functions and the model registry.
Each model is a plain callable f(x, *params) -> ndarray paired with a
ModelDefinition carrying its parameter names, generic starting
values, a provenance-bearing description, and (optionally) a data-driven
guess seed. Models live in the name-keyed MODELS registry and are
looked up by name from calamari.fitting.engine.fit().
Design follows the asymmetry toolkit’s fitting core: a registry of plain
callables plus metadata, so a model function stays independently testable and
re-usable (you can call curie_weiss() directly) while the registry gives
the fit engine a uniform, name-addressable surface. Physics symbol names
(C, J, T_K, M_s) are kept against PEP8 deliberately – the lint
waiver is quarantined to this file in pyproject.toml.
All magnetometry here is CGS-Gaussian (moments in emu, fields in Oe), matching
Quantum Design instruments; the constants used by brillouin() come from
calamari.constants and nowhere else.
Module attributes
Name-keyed registry of every known model. |
|
The fewest points a segment of |
|
Where the |
|
The smallest |
Functions
Two straight lines joined by a parabolic bend of half-width |
|
Brillouin-function magnetisation \(M(H)=M_{\mathrm{s}}B_J(y)\). |
|
Curie-Weiss susceptibility \(\chi(T)=C/(T-\theta)+\chi_0\). |
|
Inverse Curie-Weiss law |
|
Straight line |
|
Insert defn into |
|
Two straight lines joined at a sharp corner (a continuous "broken stick"). |
Classes
Descriptor for a built-in (or user-registered) fit function. |