Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyrolite.geochem.transform.get_ratio: norm_to not implemented. #34

Closed
morganjwilliams opened this issue Feb 24, 2020 · 1 comment
Closed
Assignees
Labels
bug Something isn't working

Comments

@morganjwilliams
Copy link
Owner

The function pyrolite.geochem.transform.get_ratio accepts the keyword norm_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).

@morganjwilliams morganjwilliams added the bug Something isn't working label Feb 24, 2020
@morganjwilliams morganjwilliams self-assigned this Feb 24, 2020
@morganjwilliams morganjwilliams changed the title pyrolite.geochem.transform.get_ratio : norm_to not implemented. pyrolite.geochem.transform.get_ratio: norm_to not implemented. Feb 24, 2020
@morganjwilliams
Copy link
Owner Author

This issue has now been addressed with e9b96ff . 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant