:py:mod:`fitlistreader.fitlist` =============================== .. py:module:: fitlistreader.fitlist Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: fitlistreader.fitlist.Fitlist .. py:class:: Fitlist(path: str) Bases: :py:obj:`collections.abc.Sequence` Representation of a Fitlist as a Sequence of Peaks, grouped in Fits. Encompasses all neccessary information which is saved in a fitlist, most importantly the peak information. Those can be accessed as a flattened array via their consecutive indices. As a Sequence, Fitlists can be accessed backwards via negative-Indexing, just like standard python Lists. Calibrations and integrals are saved in separate structures and accessed through object methods. .. method:: - get_integral_by_peakID .. method:: - get_integral_list_by_type .. method:: - get_all_integrals .. method:: - closest .. py:method:: __len__() .. py:method:: __getitem__(i) .. py:method:: get_integral_by_peakID(peakID: int) -> fitlistreader.fitintegralcoll.FitIntegralCollection returns the FitIntegralCollection for a given peakID. Each Fit contains a collection of integrals, regardless whether it was created because of a peakfit of an integration. With a peakfit it is needed for the background determination. :param peakID: ID of the peak (NOT the index in this Fitlist object, but the Peak.ID property) :type peakID: int .. py:method:: get_integral_list_by_type(int_type: str, include_ids: bool = False) -> list Returns all FitIntegrals of a given type as a list. :param int_type: Selects which type of integrals to return. Possible Types: sub, bg, tot :type int_type: str :param include_ids: If True, populates list with tuples of (FitIntegral, integralID:int) :type include_ids: bool .. py:method:: get_all_integrals() -> list Returns all FitIntegralCollection objects in a List, ordered by integralID. .. py:method:: closest(pos) Returns the peak with the best matching position to the argument pos .. py:method:: debug()