KherveFitting is an open-source software implemented in Python, using wxPython for the graphical user interface,
MatplotLib for data visualization, NumPy and lmfit for numerical computations and curve fitting algorithms, Panda
and openpyxl for manipulating Excel file.
When using KherveFitting in academic or research contexts, appropriate citation is requested to acknowledge the
software's contribution to your work.
To download Windows or Mac installer please go to https://sourceforge.net/projects/khervefitting/
For python source, make sure to use: pip install -r requirements.txt
KherveFitting can open Excel files (.xlsx) and import/convert VAMAS files (.vms) into Excel format. For best results:
When reopening a saved fitting, KherveFitting also looks for the corresponding .json file containing peak properties.
KherveFitting offers three saving options:
Four background types available: Linear, Shirley, Smart, Multi-Regions Smart. Drag the red lines on the plot to set the
background range.
Use high BE and low BE controls to apply offsets at range boundaries.
Fit single peaks or doublets. Doublet splitting values are stored in 'DS.txt'. Intensity ratios for doublets: 0.5 for
p-shell, 0.67 for d-shell, 0.75 for f-shell.
Available fitting models:
Each peak uses two rows: values in the first row, constraints in the second.
Constraint shortcuts:
- 'a', 'b', 'c' → 'A * 1', 'B * 1', 'C * 1' (follow peak A, B, or C)
- 'fi' → 'Fixed' (fix the value)
- '#0.5' → Constrain to ±0.5 eV of the peak position
The BE correction button looks for a peak labeled 'C1s C-C' and calculates the difference from 284.8 eV. This
correction is applied to all core levels. Fit all data before applying the BE correction.
Use the Preferences window to customize plot appearance, including:
- Colors for raw data, background, fitted peaks, and residuals
- Line styles (solid, dashed, dotted)
- Marker types for data points
- Font sizes and styles
- Axis labels and titles
Use toggle buttons to show or hide various plot elements:
- Raw data points
- Background line
- Individual fitted peaks
- Overall envelope
- Residuals
- Legend
Several tools are available for zooming and navigating the plot:
- Use the zoom in/out buttons or keyboard shortcuts
- Click and drag to create a zoom box
- Use the pan tool to move around when zoomed in
Export fitted peak parameters, areas, and atomic percentages to a summary table for further analysis. The export function provides:
- Peak positions, heights, and widths
- Integrated areas for each peak
- Relative sensitivity factors (RSF) used
- Calculated atomic percentages
- Options to export as Excel, PNG, PDF, SVG
Use the Noise Analysis tool to assess data quality and determine the signal-to-noise ratio of your spectra. Features include:
- Automatic noise level detection
- Signal-to-noise ratio calculation
- Noise histogram display
- Options for different noise reduction methods
KherveFitting is distributed under the BSD-3 License allowing for broad use, modification, and distribu-
tion.
Gwilherm Kerherve: g.kerherve@imperial.ac.uk
This work was supported by Imperial College London and the Group of Prof. David J. Payne