interferences.util.sorting

interferences.util.sorting.get_first_atom(molecule)[source]

Get the first atom in a molecular formula.

Parameters

molecule (Element | Formula) – Molecule to check.

Returns

Element or isotope.

Return type

Element

interferences.util.sorting.get_relative_electronegativity(element, reverse=True)[source]

Get an index of the relative electronegativity of an element, for use in sorting elements (e.g. for chemical formulae). If a list of elements is supplied, a list will be returned.

Parameters

element (str | periodictable.core.Element | list)

Return type

int | list

Note

Electronegativity check uses numbers as these are provided by both Element and Isotope objects.

interferences.util.mz

interferences.util.mz.process_window(window)[source]

Process the two allowable verions of a mass window (element/isotope and width, or a low- and high-mass).

Parameters

window (tuple) – Window parameters to process.

Return type

tuple

interferences.util.ptable

interferences.util.ptable.get_periodic_frame()[source]

Construct a simple periodic table dataframe organised by group and row. Note that the lanthanides and actinides are each found in a single cell.

Return type

pandas.DataFrame

interferences.util.meta

interferences.util.meta.interferences_datafolder(subfolder=None)[source]

Returns the path of the interferences data folder.

Parameters

subfolder (str) – Subfolder within the interferences data folder.

Return type

pathlib.Path

interferences.util.log

interferences.util.log.Handle(logger, handler=<NullHandler (NOTSET)>, formatter='%(asctime)s %(name)s - %(levelname)s: %(message)s', level=None)[source]

Handle a logger with a standardised formatting.

Parameters
Returns

Configured logger.

Return type

logging.Logger