multigas
Python package for processing, analyzing, and visualizing multi-gas volcanic monitoring data.
Developed through collaboration between CVGHM (Center for Volcanology and Geological Hazard Mitigation) and USGS for Campbell Scientific datalogger systems measuring volcanic gas emissions (CO2, SO2, H2S) and meteorological data.
Installation
Requirements
- Python 3.11 or higher
- Windows, macOS, or Linux
Install with uv (recommended)
# Install uv package manager
pip install uv
# Clone repository
git clone https://github.com/martanto/multigas.git
cd multigas
# Install with all dependencies
uv sync
Development
# Lint and auto-fix
uv run ruff check --fix src/
# Type check
uvx ty check src/
# Run all tests
uv run pytest tests/
# Run a single test file
uv run pytest tests/path/to/test_file.py
# Check for circular imports
uv run pytest tests/test_imports.py -v
Package Structure
src/multigas/
├── __init__.py # Version metadata
├── config/
│ └── logging.py # Logging setup (console + optional file handler)
└── core/
├── exceptions.py # Custom exception hierarchy
└── types.py # Shared type aliases, enums, and TypedDicts
Core types (multigas.core.types)
| Name | Kind | Description |
|---|---|---|
DateLike |
type alias | str | datetime | pd.Timestamp |
ColumnName |
type alias | str |
DatasetType |
StrEnum |
Dataset sampling intervals as pandas frequency aliases: ONE_SECOND="1s", TWO_SECONDS="2s", ONE_MINUTE="1min", SIX_HOURS="6h", plus categorical modes ZERO="zero", SPAN="span", WX="wx" |
DatasetMetadataDict |
TypedDict |
Station metadata from datalogger files |
LogLevel |
StrEnum |
DEBUG, INFO, WARN, ERROR |
FileFormat |
StrEnum |
CSV, EXCEL, PARQUET, JSON |
Exceptions (multigas.core.exceptions)
MultigasException
├── DatasetError
│ ├── FilterError
│ ├── ColumnError
│ └── DateRangeError
├── ValidationError
├── CacheError
├── LoaderError
├── MetadataError
├── PlotError
└── ConfigError
Logging (multigas.config.logging)
from multigas.config.logging import setup_logging, get_logger
from multigas.core.types import LogLevel
# Basic setup (console only)
logger = setup_logging(LogLevel.INFO)
# Enable file logging to logs/YYYY-MM-DD.log
logger = setup_logging(LogLevel.DEBUG, enable_file_log=True)
# Or set ENABLE_LOG=true in .env to enable file logging automatically
logger = setup_logging()
# Get a named child logger
logger = get_logger("multigas.reader")
Dependencies
| Package | Purpose |
|---|---|
pandas |
DataFrame operations |
numpy |
Numerical computing |
openpyxl |
Excel file I/O |
loguru |
Structured logging |
python-dotenv |
Environment variable loading |
License
MIT — Copyright (c) 2026, Martanto
Metadata
Release files for multigas 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| multigas-0.1.0.tar.gz | 23.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| multigas-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 53.7 kB
Release files / multigas-0.1.0.tar.gz
| Download URL | multigas-0.1.0.tar.gz |
|---|---|
| Size | 23.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6e0e52d7963178221f2ced309c7985b0fc085694e9291d207a5a371a613b39fe
|
|
BLAKE2b-256 checksum How to use checksums |
6a9afccc3d46dde82a8ce8d3ad5ef0c392af36b1633094080cdc24dec26652be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / multigas-0.1.0-py3-none-any.whl
| Download URL | multigas-0.1.0-py3-none-any.whl |
|---|---|
| Size | 30.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4272e9fff93806a5dff5e8a0d5141446876479987dff7b0ec1dbf532b4c8798d
|
|
BLAKE2b-256 checksum How to use checksums |
f6fee6b6e196b485c206d80bb628edc8a68a01dec35818bd523f384179395816
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|