-
Notifications
You must be signed in to change notification settings - Fork 0
Distribution fitting
⚙️ Generated page — do not edit here. Source:
BHF_DISTRIBUTION_EN.md. Edit it in the repository and the wiki rebuilds itself.
Continuous distribution engine integrated in the GUI and available via CLI and Python API.
-
mossbauer_distribution.py: Hesse–Rübartsch engine (P(BHF) ≥ 0+ Tikhonov/TV regularization). -
mossbauer_ws5.py: reading/folding of.ws5files and Normos sidecars. -
mossbauer_bhf_pipeline.py: high-level function for the web endpoint. -
fit_bhf_distribution_cli.py: CLI script for testing and generating.dat/.pngfiles.
| Mode | Distributed variable | Typical use |
|---|---|---|
P(BHF) |
Hyperfine field |
Ferrites, oxides with magnetic disorder |
P(ΔEQ) |
Quadrupole splitting | Silicates, glasses, paramagnetic amorphous phases |
P(δ) |
Isomer shift | Distribution of electronic environments |
P(BHF, ΔEQ) 2D |
Field + quadrupole | Nanoparticles with |
P(δ, ΔEQ) 2D |
IS + quadrupole | Wide doublets with simultaneous variation of centre and separation |
P(BHF, δ) 2D |
Field + IS | Magnetic phases with environmental distribution (sensitive to calibration) |
All modes support simultaneous sharp components (sextets, doublets or singlets with free non-negative amplitude fitted jointly with the distribution).
Penalizes the curvature of the distribution:
where alpha selector is available in the GUI; preset buttons (fine / medium / smooth) and L-curve α for automatic estimation by maximum curvature or GCV.
Penalizes the total variation of the distribution:
Favours distributions with sharp transitions (mixture of a few well-defined phases), unlike Tikhonov which smooths. Selectable in the distribution mode options panel.
python3 fit_bhf_distribution_cli.py sample.ws5 \
--bmin 0 --bmax 50 --nbins 50 \
--gamma 0.18 --alpha 0.01 \
--plot --scan-alphaOutputs:
-
*_bhf_spectrum.dat: velocity, data, fit, residual, folded counts. -
*_bhf_distribution.dat: BHF, P, normalized P. -
*_bhf_summary.json: parameters and metrics. -
*_bhf_plot.png: spectrum + residual + P(BHF). -
*_bhf_alpha_scan.dat/.png: L-curve if--scan-alpha --plotis used.
In the GUI, with P(BHF) mode active, you can enable sum active sharp components. Active components 1–3 are added to the distribution as a singlet, doublet or sextet. The fit recalculates P(BHF) and the amplitude of each sharp component simultaneously.
To add a residual metallic-Fe-type phase with a fixed BHF from the CLI:
python3 fit_bhf_distribution_cli.py sample.ws5 \
--bmin 15 --bmax 45 --nbins 50 \
--alpha 0.1 --gamma 0.18 \
--sharp-bhf 33 --sharp-gamma 0.14 \
--plot --scan-alphaWhen the sample is thick (absorption > ~15 %), thickness correction can also be enabled in distribution mode. Distribution mode uses an inverse transform that recovers linearity in the weights:
The regularized solver works on docs/correccion_espesor.tex for the full derivation.
from mossbauer_bhf_pipeline import fit_ws5_bhf_distribution
payload = fit_ws5_bhf_distribution(
"sample.ws5",
bmin=0,
bmax=50,
nbins=50,
alpha=1e-2,
gamma=0.18,
sharp_bhf=[33.0], # optional
)
print(payload["BHF_centers"])
print(payload["probability"])
print(payload["fitted_curve"])-
alphais the critical parameter: use--scan-alphaor the GUI'sL-curve αbutton to choose it. - If
B_min=0, the fit may use low-field values to absorb non-magnetic contributions. For a purely magnetic distribution, try--bmin 15or--bmin 20. -
delta,quadandgammaare global/fixed for the entire distribution in 1D mode. - For 2D distributions: the grid can be large (
$N_x \times N_y$ bins); use independent regularizations$\alpha_x$ ,$\alpha_y$ and verify stability by varying both. Seedocs/distribuciones_2d_mossbauer.tex. - Distributions with IS (
P(δ),P(δ, ΔEQ)): very sensitive to velocity calibration and folding point. Seedocs/distribuciones_is_mossbauer.tex.
© Jorge Sánchez Marcos, Nieves Menéndez González — Departamento de Química Física, UAM · Wiki generado desde docs/ para Fitbauer v5.0.0
Fitbauer v5.0.0
Start
- Home
- Installation
- User flows Data
- Folding
- Calibration (33 T)
- Spectrum comparison Fitting
- Distribution fitting
- Peak detection
- Profile likelihood
- Batch fitting Reference
- Command-line tools
- NORMOS (.JOB)
- Session format
- Sextet model (spec)
- Architecture
Inicio
- Inicio
- Instalación
- Flujos de usuario Datos
- Plegado (folding)
- Calibración (33 T)
- Comparación de espectros Ajuste
- Distribuciones
- Detección de mínimos
- Verosimilitud perfilada
- Ajuste en serie Referencia
- Línea de comandos
- NORMOS (.JOB)
- Formato de sesión
- Modelo de sextete (spec)
- Arquitectura