fitlistreader.fitintegralcoll

Module Contents

Classes

FitIntegralCollection

Acts as a container class holding all integrals of a fit. Also constructs the integral objects and manages them.

class fitlistreader.fitintegralcoll.FitIntegralCollection[source]

Bases: collections.abc.MutableSequence

Acts as a container class holding all integrals of a fit. Also constructs the integral objects and manages them.

an integral

__setitem__(index, value)[source]
__getitem__(index)[source]
__delitem__(index)[source]
__len__()[source]
insert(index, value)[source]

S.insert(index, value) – insert value before index

append(value)[source]

S.append(value) – append value to the end of the sequence

reverse()[source]

S.reverse() – reverse IN PLACE

extend(iterable)[source]

S.extend(iterable) – extend sequence by appending elements from the iterable

__iadd__(other)[source]
check_valid_element(elem)[source]

checks if elem is of a valid form to add to the integralcollection.

Elements of the FitIntegralCollection are dicts which contain one or three valid FitIntegrals. In the case of only a single entry, the key must be named “tot”. For three entries, the two additional keys are “bg” and “sub”. :param elem: To pass the check, elem must be an object as described above. :type elem: Any

create_new_integral(fit) None[source]

Creates and adds a new FitIntegral object to this collection.

Parameters:

fit (cElementTree: xml-subtree) – The subtree must contain the <integral> tag as a first-level element. Can also contain other first-level elements.

to_list()[source]

Returns a deepcopied List object representing the FitIntegralCollection.