Skip to main content

Production-ready DEM generation toolkit for lunar and planetary imagery.

Project description

lunadem

lunadem is a Python library for generating and analyzing Digital Elevation Models (DEM) from lunar and planetary images.

PyPI project page:

https://pypi.org/project/lunadem/

Install

pip install lunadem

Note: in code, the module import is lunardem.

CLI commands are available as both lunadem and lunardem.

Main Capabilities

  • DEM generation from image input (PNG, JPG, TIFF, GeoTIFF)
  • Multiple methods: sfs, multiscale_sfs, ml, hybrid
  • Terrain analytics: slope, roughness, curvature, elevation statistics, histogram summaries
  • Landing suitability: safe/unsafe masks, hazard filtering, score and safe-area summary
  • Exports: GeoTIFF DEM, OBJ/PLY mesh, visualization images, JSON run manifest

Core Functions (Python API)

  • generate_dem(input_data, method, config) -> DEMResult
  • analyze_dem(dem_or_path, analysis_config) -> TerrainMetrics
  • assess_landing(dem_or_path, landing_config) -> LandingReport

Quick API Example

from lunardem import ReconstructionConfig, generate_dem

cfg = ReconstructionConfig(
    output={"output_dir": "output", "base_name": "moon_run"},
)
result = generate_dem("data/moon1.png", method="multiscale_sfs", config=cfg)
print(result.exports)
print(result.metrics.stats)

CLI Usage

lunadem generate data/moon1.png --method sfs --output output
lunadem analyze output/reconstructed_dem.tif
lunadem landing output/reconstructed_dem.tif --spacecraft examples/configs/landing.yaml

Web App Usage

Web app is provided as a demo in:

examples/webapp/app.py

Run:

python examples/webapp/app.py

Then open:

http://127.0.0.1:5000/

Endpoints:

  • GET / health message
  • POST /generate image upload + DEM generation response

Optional Extras

pip install "lunadem[viz]"
pip install "lunadem[ml]"
pip install "lunadem[pds]"
pip install "lunadem[docs]"
pip install "lunadem[dev]"

License

MIT License. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lunadem-0.2.2.tar.gz (6.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lunadem-0.2.2-py3-none-any.whl (6.4 MB view details)

Uploaded Python 3

File details

Details for the file lunadem-0.2.2.tar.gz.

File metadata

  • Download URL: lunadem-0.2.2.tar.gz
  • Upload date:
  • Size: 6.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.5

File hashes

Hashes for lunadem-0.2.2.tar.gz
Algorithm Hash digest
SHA256 af3a27983b5adeea37aae0d9a87357e1b7fe5f07c9610221ae3a275306c27fd7
MD5 5985bd31cfe5503466f351b2c0b1522a
BLAKE2b-256 fb4db8f4401e0c409964c091be95c3f9a8cafdabd8f59db626f7684add64cfec

See more details on using hashes here.

File details

Details for the file lunadem-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: lunadem-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 6.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.5

File hashes

Hashes for lunadem-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7ea610f3ec0440e5d893a44f4169d43e6cf1b361aa0aa9f360f763e31a900217
MD5 e47734172e7d3a8e3e413b4c5313b8c0
BLAKE2b-256 205c3ab1605a2125d064db79441d455196e59c850da83a0ae6db2c9621f18a7b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page