What software programs are recommended for background extraction and peak fitting? I have an energy spectrum for various gamma sources. What software programs are recommended for background extraction and peak fitting in this case? 
 A: The recommendations posted will depend on who is using the software already. Some commonly recommended commercial software for what you ask include the following:
Origin - widely used but general purpose (must roll your own routines)
Igor Pro - great to generate publication-ready graphics (must roll your own routines)
SigmaPlot - general purpose
PeakFit - dedicated solely to peak fitting (less emphasis on quality of results than e.g. Igor Pro)
Matlab, and specifically the Curve Fitting Toolbox. Gives you a lot of diagnostics on fit quality and such.
Mathematica - general computing system that has a wide array of fitting functions.
Some freeware include the following:
Fityk - focused on a specific set of peak fitting options
MagicPlot - a lightweight app for general non-linear regression fitting
Peak-O-Mat - touts its utility for batch fitting of spectra
Python with SciPy - very general library that includes curve fitting utilities. 
You can find some reviews (and other random recommendations) at these links:
arXiv -- specifically about analysis of gamma spectra
ResearchGate - reviews of general peak fitting in spectrscopy
WindowsReport - reviews of curve fitting software for Windows
A: for that you can use for example "Origin" or you can look if there is a python library, which does that for you, since Origin costs money.
https://plot.ly/python/peak-fitting/
https://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_video/py_bg_subtraction/py_bg_subtraction.html
