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 release page:

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

Install

pip install lunadem

Note: in code, current module import is 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

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

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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

lunadem-0.2.1-py3-none-any.whl (33.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lunadem-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 33.4 kB
  • 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0a2141d78d97368b5cca20c1e664d3ad1bf402575cc6ae49e4b736a3d569db47
MD5 7232cccd3c27fd533da3a592954b30ea
BLAKE2b-256 d9dfacd46b62657b54b624c5dbf41c1c976dabb4188adea313b6ec9914e0c8c7

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