Production-ready DEM generation toolkit for lunar and planetary imagery.
Project description
LunarDEM
LunarDEM is a production-oriented Python library for generating and analyzing Digital Elevation Models (DEM) from lunar and planetary imagery.
It ships with:
- shape-from-shading (SFS) reconstruction
- multi-scale SFS
- plugin-ready ML method scaffolding
- hybrid SFS + ML fusion
- terrain analytics (slope, roughness, curvature, histograms)
- deterministic landing suitability analysis
- geospatial exports (GeoTIFF, OBJ, PLY)
- CLI + Python API + PyPI-ready packaging
Installation
pip install .
Optional extras:
pip install .[viz]
pip install .[ml]
pip install .[docs]
pip install .[dev]
Quick Start (Python API)
from lunardem import generate_dem, ReconstructionConfig
config = ReconstructionConfig(
output={"output_dir": "output", "base_name": "moon_run"},
)
result = generate_dem("data/moon1.png", method="multiscale_sfs", config=config)
print(result.exports)
print(result.metrics.stats)
Quick Start (CLI)
lunardem generate data/moon1.png --method sfs --output output
lunardem analyze output/reconstructed_dem.tif
lunardem landing output/reconstructed_dem.tif --spacecraft examples/configs/landing.yaml
Public API
generate_dem(input_data, method, config) -> DEMResultanalyze_dem(dem_or_path, analysis_config) -> TerrainMetricsassess_landing(dem_or_path, landing_config) -> LandingReport
Methods
sfs: single-scale Lambertian SFS with optimization diagnosticsmultiscale_sfs: coarse-to-fine SFSml: deterministic baseline scaffold with optional torch plugin pathhybrid: weighted SFS+ML fusion with fallback behavior
Outputs
- DEM array in meters
- GeoTIFF (
.tif) with planetary CRS defaults - 3D mesh (
.obj, optional.ply) - Visualizations (
depth_map.png,surface_3d.png) withvizextra - JSON manifest for reproducibility
Documentation
Build docs locally:
pip install .[docs]
mkdocs serve
Development
pip install .[dev]
pytest
ruff check .
mypy lunardem
python -m build
twine check dist/*
Publish to PyPI
python -m build
twine check dist/*
twine upload dist/*
License
MIT License. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
lunadem-0.1.1-py3-none-any.whl
(31.9 kB
view details)
File details
Details for the file lunadem-0.1.1-py3-none-any.whl.
File metadata
- Download URL: lunadem-0.1.1-py3-none-any.whl
- Upload date:
- Size: 31.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3aaa9fad109a0d8e2f61235b2f7972801bbc0b91b59bded04c46b2e59eccdc7
|
|
| MD5 |
ae4f7e71c0d974628140a384b95a9c05
|
|
| BLAKE2b-256 |
cd102ebe67cbcdd013a64db9f2d692dcc4aed5d3d60ca3437c45b2dc30d2d6c8
|