Home

PetroPyQAPF โ€” Modal QAPF Classification in Python

Python-based application for modal QAPF classification tailored to thin-section petrography.

Overview

PetroPyQAPF is a Python-based application for the modal classification of plutonic igneous rocks following the IUGS-recommended QAPF scheme, with a workflow tailored to thin-section petrographic analysis.

Motivation & Context

Modal QAPF classification is a standard procedure in igneous petrology, yet it is often performed manually or using ad hoc spreadsheets, limiting reproducibility and consistency.

This project formalizes the classification process within a transparent and reproducible computational framework.

Methodology

The application includes:

  • User-defined modal proportions of QAPF minerals
  • Petrographically consistent normalization procedures
  • Automatic determination of the official IUGS rock name
  • Visualization within the appropriate QAPF ternary diagram

Qualitative petrographic descriptors are included to contextualize interpretations without altering the normative classification.

Outputs

  • Official QAPF rock classification
  • Annotated ternary diagrams
  • Concise petrographic summaries

Current Status

Core classification routines are implemented. Interface development and workflow validation are ongoing.

Future Work

  • Optional AI-assisted qualitative petrographic feedback
  • PDF export for academic reporting and teaching
โ† Back to portfolio