fitlistreader.fitlist
Module Contents
Classes
Representation of a Fitlist as a Sequence of Peaks, grouped in Fits. |
- class fitlistreader.fitlist.Fitlist(path: str)[source]
Bases:
collections.abc.SequenceRepresentation 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.
- - get_integral_by_peakID
- - get_integral_list_by_type
- - get_all_integrals
- - closest
- get_integral_by_peakID(peakID: int) fitlistreader.fitintegralcoll.FitIntegralCollection[source]
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.
- Parameters:
peakID (int) – ID of the peak (NOT the index in this Fitlist object, but the Peak.ID property)
- get_integral_list_by_type(int_type: str, include_ids: bool = False) list[source]
Returns all FitIntegrals of a given type as a list.
- Parameters:
int_type (str) – Selects which type of integrals to return. Possible Types: sub, bg, tot
include_ids (bool) – If True, populates list with tuples of (FitIntegral, integralID:int)