Skip to content

Latest commit

 

History

History
55 lines (39 loc) · 3.82 KB

FEATURES.md

File metadata and controls

55 lines (39 loc) · 3.82 KB

Features of SpecFitter

Display data

  • Import data from one or multiple files and plot multiple spectra simultaneously:
    • Sum spectra together.
    • Overlay spectra, with either common or independent scaling on the y-axis.
    • Show spectra in a "stacked" view (tiled vertically with a common x-axis).
  • Zoom and pan using the mouse (mouse wheel, click and drag).
  • Display in linear or logarithmic scale on the y-axis.
  • Calibrate spectra (with constant, linear, quadratic terms) to express bins in desired units.
  • Rescale and/or sum spectra, to perform operations such as background subtraction.

Fit data

This code uses an iterative least-squares fitter based on the gf3 code from RadWare, with similar features to that code:

  • Fit multiple symmetric or skewed Gaussian peak shapes on quadratic/linear/constant background.
    • Also can fit background only and obtain an estimate for the area above the background, or sum the number of counts in the fit region.
  • Relative peak widths may be fixed (recommended for gamma-ray spectroscopy) or allowed to freely vary.
  • A step function can be used to compensate for background being different on either side of the peak (useful for handling Compton scattering in gamma-ray spectroscopy).
  • Weight the fit by the data (taking background subtraction into account) or by the fit function. Or don't weight the fit at all.
  • Re-fit using the same fit bounds and peak position(s), for instance to compare results between similar spectra.

Manage data

  • Rename, or delete spectra from the opened session.
  • Store custom views of multiple spectra using any of the available plotting modes.
  • Double click anywhere on a plot to write/edit a comment there.
  • The full session including comments and custom views can be saved to disk using the .jf3 (compressed binary) or .txt (ACSII) file formats.
  • Export image files (.png format) at arbitrary resolution for use in presentations and publications.

Supported file formats

Read-only support

  • .C (ROOT macro) - ROOT histogram macro files (.C files generated using the File/Save option in a ROOT TBrowser). Supports TH1D, TH1F, and TH1I histogram types.
  • .spe (Maestro) - Text format spectra exported in the ASCII SPE format from Ortec Maestro.
  • .chn (Maestro) - Spectra exported in the Integer CHN format from Ortec Maestro.
  • .mca - A 2D array of integers, with the first index denoting a spectrum number (array length up to 100) and the second index denoting a bin number (array length fixed to 32768 ie. 215).

Read/write support

  • .jf3 - Binary format containing one or more losslessly-compressed spectra with comments and customized views.
  • .txt - A plaintext file of tab-separated values, can be copy-pasted to/from Excel or similar spreadsheet software. Each row repesents a bin/channel and each column represents a spectrum (single column needed for 1 spectrum, 2 columns for 2, etc.).
  • .spe (RadWare) - Spectrum format used/generated by the RadWare software package, for example when using the 'ws' command in gf3.
  • .fmca - The same format as .mca except using floats rather than integers.
  • .dmca - The same format as .mca except using doubles rather than integers.

Format support notes

Some sample files that the program can open are available here (.zip archive).

Conversion codes for some of the above data formats are available in the FileConvTools repository.