Repository navigation
Releases
LangevinSANS v0.1.0 — Analytical Langevin magnetization and magnetic SANS
LangevinSANS v0.1.0
First public release of LangevinSANS, a tested analytical Python
implementation of the equilibrium Langevin model for dilute ensembles of
identical, noninteracting spherical magnetic particles.
The software connects the field-dependent equilibrium orientational
distribution directly to magnetization moments and magnetic small-angle
neutron scattering observables.
Highlights
- Numerically stable implementation of the Langevin function
- Exact normalized equilibrium orientational distribution
- Analytical reduced and dimensional magnetization curves
- Complete second-moment tensor
(\Gamma_{kl}=\langle m_km_l\rangle) - Magnetic SANS in perpendicular and parallel scattering geometries
- Unpolarized and polarization-averaged spin-flip cross sections
- Two-dimensional detector maps
- Azimuthally averaged (I(q)), (p(r)), and (c(r)=p(r)/r^2)
- Field-dependent azimuthally averaged SANS intensity
- Browser-native Shiny/Shinylive application
- Reproducible Pixi environment
- Scientific tests, static type checking, and code-quality checks
Online application
The application runs entirely in the browser:
https://adamsmp92.github.io/LangevinSANS/
Model scope
This release describes identical, noninteracting, fixed-magnitude magnetic
moments in thermal equilibrium in a prescribed uniform external field.
The analytical Langevin model is reversible and does not include:
- magnetic anisotropy,
- interparticle interactions,
- coercivity,
- remanence,
- hysteresis,
- internal spin textures,
- or stochastic nonequilibrium dynamics.
These restrictions are explicit so that LangevinSANS can serve as a
well-defined analytical reference model for comparison with more general
approaches such as Stoner–Wohlfarth or micromagnetic simulations.
Requirements
- Python 3.12 or newer
- NumPy 2.1 or newer
- Optional browser interface based on Shiny and Shinylive
- Reproducible environments for macOS ARM64 and Linux 64-bit through Pixi
Citation
If you use LangevinSANS in research, please cite the exact released version.
Citation metadata are included in CITATION.cff. A version DOI can be added
after archival with Zenodo.
License
MIT License