:py:mod:`fitlistreader.peak` ============================ .. py:module:: fitlistreader.peak Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: fitlistreader.peak.BackgroundColl fitlistreader.peak.Peak .. py:class:: BackgroundColl Container class to order attributes more nicely. .. py:attribute:: __slots__ :value: ('regions', 'model', 'nparams', 'params', 'vol', 'dvol') .. py:class:: Peak(fit, peak_index, spc, ID, use_val='cal', binwidth=1) Supply a sub-xml tree element and which peak in that fit you want to extract, ennumerated top-down via 0-indexing. use_val is an internal devision between "cal" and "uncal" for all marker-values, which will be different if the spectrum was calibrated by HDTV. Usually you are interested in the "cal" version, which is the default. .. py:method:: build_bg(bg_xml) .. py:method:: _poly(coeff) returns polinomial function with coefficients as python function of signature f(x::float)=>poly(x)::float .. py:method:: _vol_from_poly(coeff, a, b) computes area under polinomial with coefficients coeff between x=a and x=b analytically .. py:method:: _better_vol_poly(coeff, a, b) more efficient implementation of `_vol_from_poly`. Does not require re-building of coefficients. Independant of `_poly` .. py:method:: _general_poly_vol_err_indep(coeff, dcoeff, a, da, b, db) general formula for the uncertainty in the volume determination of a polynomial with coefficients coeff between x=a and x=b. The single uncertainties dcoeff, da and db are assumed to be independant. dcoeff must have the same dimension as coeff. .. py:method:: build_empty() :classmethod: generates a valid Peak object with all filds containing None values or similar .. py:method:: dummy()