spectrumfit : fit Mn55 K-alpha lines in given spectrum

tesfdmtools.methods.spectrumfit.spectrumfit(spectrum, bins, debug=False, afitrange=[5.86, 5.92])[source]

fit the Holzer alpha and beta Mn54 lines to the spectrum

Args:
  • spectrum = spectrum to be fitted

  • bins = centers of the spectrum bins

  • debug = if True, plot intermediate fit solution

  • afitrange = range in keV of the fit window for the Mn-55 K-alpha line [default: 5.860,5.920]

Returns:
  • nppp = best fit parameters for Mn-55 K-alpha complex
    • nppp[0] : shift (eV)

    • nppp[1] : compression factor (gain)

    • nppp[2] : normalization

    • nppp[3] : gaussian convolution width (keV)

    • nppp[4] : C-stat

    • nppp[5] : degrees of freedom

    • nppp[6,7,8,9] : 1-sigma errors of nppp[0,1,2,3]

    • nppp[10,11] : conversion parameters: energy = nppp[10]+nppp[11]*bins

  • spectrum = input spectrum within fit window (K-Alpha lines)

  • xxx = fitted energy axis for spectrum

  • holy = holzer curve fit for xxx energy axis

  • lratio = linearity ratio: (alpha-bin/beta-bin)/(E-alpha/E-beta)