CorePytools package
CorePytools (CorePy) applies machine learning cluster algorithms to geological samples of core.
- The primary focus of CorePy is to classify high resolution X-ray fluoresence data into chemofacies
- unsupervised and supervised clustering tools are applied
- Folder structures are developed to simplify working on multiple cores and formations
- Visualizations are used to validate clustering results.
Installation
pip install corepytools
- corepytools includes commonly applied functions that are called by different Python scripts
- corepytools is a dependency
- Additional notes and tips about GitHub and steps I use are here: https://github.com/Totilarson/MyCheatSheet
Running Corepytools and CorePy
1) fork the CorePy repo to your github account
2) make a local clone:
- command line: `git clone https://github.com/Totilarson/CorePy.git`
- if it is necessary to delete the local clone use: 'rm -rf .git*'
3) Navigate to the local repo //CorePy/ and inspect folders 'CoreData' and 'CorePycodes'
4) In //CorePy/CorePycodes open 'settings.py' and 'PCAexample'
- 'settings.py' contains variables for all the Python scripts
- "CoreOfStudy", "Depth_model", "Formation", and "RockClassification" should match values in Public_XRF.csv datafile
Data examples
- CoreData folder contains an example of a high reoslution XRF dataset and corebox photographs
- Naming patterns for core box sticker location, wireline depths, and elemental concentrations are shown
Settings.py and PCAexample
- Running PCAexample.py will build additional output folders and run PCA-Kmeans.
- Output files are in output folder. CSV file includes additional columns of data
- Settings.py writes a Run_settings.json file that is accessed by other scripts
CoreBeta file
- <corename>.json files are stored for each core in //CorePy/CoreData/CoreBeta
- files provide core-specific data that is referenced in each script
- Wireline scripts also write data to the .jsom file
CorePy_plotting.py
1) provides additional elemenal plotting
- elemental cross plots. Elements are selected from Run_settings['Elements_plotted']
- elements plotted with respect to depth: Depth model selected by: Run_settings['Depth_model']
- element box plots. majors and trace
- pie chart of chemofacies abundance
- Depth referenced chemostrat column output in a folder //CorePy/CoreOutput/CrossSection/
NN_Build.py and NN_apply.py
- these scripts build and apply results from supervised chemfoacies classifications
- An example training dataset is included in //CorePy/CoreData/CoreNeuralModel
- model parameters are output _XGB and __NN files in //CorePy/CoreData/CoreNeuralModel
- output .csv file has additional classification columns
Coreimage.py
- Designed to overlay chemofacies results on corebox photographs
- Requires coreboxphotographs be converted to 'coretubes'
- Coretubes are created from Corebox_Crop.py
- Coretubes are depth registered and in folder //CorePy/CoreData/CoreTubes/
About the authors
CorePy is being developed by Toti Larson at the University of Texas at Austin, Bureau of Economic Geology, Mudrocks Systems Research Laboratory (MSRL) research consortium.
-
Toti E. Larson, Ph.D. - Research Associate at the University of Texas at Austin. PI MSRL research consortium
-
Esben Pedersen, M.S. - Graduate student (graduated 2020) at the University of Texas at Austin.
-
Priyanka Periwal, Ph.D. - Research Science Associate at the University of Texas at Austin.
-
J. Evan Sivil - Research Science Associate at the University of Texas at Austin.
-
Geoforce students - Ana LetÃcia Batista (2020) - Jackson State University
Package Inventory
Package Dependencies
- os
- numpy
- pandas
- seaborn
- pickle
- glob
- matplotlib.pyplot
- seaborn as sns
- sklearn.preprocessing import StandardScaler
- sklearn.decomposition import PCA
- sklearn.cluster import KMeans
- matplotlib.patheffects
- json
- corepytools
- from sklearn.model_selection import train_test_split
- from sklearn.preprocessing import StandardScaler
- from sklearn.neural_network import MLPClassifier
- from sklearn.metrics import classification_report, confusion_matrix
- from sklearn import metrics
- import matplotlib.pyplot as plt
- matplotlib.patches as patches
Notes
Install corepytools using pip install corepytools Follow over to the authors Github account to download example Python scripts that use corepytools
Folder structure
corepytools
|-LICENSE.txt **MIT**
|-README.md **edited in markdown**
|-setup.py **name=corepy-tools, package=src, python module=corepytools**
|-src
|-corepytools **contains functions**
|-__init__.py ** empty**
Metadata
Release files for corepytools 0.0.14
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| corepytools-0.0.14.tar.gz | 6.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| corepytools-0.0.14-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.9 kB
Release files / corepytools-0.0.14.tar.gz
| Download URL | corepytools-0.0.14.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
83673947c5ecb5cadf84e1858c9151f43424a66f88c0aec1105e2ab5d1627e16
|
|
BLAKE2b-256 checksum How to use checksums |
367c4ea2a5e1e8f167e9dc48b98b336290e1c27559730be8b64a12a03bc6f6bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
|
Release files / corepytools-0.0.14-py3-none-any.whl
| Download URL | corepytools-0.0.14-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
207117ec4226754a80bdcea6cba0fefe0550daca98a21dc38a525deecca29cf4
|
|
BLAKE2b-256 checksum How to use checksums |
f5e23ccf98982eab1c230b50073f7193b6708353d6d5034d84e00ad3c7cff118
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
|