GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - wlanghans/ore-detection-api: An Ore detection API based on Gaussian process regression

BranchesTags
Open more actions menu

Latest commit

 

History

1 Commit
1 Commit

Folders and files

NameName
Last commit message
Last commit date
.vscode
.vscode
 
 
example_config
example_config
 
 
src
src
 
 
tests
tests
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
detection_contour_plot.png
detection_contour_plot.png
 
 
ore_detection_tutorial.ipynb
ore_detection_tutorial.ipynb
 
 
pyproject.toml
pyproject.toml
 
 

Repository files navigation

Ore Detection API

This project is a Python API designed to compute the likelihood of ore detection based on various geological and geographical inputs. It utilizes a configuration file in YAML format to specify parameters such as rock types, locations, and input files.

Project Structure

ore-detection-api
├── src
│   ├── main.py          # Entry point of the API
│   ├── config.py        # Configuration file parser
│   ├── detector.py      # Detection logic with Gaussian Process predictions
│   ├── constants.py     # Constants and configuration values
│   ├── gp_utils.py      # Gaussian Process utilities for spatial predictions
│   ├── gpd_utils.py     # GeoPandas utilities for spatial operations
│   └── grid_utils.py    # Grid creation and visualization utilities
├── example_config
│   └── config.yaml      # Example YAML configuration file
├── input_data
├── tests
│   ├── __init__.py      # Marks the tests directory as a package
│   ├── test_config.py   # Unit tests for the config module
│   ├── test_detector.py # Unit tests for the detector
│   └── test_gpd_utils.py # Unit tests for GeoPandas utilities
├── ore_detection_tutorial.ipynb    # Notebook tutorial demonstrating detection API design/usage
├── pyproject.toml       # Project metadata and dependencies
└── README.md            # Project documentation

Installation

To set up the project, clone the repository, create a virtual environment, and install it in development mode:

git clone <repository-url>
cd ore-detection-api
python -m venv .venv
source .venv/bin/activate
pip install -e .

To also install development dependencies (for testing):

pip install -e ".[dev]"

Configuration

The API requires a YAML configuration file located at example_config/config.yaml. This file should contain the following sections:

  • rocks: A list of rock types (minimum 2 elements).
  • locations: A list of [easting, northing] coordinates in UTM format (can be empty).
  • inputs: A list of input file names (minimum 1 element).
  • length_scale: (Optional) The Gaussian Process length scale parameter for spatial predictions (default: 10000.0).

Example Configuration

Here is the current configuration file (example_config/config.yaml):

rocks:
  - serpentinente ultramafic rock
  - ultramafic rock
  - granodioritic intrusive rock

locations:
  - [550000, 5584000]
  - [548000, 5583000]
  - [540000, 5575000]

inputs:
  - BedrockP.gpkg
length_scale: 5574.0

Usage

To run the API, execute the following command:

ore-detection-api

This will use the default configuration file at example_config/config.yaml. To use a different configuration file, provide the path as an argument:

ore-detection-api /path/to/custom/config.yaml

The application will load the configuration, validate it, and compute the likelihood of ore detection based on the provided parameters in the configuration.

Alternatively, you can run it directly as a Python module:

python -m main

Tutorial

To get a better understanding of how predictions are made, the notebook ore_detection_tutorial.ipynb provides a tutorial that explains the framework chosen for data processing and statistical modeling. A step-by-step guide is provided with illustrations.

Testing

Unit tests are located in the tests directory. To run the tests, use the following command:

pytest tests/

License

This project is licensed under the MIT License. See the LICENSE file for more details.

About

An Ore detection API based on Gaussian process regression

Topics

gaussian-processespython

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.