Closed morganjwilliams closed 3 years ago
This issue has now been addressed with e9b96ff2a1b9780b047a190222fcd0d337932282 . You can now add normalized ratios by i) specifying the composition/number to normalize to (e.g. "Chondrite_PON"
, a tuple of abundances (2.1, 3.1)
, or a single number), ii) appending "_n"
to the end of the ratio you request (e.g. "Mg/Fe_n"
or "(Mg/Fe)_n"
) or iii) doing both of these things. For example:
df.pyrochem.add_ratio("(Ce/La)_n", norm_to"'Chondrite_PON", alias="Ce/La_NORM")
will add the column "Ce/La_NORM" to the dataframe after calculating the Chondrite-normalised ratio of Ce to La.
The function
pyrolite.geochem.transform.get_ratio
accepts the keywordnorm_to
for getting normalised ratios, but this is not currently implemented.Most of the required implementation is there, but it needs to be updated so the correct values will be returned (currently the normalized values are taken from the respective dataframes, but they aren't then assigned to a ratio variable or stored as a column in a dataframe).