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.
Metadata
Release files for geonormpy 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| geonormpy-0.1.1.tar.gz | 17.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| geonormpy-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 33.2 kB
Release files / geonormpy-0.1.1.tar.gz
| Download URL | geonormpy-0.1.1.tar.gz |
|---|---|
| Size | 17.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eb56dc76450c025aa527139abda0e63aa64ec4c437e10bec8a9f840d83d29aeb
|
|
BLAKE2b-256 checksum How to use checksums |
ce005d50377fdd7e06df250f4880a9d611f8ece4278c3fc4e04247f9663a9eb4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Release files / geonormpy-0.1.1-py3-none-any.whl
| Download URL | geonormpy-0.1.1-py3-none-any.whl |
|---|---|
| Size | 16.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
63d1d3da3346da8120f6533a37ba1b51bdcdc5b9c226ebae5e25210437fcf7bf
|
|
BLAKE2b-256 checksum How to use checksums |
60e5486053b62dc29259a7daa23d2304adf088a6aab3f9c8f7b78ab2204fabfa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|