Skip to main content
APSG logo

PyPI - Version Conda Documentation Status codecov DOI

🤔 What is APSG?

APSG is the package for structural geologists. It defines several new python classes to easily manage, analyze and visualize orientation structural geology data.

Check CHANGELOG.md for recent updates.

📈 Quick example

from apsg import *

f = folset.random_fisher(position=fol(130, 60))
s = StereoNet()
s.great_circle(f)
s.point(f)
s.contour(f)
s.show()

StereoNet supports both equal-area (Schmidt, default) and equal-angle (Wulff) projections, lower and upper hemisphere, and rotating the whole net independently of the plotted data -- see the stereonet tutorial in the documentation for examples.

🛠️ Requirements

You need Python 3.12 or later to run APSG. The package requires NumPy, SciPy, Matplotlib, SQLAlchemy, pandas and pygeomag.

🚀 How to install

It is strongly suggested to install apsg into separate environment. You can create Python virtual environment. For Linux and macOS use:

python -m venv .venv
source .venv/bin/activate

for Windows use Command Prompt or PowerShell:

python -m venv .venv
.venv\Scripts\activate

Note: On Microsoft Windows, it may be required to set the execution policy in PowerShell for the user. You can do this by issuing the following PowerShell command:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

and install latest stable version of apsg using pip within the environment:

pip install apsg

To include jupyterlab in installation, use lab extra:

pip install apsg[lab]

Or install master with:

pip install git+https://github.com/ondrolexa/apsg.git

Alternatively, you can clone the repository and do a local install with uv (recommended for dev):

git clone https://github.com/ondrolexa/apsg.git
cd apsg
uv sync --all-extras --dev

Upgrading via pip

To upgrade an existing version of APSG from PyPI, execute:

pip install apsg --upgrade --no-deps

Comments on system-wide installations on Debian systems

Latest Debian-based systems do not allow installing non-Debian packages system-wide. However, installing all requirements allows to force install APSG system-wide without troubles.

Install requirements using apt:

sudo apt install python3-numpy python3-matplotlib python3-scipy python3-sqlalchemy python3-pandas

and then install apsg using pip:

pip install --break-system-packages apsg

I'm using conda or mamba to manage environments

If you already have conda or mamba installed, you can create environment with:

conda config --add channels conda-forge
conda create -n apsg python apsg jupyterlab

or using mamba

mamba create -n apsg python apsg jupyterlab

Current release info

Name Downloads Version Platforms
Conda Recipe Conda Downloads Conda Version Conda Platforms

📘 Documentation

You can explore all the features of APSG in documentation.

💻 Contributing

Most discussion happens on Github. Feel free to open an issue or comment on any open issue or pull request. Check CONTRIBUTING.md for more details.

🪙 Donate

APSG is an open-source project, available for you for free. It took a lot of time and resources to build this software. If you find this software useful and want to support its future development please consider donating to me.

Donate via PayPal

License

APSG is free software: you can redistribute it and/or modify it under the terms of the MIT License. A copy of this license is provided in the LICENSE file.

Metadata

Release files for apsg 2.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for apsg 2.0.2
File Size Uploaded
apsg-2.0.2.tar.gz 195.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for apsg 2.0.2
File Interpreter ABI Platform
apsg-2.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 351.4 kB

Release files / apsg-2.0.2.tar.gz

Download URL apsg-2.0.2.tar.gz
Size 195.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d9fa0b16377131bbad0f32e307a220fe74da88e1fc0bcde25aae4540117731f6
BLAKE2b-256 checksum
How to use checksums
5a8428423d9659829f12c36d10d1393485e801b03d222fc0b523639df99afb51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / apsg-2.0.2-py3-none-any.whl

Download URL apsg-2.0.2-py3-none-any.whl
Size 156.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a151674fca0a39ddf18b7c7592bbb8c91036b4868614662c27f0c9643c61d6ca
BLAKE2b-256 checksum
How to use checksums
51938f72d3ab2de47451114f2228f65a65e28752a7080dc88c8ad47c68b4a9e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

2.0.6

2 release files

2.0.5

2 release files

2.0.4

2 release files

2.0.3

2 release files

This release

2.0.2 This release

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.9

2 release files

1.3.8

2 release files

1.3.7

2 release files

1.3.6

2 release files

1.3.5

2 release files

1.3.4

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.0

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

1 release file

0.5.0

1 release file

0.4.4

1 release file

0.4.3

1 release file

0.4.2

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.6

1 release file

0.3.5

1 release file

0.3.4

1 release file

0.3.3

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page