Skip to main content

pym3tools

A modern standardized toolkit for processing Moon Mineralogy Mapper (M3) Data in a pure Python 3.13 environment.


Unit Tests DOI

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).

pip install pym3tools

File Retrieval from PDS

import pym3tools as m3
from pym3tools.rdn2rfl import pipeline_steps as r2r

# 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:
    m3.data_retrieval.download_m3_dataset(i)  # Creates data directories

Building a Processing Pipeline

import pym3tools as m3
from pym3tools.level2pipeline import (
    Crop, Georeferemce, TerrainModel, SolarSpectrumRemoval, StatisticalPolish,
    Photometric Correction
)

# Listing steps of the processing pipeline
steps = [
    r2r.Georeference(
        enabled=True,
        gcps_fp="./path_to/ground_control_pionts.gcps",
        custom_slope="./path_to/slope_data.bil",
        custom_aspect="./path_to/aspect_data.bil"
    ),
    r2r.SolarRemoval(enabled=True),
    r2r.StatisticalPolish(enabled=True),
    r2r.ThermalCorrection(enabled=True, method="Clark_Modified"),
    r2r.PhotometricCorrection(enabled=True, method="Lommel-Seeliger"),
]

# Initializing pipeline
pipeline = m3.rdn2rfl.M3Level2Pipeline(
    steps, "path_to/data_directory", "path_to/save_file.hdf5"
)

# Running pipeline
pipeline.run()

Metadata

Release files for pym3tools 1.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 pym3tools 1.0.2
File Size Uploaded Provenance
pym3tools-1.0.2.tar.gz 43.4 MB Without provenance Details

Built distribution (wheel)

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

Total release size: 101.9 MB

Release files / pym3tools-1.0.2.tar.gz

Download URL pym3tools-1.0.2.tar.gz
Size 43.4 MB
Tags Source
SHA-256 checksum
How to use checksums
344bc30aa2075e760a3d92299fdc3c37d06d29f6a7454e6b1bc86a1088feba34
BLAKE2b-256 checksum
How to use checksums
f719d3befcddfb48010a2cbc26a0b2fb45b409f995b2a17406fa368f79629516
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.13

Release files / pym3tools-1.0.2-py3-none-any.whl

Download URL pym3tools-1.0.2-py3-none-any.whl
Size 58.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
5b9819f30f8aa3cf9da8ebeb6a0af82c17789d9b62010f56696559e0836b18d9
BLAKE2b-256 checksum
How to use checksums
0db4748d90fd4ee2913f48d5709973a681efb82f3a51cf6e8d7c9bf69fba721e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.13

Security for pym3tools 1.0.2

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.

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