I am trying to fit a Gaussian peak in a spectrum in the energy range 339-351 keV (figure: no peak). I would like the Gaussian to be fitted to the background (red line). However, the resulting fit does not fit correctly (figure: with peak). Would someone be able to advise me what I am doing wrong and how I can fit the Gaussian peak correctly?
Thank you in advance,