Python engine for CIPW normative mineralogy and igneous geochemistry workflows.
Project description
GeoNormPy
GeoNormPy is a Python engine for estimating CIPW normative mineralogy from whole-rock geochemical data. The project is oriented toward igneous petrology workflows and reproducible geochemical data processing.
Features
- Sequential CIPW calculation with a numerically robust approach.
- Iron handling based on
FeOTor explicitFeO/Fe2O3speciation. - Diagnostics for silica saturation and alumina state.
- Single-sample and batch processing with
pandas. - Automated test suite with
pytest.
Installation
git clone https://github.com/jordan-zav/GeoNormPy.git
cd GeoNormPy
pip install -e .
Quick Start
from geonormpy.norms.cipw import cipw
sample = {
"SiO2": 72.5,
"Al2O3": 13.5,
"FeOT": 2.5,
"MgO": 0.5,
"CaO": 1.8,
"Na2O": 3.4,
"K2O": 4.0,
}
result = cipw(sample)
print(result["minerals_wtpercent"])
print(result["flags"])
Batch Processing
python run_GeoNormPy.py
The script reads data/test_data.csv and generates data/normative_results.csv.
Command-Line Interface
GeoNormPy includes a command-line interface so users can inspect the supported schema, create templates, validate input files, and run workflows.
geonormpy --help
geonormpy schema
geonormpy validate --input data/test_data.csv
geonormpy make-template
geonormpy make-config
geonormpy run --config config/workflow.yaml
Supported Input Columns
Optional ID columns:
Sample_ID, Notes
Supported oxide columns:
SiO2, TiO2, Al2O3, Fe2O3, FeO, FeOT, MnO, MgO, CaO, Na2O,
K2O, P2O5, ZrO2, Cr2O3, CO2, S, F, Cl, SO3
Standard Output Columns
Diagnostic columns:
silica_saturation, alumina_state, mass_balance_error, interpretive_flag,
calc_error
Normative mineral columns:
Q, Cor, Or, Ab, An, Le, Ne, Kp, Ac, Di, Hd, Wo, En,
Fs, Fo, Fa, Mt, Hm, Ilm, Cm, Ru, Tn, Z, Ap, Cc, Py,
Fl, Hl, Th, ns, ks
Development
pytest -q
Academic Context
This software was developed by Jordan Angel Luciano Zavaleta Reyes in the context of applied research in igneous petrology and computational geochemistry.
How to Cite
If you use GeoNormPy in a thesis, article, or technical report, please refer to the CITATION.cff file.
License
This project is distributed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file geonormpy-0.1.1.tar.gz.
File metadata
- Download URL: geonormpy-0.1.1.tar.gz
- Upload date:
- Size: 17.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb56dc76450c025aa527139abda0e63aa64ec4c437e10bec8a9f840d83d29aeb
|
|
| MD5 |
3271cb901a103999f9086ed8a3290716
|
|
| BLAKE2b-256 |
ce005d50377fdd7e06df250f4880a9d611f8ece4278c3fc4e04247f9663a9eb4
|
File details
Details for the file geonormpy-0.1.1-py3-none-any.whl.
File metadata
- Download URL: geonormpy-0.1.1-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63d1d3da3346da8120f6533a37ba1b51bdcdc5b9c226ebae5e25210437fcf7bf
|
|
| MD5 |
1c5cd6735af47a2aece4072772905054
|
|
| BLAKE2b-256 |
60e5486053b62dc29259a7daa23d2304adf088a6aab3f9c8f7b78ab2204fabfa
|