pym3tools
A modern standardized toolkit for processing Moon Mineralogy Mapper (M3) Data in a pure Python 3.13 environment.
What is pym3tools?
pym3tools is a modular data pipeline designed to make fetching, processing and analyzing M3 a breeze in Python. pym3tools incorporates many different processing methods from current planetary science literature, which allows it to serve as a state-of-the-art, standardized processing method, which will help improve the repeatability of geologic results obtained via M3.
Available Modules
| Module | Description |
|---|---|
data_retrieval |
Provides utilities for downloading M3 data and placing it into user-friendly data structures |
m3catalog |
Lays the framework for data structures that are compatible with M3 metadata. |
geo_ops |
Geographic operations such as georeferencing. |
rfl2rfl |
Contains the main logic and computational functions for processing level 1 (Radiance) M3 data into level 2 (Reflectance) data. |
save_models |
Provides the framework for saving steps of the rdn2rfl pipeline to easy-to-use HDF5 files. |
Quick Start
Installation
pym3tools is currently only available through PyPI.
pip install pym3tools
File Retrieval from PDS
import pym3tools as m3
# Data covering the Compton Belk'ovich Volcanic Complex
m3_data_ids = [
"M3G20090531T215442",
"M3G20090601T021112",
"M3G20090601T104211",
"M3G20090601T145212",
"M3G20090627T201242",
]
# Retrieving Data
root_dir = "./cbvc_data"
for i in m3_data_ids:
if Path(root_dir, i).exists():
_ = m3.M3FileManager(root_dir, i) # Downloads Data
else:
m3.file_downloader.create_urls_file(root_dir, i) # Creates url files
Building a Processing Pipeline
import pym3tools as m3
from pym3tools.level2pipeline import (
Crop, Georeferemce, TerrainModel, SolarSpectrumRemoval, StatisticalPolish,
Photometric Correction
)
from rasterio import BoundingBox
# Initializing File Manager
root_dir = "./cbvc_data"
file_manager = m3.M3FileManager(root_dir, "M3G20090531T215442")
# Defining Regional Scope
bbox = BoundingBox(left=87, bottom=48, right=114, top=71)
# Listing steps of the processing pipeline
steps = [
Crop("cropped", bbox=bbox, save_output=True),
Georeference("georeferenced", save_output=True),
TerrainModel("terrain_model", save_output=True),
SolarSpectrumRemoval("solar_spec_removed", save_output=True),
StatisticalPolish("statistical_polish", save_output=True),
ClarkThermalCorrection("thermal_correction", use_pds_temperatures=True, save_output=True),
PhotometricCorrection("photometric_correction", save_output=True),
]
# Initializing pipeline
pipeline = m3.M3Level2Pipeline(steps, file_manager)
# Running pipeline
pipeline.run()
Metadata
Release files for pym3tools 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 | Provenance | |
|---|---|---|---|---|
| pym3tools-0.1.0.tar.gz | 43.4 MB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pym3tools-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 101.9 MB
Release files / pym3tools-0.1.0.tar.gz
| Download URL | pym3tools-0.1.0.tar.gz |
|---|---|
| Size | 43.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b53814d40730c752dfbeeac7d59aefbff881ea03b7396dff453af80fc89b5249
|
|
BLAKE2b-256 checksum How to use checksums |
7d28ee12e3bc1cfe154c185c25d3ff0f5dac902799161175761816bfd885dd9f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.13
|
Release files / pym3tools-0.1.0-py3-none-any.whl
| Download URL | pym3tools-0.1.0-py3-none-any.whl |
|---|---|
| Size | 58.5 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
61f1b662661e234b5360c056308075f0a84f258ad099b6b676241cf47c6c7c64
|
|
BLAKE2b-256 checksum How to use checksums |
08f8e927a5b569cb8c0fb3d3b607c510616d91334e8b90e5b84994d39a28bd62
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.13
|
Security for pym3tools 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.