pyrolite.geochem.norm

Reference compostitions and compositional normalisation.

pyrolite.geochem.norm.all_reference_compositions(path=None)[source]

Get a dictionary of all reference compositions indexed by name.

Parameters

path (str | pathlib.Path)

Return type

dict

pyrolite.geochem.norm.get_reference_composition(name)[source]

Retrieve a particular composition from the reference database.

Parameters

name (str) – Name of the reference composition model.

Return type

pyrolite.geochem.norm.Composition

pyrolite.geochem.norm.get_reference_files(directory=None, formats=['csv'])[source]

Get a list of the reference composition files.

Parameters
  • directory (str, None) – Location of reference data files.

  • formats (list, ["csv"]) – List of potential data formats to draw from. Currently only csv will work.

Return type

list

pyrolite.geochem.norm.update_database(path=None, encoding='cp1252', **kwargs)[source]

Update the reference composition database.

Notes

This will take all csv files from the geochem/refcomp pyrolite data folder and construct a document-based JSON database.

class pyrolite.geochem.norm.Composition(src, name=None, reference=None, reservoir=None, source=None, **kwargs)[source]
set_units(to='wt%')[source]

Set the units of the dataframe.

Parameters

to (str, "wt%")

describe(verbose=True, **kwargs)[source]