Introducing SpectraFit: An Open-Source Tool for Interactive Spectral Analysis.

12 October 2023, Version 1
This content is a preprint and has not undergone peer review at the time of posting.


In chemistry, analyzing spectra through peak fitting is a crucial task that helps scientists extract useful quantitative information about a sample's chemical composition or electronic structure. To make this process more efficient, we have developed a new open-source software tool called SpectraFit. This tool allows users to perform quick data fitting using regular expressions of distribution and linear functions through the command line interface (CLI) or Jupyter Notebook, which can run on Linux, Windows, and MacOS, as well as in a Docker container. As part of our commitment to good scientific practice, we have introduced an output file-locking system to ensure the accuracy and consistency of information. This system collects input data, results data, and the initial fitting model in a single file, promoting transparency, reproducibility, collaboration, and innovation. To demonstrate SpectraFit's user-friendly interface and the advantages of its output file-locking system, we are focusing on a series of previously published iron-sulfur dimers and their XAS spectra. We will show how to analyze the XAS spectra via CLI and in a Jupyter Notebook by applying a global fitting routine. Additionally, we will demonstrate how SpectraFit can be used as a black box and white box solution, allowing users to apply their own algorithms to engineer the data further. The publication, along with its supplementary information, serves as a playbook to guide users through each step of the process. SpectraFit will streamline the peak fitting process and prove to be an invaluable resource for chemists and other professionals working in related fields.


X-ray Spectroscopy
Open Source

Supplementary materials

Supporting Information (SI) for Reproducing the Fit and Results
The Supporting Information (SI) is intended to be used as a textbook to teach the reader/user to reproduce the published results. The SI includes a README, a text file of processed XAS spectra for the referenced material, environmental settings, and high-resolution images. Additionally, input and output files for the CLI and Jupyter Notebook are provided to replicate the results that were published.

Supplementary weblinks


Comments are not moderated before they are posted, but they can be removed by the site moderators if they are found to be in contravention of our Commenting Policy [opens in a new tab] - please read this policy before you post. Comments should be used for scholarly discussion of the content in question. You can find more information about how to use the commenting feature here [opens in a new tab] .
This site is protected by reCAPTCHA and the Google Privacy Policy [opens in a new tab] and Terms of Service [opens in a new tab] apply.