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

Add functionality for mineral normalisation/data transformation #5

Open
morganjwilliams opened this issue Jul 23, 2018 · 4 comments
Open

Comments

@morganjwilliams
Copy link
Owner

morganjwilliams commented Jul 23, 2018

For working with mineral data, additional functionality is needed:

  • specific normalisation (e.g. to a specific number of oxygen atoms).
  • formulae calculations (e.g. endmembers for garnet, plagioclase)
@morganjwilliams morganjwilliams changed the title Add functionality for minerals Add functionality for mineral normalisation/data transformation Nov 15, 2018
@morganjwilliams
Copy link
Owner Author

92999f2 adds much of this functionality.

@morganjwilliams
Copy link
Owner Author

morganjwilliams commented Jan 10, 2019

  • Whole-rock normative calculations.

@ondrolexa
Copy link
Contributor

Hi Morgan,
I'm trying to use pyrolite to calculate garnet end members but without success...

import numpy as np
import pandas as pd

from pyrolite.mineral.normative import endmember_decompose

comp = pd.DataFrame({"SiO2":37.244,"Al2O3":21.216,"CaO":1.285,"K2O":0.007,"TiO2":0.023,"FeO":35.964,"MnO":1.116,"MgO":3.387,"Na2O":0.017,"Y2O3":0.018}, index=[0])

endmember_decompose(comp, endmembers="garnet")

results in...

2023-08-28 13:21:04,678 pyrolite.geochem.transform - WARNING: No relevant species (['K', 'K2O', 'KT', 'K2OT']) found to aggregate.
2023-08-28 13:21:04,693 pyrolite.geochem.transform - WARNING: No relevant species (['Fe', 'Fe2O', 'FeO', 'Fe2O3', 'FeO2', 'Fe2O5', 'FeO3', 'Fe2O7', 'FeT', 'Fe2OT', 'FeOT', 'Fe2O3T', 'FeO2T', 'Fe2O5T', 'FeO3T', 'Fe2O7T']) found to aggregate.
2023-08-28 13:21:04,717 pyrolite.geochem.transform - WARNING: No relevant species (['Na', 'Na2O', 'NaT', 'Na2OT']) found to aggregate.
2023-08-28 13:21:04,722 pyrolite.geochem.transform - WARNING: No relevant species (['Y', 'Y2O', 'YO', 'Y2O3', 'YT', 'Y2OT', 'YOT', 'Y2O3T']) found to aggregate.
name  pyrope  almandine  spessartine  grossular  andradite  uvarovite  majorite  morimotoite
0       12.5       12.5         12.5       12.5       12.5       12.5      12.5         12.5

Any advise? Thanks.

@morganjwilliams
Copy link
Owner Author

morganjwilliams commented Aug 29, 2023

@ondrolexa I'll take a look! Note that this decomposition as currently implemented is just based on optimization, so first guess is it got stuck at the beginning. Could potentially work in rules-based systems which do already exist for things which are bit more complicated like garnets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants