Metadata-Version: 2.4
Name: lunardem
Version: 0.1.0
Summary: Production-ready DEM generation toolkit for lunar and planetary imagery.
Project-URL: Homepage, https://github.com/Kartavya728/Generation-of-High-resolution-Digital-Elevation-Model-from-Lunar-Images-using-Photoclinometry
Project-URL: Repository, https://github.com/Kartavya728/Generation-of-High-resolution-Digital-Elevation-Model-from-Lunar-Images-using-Photoclinometry
Project-URL: Documentation, https://github.com/Kartavya728/Generation-of-High-resolution-Digital-Elevation-Model-from-Lunar-Images-using-Photoclinometry/tree/main/docs
Project-URL: Issues, https://github.com/Kartavya728/Generation-of-High-resolution-Digital-Elevation-Model-from-Lunar-Images-using-Photoclinometry/issues
Author-email: kartavya suryawanshi <kartavya.xenon@gmail.com>
License: MIT License
        
        Copyright (c) 2026 LunarDEM Contributors
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: dem,geospatial,lunar,photoclinometry,planetary,shape-from-shading
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: GIS
Classifier: Topic :: Scientific/Engineering :: Image Processing
Requires-Python: <3.13,>=3.9
Requires-Dist: imageio>=2.34
Requires-Dist: numpy>=1.24
Requires-Dist: pydantic>=2.8
Requires-Dist: pyyaml>=6.0
Requires-Dist: rasterio>=1.3
Requires-Dist: scipy>=1.10
Requires-Dist: typer>=0.12
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == 'dev'
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
Requires-Dist: pytest>=8.2; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Requires-Dist: twine>=5.1; extra == 'dev'
Requires-Dist: types-pyyaml>=6.0; extra == 'dev'
Requires-Dist: wheel>=0.45; extra == 'dev'
Provides-Extra: docs
Requires-Dist: mkdocs-material>=9.5; extra == 'docs'
Requires-Dist: mkdocs>=1.6; extra == 'docs'
Requires-Dist: mkdocstrings[python]>=0.25; extra == 'docs'
Provides-Extra: ml
Requires-Dist: torch>=2.2; extra == 'ml'
Provides-Extra: pds
Requires-Dist: pvl>=1.3; extra == 'pds'
Provides-Extra: viz
Requires-Dist: matplotlib>=3.8; extra == 'viz'
Description-Content-Type: text/markdown

# 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

```bash
pip install .
```

Optional extras:

```bash
pip install .[viz]
pip install .[ml]
pip install .[docs]
pip install .[dev]
```

## Quick Start (Python API)

```python
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)

```bash
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) -> DEMResult`
- `analyze_dem(dem_or_path, analysis_config) -> TerrainMetrics`
- `assess_landing(dem_or_path, landing_config) -> LandingReport`

## Methods

- `sfs`: single-scale Lambertian SFS with optimization diagnostics
- `multiscale_sfs`: coarse-to-fine SFS
- `ml`: deterministic baseline scaffold with optional torch plugin path
- `hybrid`: 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`) with `viz` extra
- JSON manifest for reproducibility

## Documentation

Build docs locally:

```bash
pip install .[docs]
mkdocs serve
```

## Development

```bash
pip install .[dev]
pytest
ruff check .
mypy lunardem
python -m build
twine check dist/*
```

## Publish to PyPI

```bash
python -m build
twine check dist/*
twine upload dist/*
```

## License

MIT License. See [LICENSE](LICENSE).
