fsacconeUBA/PyMossFit: PyMossFit 1.1
Abstract
Jupyter Notebook for fitting of Mössbauer spectra
Full text
Fabio Daniel Saccone PyMossFit User´s Manual PyMossFit: Jupyter Notebook for Colab that helps to fit 57Fe M¨ossbauer spectra 1 Downloading and First Use Download: The download link is https://zenodo.org/records/17266092. Additional information can be accesed from PyMossFit The data file and the Jupyter notebook should be in the same folder in the Google Drive user account. An additional file (reference data.csv) is needed for a guess of the phase candidates that best match the hyperfine parameters found but can be saved in other separate folder. For each experimental spectra, we suggest to save the data file together with a copy of the Jupyter notebook to proceed. First Use: The notebook is organized in four cells. The first one connects to the Colab and Drive servers and installs the required libraries from scientific Python packages (Numpy, Scipy, Lmfit, Pandas). The second cell loads the data file, manages the folding channel, and calibrates the x axis with channel/(mm/s). The selected velocity range should be introduced by the user when it is required after runs the cell. Verify the format of the data file. Select the command skiprows, according to the number of header lines. If the data file is two column format, delete the comment on option y=y[:,1]. The DFT section helps to select the folding channel. The commands idmax or idmin make this selection. After folding, explore the plot to see if it was folded correctly. Switch between both previously mentioned options to get the properly folded plot. Finally, this cell saves a new csv data file with the first column in mm/s and the second with normalized relative transmission. 2 Fit Procedure: The third cell proceeds to fit the data file obtained in the previous step. After loading it, the script asks the user about how many and kind of each hyperfine interaction he/she would like to add to the fitting model. The next set of questions corresponds to the hyperfine parameter values for each sub-spectrum. The user can modify the limiting range for each parameter in the corresponding sub-sections 4, 5 and 6 of the section named 1
Fabio Daniel Saccone PyMossFit User´s Manual ”Lmfit for model definition and fitting”. When convergence is reached, on the screen, the fit report and a graph with fitting model and its error can be seen. Finally, a parameter values report and a model are saved as csv data files, while the graph is saved as png file. 3 Cell to guess iron phases: This cell reads the fit report file and compares the results with the reference data by a K-NN model and suggests a set of options that minimize the euclidean distances. By default, the suggested phases are three, but the user can modify this by changing the n neighbours variable of the model. References [1] F. D. Saccone, PyMossFit: A Google Colab Option for M¨ossbauer Spectra Fitting, Preprints.org, https://doi.org/10.20944/preprints202506.2153.v3 2