Computational Physics and Python Applications Open access

SpectraFit-Core: a Rust-cored nonlinear curve-fitting library validated against the NIST Statistical Reference Datasets

Anselm W. Hahn

ChemRxiv | Oct 21, 2026

Abstract

Abstract

Nonlinear least-squares fitting of parametric line shapes is routine in the analysis of spectra, and the analyst often knows relationships between the parameters before the fit starts, such as a shared width or a fixed intensity ratio. SpectraFit-Core is an open-source curve-fitting library in which this knowledge is part of the model. A model is a graph of named components, and each relationship is an expression edge on that graph, within one spectrum or across several spectra fitted jointly in one call. On a measured Fe L2,3 energy-loss spectrum, four such relationships leave the fitted values unchanged and make the edge-step amplitude 28 times more precise. Because the model is a description rather than code, the same graph can be fitted by other implementations and their parameters compared name by name. The parameters and standard errors of the library are checked against certified values: on 22 of the 27 nonlinear-regression problems of the NIST Statistical Reference Datasets, the least accurately recovered parameter agrees to more than six significant figures, and the standard errors agree nearly as well except on Lanczos1. Kernels, analytic Jacobians, and solver iteration run in compiled Rust behind a typed Python interface, which also makes the library faster than lmfit, SciPy, and JAX on its benchmark. A companion repository regenerates the results from the published release. SpectraFit-Core is released under the MIT license, distributed on PyPI and archived on Zenodo.

Direct answer

What can I do from this paper page?

Use this page to scan "SpectraFit-Core: a Rust-cored nonlinear curve-fitting library validated against the NIST Statistical Reference Datasets" quickly: start with the summary and abstract, then check the authors, source, topics, and related papers. From here, open Scollr to follow Computational Physics and Python Applications research, save the paper, or map adjacent work.

Authors

Researchers on this paper

Anselm W. Hahn

first | Max Planck Institute for Chemical Energy Conversion | ORCID 0000-0003-4543-4833

Research areas

Follow related topics

Citation

BibTeX

@article{Hahn2026SpectraFit,
  title = {SpectraFit-Core: a Rust-cored nonlinear curve-fitting library validated against the NIST Statistical Reference Datasets},
  author = {Anselm W. Hahn},
  journal = {ChemRxiv},
  year = {2026},
  doi = {10.26434/chemrxiv.15010416/v2},
  url = {https://doi.org/10.26434/chemrxiv.15010416/v2}
}

FAQ

Using this paper in a discovery workflow

How do I find related work for this paper?

Use the related papers and topic links on this page as starting points. In Scollr, you can also open the paper and build a literature map around its references, citing papers, and related work.

How can I keep up with new Computational Physics and Python Applications research papers?

Follow Computational Physics and Python Applications research in Scollr. New papers from the topic flow into a personalized feed, and you can save useful studies to revisit later.

Can I cite this paper from this page?

This page includes a static BibTeX block for SpectraFit-Core: a Rust-cored nonlinear curve-fitting library validated against the NIST Statistical Reference Datasets. Always verify the DOI, source, and publication details against the publisher record before submitting a manuscript.

Follow this research in Scollr

Follow the topics and authors behind this paper, save useful studies, and build a literature map when you are ready to go deeper.

Get the app