lunar-toolkit 0.1.0.dev2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- lunar_toolkit-0.1.0.dev2/LICENSE +28 -0
- lunar_toolkit-0.1.0.dev2/PKG-INFO +177 -0
- lunar_toolkit-0.1.0.dev2/README.md +128 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/__init__.py +6 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/asp.py +432 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/cli/__init__.py +88 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/cli/_jobs.py +437 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/cli/_status.py +368 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/cli/_utils.py +128 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/cli/app.py +205 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/cli/build_db.py +130 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/cli/download.py +111 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/cli/kaguya.py +253 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/cli/ode_search.py +144 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/cli/pairs.py +236 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/cli/process.py +138 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/cli/query.py +70 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/cli/reference.py +233 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/cli/search.py +90 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/cli/serve.py +706 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/cli/sfs.py +344 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/cli/sfs_report.py +148 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/cli/shadowcam.py +246 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/cli/stereo.py +85 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/cli/workspace.py +84 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/config.py +345 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/constants.py +217 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/csm.py +340 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/downloader.py +447 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/geometry.py +556 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/isis.py +222 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/kaguya/__init__.py +45 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/kaguya/mi.py +274 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/kaguya/tc.py +370 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/lroc/__init__.py +6 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/lroc/cumindex.py +1197 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/lroc/nac.py +702 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/observation.py +127 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/ode.py +485 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/provenance.py +312 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/reference.py +1111 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/selection.py +714 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/sfs.py +1534 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/sfs_products.py +676 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/sfs_report.py +1328 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/shadowcam/__init__.py +29 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/shadowcam/sc.py +392 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/static/index.html +3259 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/stereo.py +519 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/stereo_dem.py +145 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/tools.py +264 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit/workspace.py +1173 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit.egg-info/PKG-INFO +177 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit.egg-info/SOURCES.txt +82 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit.egg-info/dependency_links.txt +1 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit.egg-info/entry_points.txt +2 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit.egg-info/requires.txt +31 -0
- lunar_toolkit-0.1.0.dev2/lunar_toolkit.egg-info/top_level.txt +1 -0
- lunar_toolkit-0.1.0.dev2/pyproject.toml +112 -0
- lunar_toolkit-0.1.0.dev2/setup.cfg +4 -0
- lunar_toolkit-0.1.0.dev2/tests/test_aoi.py +301 -0
- lunar_toolkit-0.1.0.dev2/tests/test_app.py +491 -0
- lunar_toolkit-0.1.0.dev2/tests/test_build.py +184 -0
- lunar_toolkit-0.1.0.dev2/tests/test_config.py +365 -0
- lunar_toolkit-0.1.0.dev2/tests/test_csm.py +230 -0
- lunar_toolkit-0.1.0.dev2/tests/test_download.py +267 -0
- lunar_toolkit-0.1.0.dev2/tests/test_footprints.py +148 -0
- lunar_toolkit-0.1.0.dev2/tests/test_integration.py +251 -0
- lunar_toolkit-0.1.0.dev2/tests/test_kaguya.py +189 -0
- lunar_toolkit-0.1.0.dev2/tests/test_kaguya_mi.py +179 -0
- lunar_toolkit-0.1.0.dev2/tests/test_lbl.py +61 -0
- lunar_toolkit-0.1.0.dev2/tests/test_ode.py +109 -0
- lunar_toolkit-0.1.0.dev2/tests/test_reference.py +510 -0
- lunar_toolkit-0.1.0.dev2/tests/test_selection.py +255 -0
- lunar_toolkit-0.1.0.dev2/tests/test_sfs.py +717 -0
- lunar_toolkit-0.1.0.dev2/tests/test_sfs_products.py +270 -0
- lunar_toolkit-0.1.0.dev2/tests/test_sfs_report.py +322 -0
- lunar_toolkit-0.1.0.dev2/tests/test_shadowcam.py +199 -0
- lunar_toolkit-0.1.0.dev2/tests/test_static.py +138 -0
- lunar_toolkit-0.1.0.dev2/tests/test_stereo.py +258 -0
- lunar_toolkit-0.1.0.dev2/tests/test_tool_env.py +32 -0
- lunar_toolkit-0.1.0.dev2/tests/test_tools.py +298 -0
- lunar_toolkit-0.1.0.dev2/tests/test_update.py +98 -0
- lunar_toolkit-0.1.0.dev2/tests/test_workspace.py +579 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026, Alex Maietta
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
16
|
+
contributors may be used to endorse or promote products derived from
|
|
17
|
+
this software without specific prior written permission.
|
|
18
|
+
|
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
20
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
21
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
22
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
23
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
24
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
25
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
26
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
27
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: lunar-toolkit
|
|
3
|
+
Version: 0.1.0.dev2
|
|
4
|
+
Summary: Find, download and process lunar orbital imagery (LROC, ShadowCam, Kaguya TC) and build stereo and shape-from-shading DEMs with ISIS + ASP
|
|
5
|
+
License-Expression: BSD-3-Clause
|
|
6
|
+
Keywords: moon,lroc,shadowcam,kaguya,isis,ames-stereo-pipeline,shape-from-shading,dem
|
|
7
|
+
Classifier: Development Status :: 3 - Alpha
|
|
8
|
+
Classifier: Intended Audience :: Science/Research
|
|
9
|
+
Classifier: Operating System :: OS Independent
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering :: Astronomy
|
|
18
|
+
Classifier: Topic :: Scientific/Engineering :: GIS
|
|
19
|
+
Requires-Python: >=3.10
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
Requires-Dist: numpy>=1.24
|
|
23
|
+
Requires-Dist: pandas>=2.0
|
|
24
|
+
Requires-Dist: pyarrow>=14
|
|
25
|
+
Requires-Dist: pywebview>=5
|
|
26
|
+
Requires-Dist: duckdb>=1.0
|
|
27
|
+
Requires-Dist: matplotlib>=3.7
|
|
28
|
+
Requires-Dist: tqdm>=4.65
|
|
29
|
+
Requires-Dist: platformdirs>=3
|
|
30
|
+
Requires-Dist: pyyaml>=6
|
|
31
|
+
Requires-Dist: rasterio>=1.3
|
|
32
|
+
Requires-Dist: shapely>=2.0
|
|
33
|
+
Provides-Extra: app
|
|
34
|
+
Requires-Dist: pywebview[qt]>=5; sys_platform == "linux" and extra == "app"
|
|
35
|
+
Provides-Extra: dev
|
|
36
|
+
Requires-Dist: pytest>=7; extra == "dev"
|
|
37
|
+
Requires-Dist: pytest-cov>=6.1; extra == "dev"
|
|
38
|
+
Requires-Dist: mypy>=2; extra == "dev"
|
|
39
|
+
Requires-Dist: pandas-stubs; extra == "dev"
|
|
40
|
+
Requires-Dist: types-tqdm; extra == "dev"
|
|
41
|
+
Requires-Dist: types-PyYAML; extra == "dev"
|
|
42
|
+
Requires-Dist: pre-commit; extra == "dev"
|
|
43
|
+
Requires-Dist: ruff; extra == "dev"
|
|
44
|
+
Provides-Extra: docs
|
|
45
|
+
Requires-Dist: mkdocs-material; extra == "docs"
|
|
46
|
+
Requires-Dist: mkdocs-gen-files; extra == "docs"
|
|
47
|
+
Requires-Dist: mkdocstrings[python]; extra == "docs"
|
|
48
|
+
Dynamic: license-file
|
|
49
|
+
|
|
50
|
+
[](https://github.com/alexmaietta/lunar-toolkit/actions/workflows/ci.yml)
|
|
51
|
+
[](https://alexmaietta.github.io/lunar-toolkit/coverage/)
|
|
52
|
+
[](https://pypi.org/project/lunar-toolkit/)
|
|
53
|
+
[](LICENSE)
|
|
54
|
+
|
|
55
|
+
# Lunar Toolkit
|
|
56
|
+
|
|
57
|
+
Lunar Toolkit finds, downloads and processes lunar orbital imagery and turns it into DEMs.
|
|
58
|
+
|
|
59
|
+
It builds a searchable index of LROC images whose footprint search also works near the poles, finds ShadowCam, LROC and Kaguya products through the PDS Orbital Data Explorer, imports images into [ISIS](https://isis.astrogeology.usgs.gov/), and builds stereo and shape-from-shading (SfS) DEMs with the [Ames Stereo Pipeline](https://stereopipeline.readthedocs.io/) through configurable, reproducible pipelines. A desktop app browses the index, ODE, footprints and full-resolution images.
|
|
60
|
+
|
|
61
|
+
See our [latest documentation](https://alexmaietta.github.io/lunar-toolkit/) for guides, the CLI reference and the API.
|
|
62
|
+
|
|
63
|
+
## Install
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
pip install lunar-toolkit
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Python 3.10+. DEM and image-processing commands also need ISIS and the Ames Stereo Pipeline ([setup](https://alexmaietta.github.io/lunar-toolkit/dems/#setup)), or use the all-in-one Docker image (`docker build -t lunar-toolkit .`, see [Install](https://alexmaietta.github.io/lunar-toolkit/install/)).
|
|
70
|
+
|
|
71
|
+
## Quick start
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
lunar build-db edr # local LROC EDR index (~3.8 GB download)
|
|
75
|
+
lunar search --point -85.98 -0.26 --radius-km 2 --nac-only
|
|
76
|
+
lunar download M165993756LE --output-dir raw
|
|
77
|
+
lunar app # desktop app with search, footprints, images and settings
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Commands
|
|
81
|
+
|
|
82
|
+
| Command | Description |
|
|
83
|
+
|---|---|
|
|
84
|
+
| `build-db` | Build or update the local LROC index (EDR, CDR, RDR) |
|
|
85
|
+
| `search` | Footprint search of the index by box, point + radius or AOI polygon |
|
|
86
|
+
| `query` | Print metadata for product IDs |
|
|
87
|
+
| `download` | Download LROC EDR / CDR images |
|
|
88
|
+
| `ode-search` | Search ShadowCam, LROC and Kaguya products on ODE |
|
|
89
|
+
| `pairs` | Rank NAC stereo pairs or pick illumination-diverse SfS images |
|
|
90
|
+
| `process` | Calibrate and map-project NAC images with ISIS |
|
|
91
|
+
| `kaguya` | Import Kaguya TC / MI images into ISIS with CSM cameras |
|
|
92
|
+
| `shadowcam` | Prepare ShadowCam cubes with SPICE and CSM cameras |
|
|
93
|
+
| `stereo` | DEM from a NAC stereo pair |
|
|
94
|
+
| `sfs` | Shape-from-shading DEM from a YAML config or flags |
|
|
95
|
+
| `sfs-report` | Metrics, figures and an HTML report for an SfS run |
|
|
96
|
+
| `workspace` | SQL over a run's DuckDB workspace (footprints, bundle-adjust stats) |
|
|
97
|
+
| `reference` | Artemis III regions, PGDA LOLA DEMs and published SfS DEMs |
|
|
98
|
+
| `app` / `serve` | The desktop app, or the same page served to a browser |
|
|
99
|
+
|
|
100
|
+
Every option is in the [CLI reference](https://alexmaietta.github.io/lunar-toolkit/cli/).
|
|
101
|
+
|
|
102
|
+
## Python
|
|
103
|
+
|
|
104
|
+
```python
|
|
105
|
+
from lunar_toolkit import CumIndex, NacImage
|
|
106
|
+
|
|
107
|
+
ci = CumIndex() # the local EDR index
|
|
108
|
+
df = ci.search(point=(-85.98, -0.26), radius_km=2, nac_only=True)
|
|
109
|
+
print(len(df), "NAC images within 2 km of Malapert")
|
|
110
|
+
|
|
111
|
+
img = NacImage(df.iloc[0]["PRODUCT_ID"])
|
|
112
|
+
print(img.product_id, img.start_time, img.pixel_scale, img.incidence_angle, img.sub_solar_azimuth)
|
|
113
|
+
print(img.edr_url)
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
More in the [API reference](https://alexmaietta.github.io/lunar-toolkit/api/cumindex/).
|
|
117
|
+
|
|
118
|
+
## Development
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
pip install -e ".[dev]"
|
|
122
|
+
pre-commit install
|
|
123
|
+
pytest
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Acknowledgements
|
|
127
|
+
|
|
128
|
+
This toolkit only wraps and indexes the work of others.
|
|
129
|
+
|
|
130
|
+
| What | Provided by |
|
|
131
|
+
|---|---|
|
|
132
|
+
| LROC NAC and WAC images | [Lunar Reconnaissance Orbiter Camera](https://www.lroc.asu.edu/) team, Arizona State University |
|
|
133
|
+
| ShadowCam images | [ShadowCam](https://www.shadowcam.asu.edu/) team (Arizona State University and Malin Space Science Systems), a NASA instrument on KARI's Korea Pathfinder Lunar Orbiter (Danuri) |
|
|
134
|
+
| Kaguya Terrain Camera and Multiband Imager images | JAXA [SELENE (Kaguya)](https://www.selene.jaxa.jp/) teams, distributed through JAXA's [DARTS](https://darts.isas.jaxa.jp/) archive |
|
|
135
|
+
| Data archives and search | NASA Planetary Data System [Imaging Node](https://pds-imaging.jpl.nasa.gov/), and the Geosciences Node's [Orbital Data Explorer](https://ode.rsl.wustl.edu/moon/) |
|
|
136
|
+
| LOLA 5 m site DEMs | LOLA team, NASA GSFC [Planetary Geodesy Data Archive](https://pgda.gsfc.nasa.gov/products/78) |
|
|
137
|
+
| Published SfS DEMs and the SfS workflow | Bertone et al. and the NASA GSFC LuNaMaps / Artemis III work, on [Zenodo](https://doi.org/10.5281/zenodo.17954508) |
|
|
138
|
+
| [ISIS](https://isis.astrogeology.usgs.gov/) and [ALE](https://github.com/DOI-USGS/ale) | USGS Astrogeology Science Center |
|
|
139
|
+
| [Ames Stereo Pipeline](https://stereopipeline.readthedocs.io/) | NASA Ames Research Center |
|
|
140
|
+
| [SPICE](https://naif.jpl.nasa.gov/) | NASA Navigation and Ancillary Information Facility (NAIF) |
|
|
141
|
+
| [GDAL](https://gdal.org/) and [DuckDB](https://duckdb.org/) | their open-source communities |
|
|
142
|
+
|
|
143
|
+
Please cite the instruments, data sets and software below when you publish results made with them.
|
|
144
|
+
|
|
145
|
+
## References
|
|
146
|
+
|
|
147
|
+
### Software
|
|
148
|
+
|
|
149
|
+
- Beyer, R. A., Alexandrov, O., & McMichael, S. (2018). The Ames Stereo Pipeline: NASA's open source software for deriving and processing terrain data. *Earth and Space Science*, 5, 537-548. [doi:10.1029/2018EA000409](https://doi.org/10.1029/2018EA000409)
|
|
150
|
+
- Alexandrov, O., & Beyer, R. A. (2018). Multiview shape-from-shading for planetary images. *Earth and Space Science*, 5, 652-666. [doi:10.1029/2018EA000390](https://doi.org/10.1029/2018EA000390)
|
|
151
|
+
- Alexandrov, O., McMichael, S., Broxton, M., et al. (2024). NeoGeographyToolkit/StereoPipeline: ASP 3.4.0. Zenodo. [doi:10.5281/zenodo.12176190](https://doi.org/10.5281/zenodo.12176190) (cite the version you use)
|
|
152
|
+
- Laura, J., Acosta, A., Addair, T., et al. (2023). Integrated Software for Imagers and Spectrometers (ISIS) 7.2.0. Zenodo. [doi:10.5281/zenodo.7644616](https://doi.org/10.5281/zenodo.7644616) (cite the version you use)
|
|
153
|
+
- Acton, C. H. (1996). Ancillary data services of NASA's Navigation and Ancillary Information Facility. *Planetary and Space Science*, 44, 65-70. [doi:10.1016/0032-0633(95)00107-7](<https://doi.org/10.1016/0032-0633(95)00107-7>)
|
|
154
|
+
- Rouault, E., Warmerdam, F., Schwehr, K., et al. (2025). GDAL. Zenodo. [doi:10.5281/zenodo.5884351](https://doi.org/10.5281/zenodo.5884351)
|
|
155
|
+
- Raasveldt, M., & Muhleisen, H. (2019). DuckDB: an embeddable analytical database. *SIGMOD '19*, 1981-1984. [doi:10.1145/3299869.3320212](https://doi.org/10.1145/3299869.3320212)
|
|
156
|
+
|
|
157
|
+
### Instruments and missions
|
|
158
|
+
|
|
159
|
+
- Vondrak, R., Keller, J., Chin, G., & Garvin, J. (2010). Lunar Reconnaissance Orbiter (LRO): observations for lunar exploration and science. *Space Science Reviews*, 150, 7-22. [doi:10.1007/s11214-010-9631-5](https://doi.org/10.1007/s11214-010-9631-5)
|
|
160
|
+
- Robinson, M. S., Brylow, S. M., Tschimmel, M., et al. (2010). Lunar Reconnaissance Orbiter Camera (LROC) instrument overview. *Space Science Reviews*, 150, 81-124. [doi:10.1007/s11214-010-9634-2](https://doi.org/10.1007/s11214-010-9634-2)
|
|
161
|
+
- Humm, D. C., Tschimmel, M., Brylow, S. M., et al. (2016). Flight calibration of the LROC Narrow Angle Camera. *Space Science Reviews*, 200, 431-473. [doi:10.1007/s11214-015-0201-8](https://doi.org/10.1007/s11214-015-0201-8)
|
|
162
|
+
- Smith, D. E., Zuber, M. T., Jackson, G. B., et al. (2010). The Lunar Orbiter Laser Altimeter investigation on the Lunar Reconnaissance Orbiter mission. *Space Science Reviews*, 150, 209-241. [doi:10.1007/s11214-009-9512-y](https://doi.org/10.1007/s11214-009-9512-y)
|
|
163
|
+
- Robinson, M. S., Brylow, S. M., Caplinger, M. A., et al. (2023). ShadowCam instrument and investigation overview. *Journal of Astronomy and Space Sciences*, 40(4), 149-171. [doi:10.5140/JASS.2023.40.4.149](https://doi.org/10.5140/JASS.2023.40.4.149)
|
|
164
|
+
- Kato, M., Sasaki, S., Takizawa, Y., & the Kaguya project team (2010). The Kaguya mission overview. *Space Science Reviews*, 154, 3-19. [doi:10.1007/s11214-010-9678-3](https://doi.org/10.1007/s11214-010-9678-3)
|
|
165
|
+
- Haruyama, J., Matsunaga, T., Ohtake, M., et al. (2008). Global lunar-surface mapping experiment using the Lunar Imager/Spectrometer on SELENE. *Earth, Planets and Space*, 60, 243-255. [doi:10.1186/BF03352788](https://doi.org/10.1186/BF03352788)
|
|
166
|
+
- Ohtake, M., Haruyama, J., Matsunaga, T., et al. (2008). Performance and scientific objectives of the SELENE (KAGUYA) Multiband Imager. *Earth, Planets and Space*, 60, 257-264. [doi:10.1186/BF03352789](https://doi.org/10.1186/BF03352789)
|
|
167
|
+
|
|
168
|
+
### Topography
|
|
169
|
+
|
|
170
|
+
- Mazarico, E., Neumann, G. A., Smith, D. E., Zuber, M. T., & Torrence, M. H. (2011). Illumination conditions of the lunar polar regions using LOLA topography. *Icarus*, 211, 1066-1081. [doi:10.1016/j.icarus.2010.10.030](https://doi.org/10.1016/j.icarus.2010.10.030) (PGDA site numbering)
|
|
171
|
+
- Barker, M. K., Mazarico, E., Neumann, G. A., et al. (2021). Improved LOLA elevation maps for south pole landing sites: error estimates and their impact on illumination conditions. *Planetary and Space Science*, 203, 105119. [doi:10.1016/j.pss.2020.105119](https://doi.org/10.1016/j.pss.2020.105119)
|
|
172
|
+
- Henriksen, M. R., Manheim, M. R., Burns, K. N., et al. (2017). Extracting accurate and precise topography from LROC narrow angle camera stereo observations. *Icarus*, 283, 122-137. [doi:10.1016/j.icarus.2016.05.012](https://doi.org/10.1016/j.icarus.2016.05.012)
|
|
173
|
+
- Bertone, S., Barker, M., Mazarico, E., McKenna, T., & Petro, N. (2026). Enhanced topography models for selected lunar south pole regions with shape-from-shading. *The Planetary Science Journal*, 7, 118. [doi:10.3847/PSJ/ae5b70](https://doi.org/10.3847/PSJ/ae5b70). Data: [doi:10.5281/zenodo.17954508](https://doi.org/10.5281/zenodo.17954508)
|
|
174
|
+
|
|
175
|
+
## License
|
|
176
|
+
|
|
177
|
+
BSD 3-Clause. See [LICENSE](LICENSE).
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
[](https://github.com/alexmaietta/lunar-toolkit/actions/workflows/ci.yml)
|
|
2
|
+
[](https://alexmaietta.github.io/lunar-toolkit/coverage/)
|
|
3
|
+
[](https://pypi.org/project/lunar-toolkit/)
|
|
4
|
+
[](LICENSE)
|
|
5
|
+
|
|
6
|
+
# Lunar Toolkit
|
|
7
|
+
|
|
8
|
+
Lunar Toolkit finds, downloads and processes lunar orbital imagery and turns it into DEMs.
|
|
9
|
+
|
|
10
|
+
It builds a searchable index of LROC images whose footprint search also works near the poles, finds ShadowCam, LROC and Kaguya products through the PDS Orbital Data Explorer, imports images into [ISIS](https://isis.astrogeology.usgs.gov/), and builds stereo and shape-from-shading (SfS) DEMs with the [Ames Stereo Pipeline](https://stereopipeline.readthedocs.io/) through configurable, reproducible pipelines. A desktop app browses the index, ODE, footprints and full-resolution images.
|
|
11
|
+
|
|
12
|
+
See our [latest documentation](https://alexmaietta.github.io/lunar-toolkit/) for guides, the CLI reference and the API.
|
|
13
|
+
|
|
14
|
+
## Install
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
pip install lunar-toolkit
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Python 3.10+. DEM and image-processing commands also need ISIS and the Ames Stereo Pipeline ([setup](https://alexmaietta.github.io/lunar-toolkit/dems/#setup)), or use the all-in-one Docker image (`docker build -t lunar-toolkit .`, see [Install](https://alexmaietta.github.io/lunar-toolkit/install/)).
|
|
21
|
+
|
|
22
|
+
## Quick start
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
lunar build-db edr # local LROC EDR index (~3.8 GB download)
|
|
26
|
+
lunar search --point -85.98 -0.26 --radius-km 2 --nac-only
|
|
27
|
+
lunar download M165993756LE --output-dir raw
|
|
28
|
+
lunar app # desktop app with search, footprints, images and settings
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Commands
|
|
32
|
+
|
|
33
|
+
| Command | Description |
|
|
34
|
+
|---|---|
|
|
35
|
+
| `build-db` | Build or update the local LROC index (EDR, CDR, RDR) |
|
|
36
|
+
| `search` | Footprint search of the index by box, point + radius or AOI polygon |
|
|
37
|
+
| `query` | Print metadata for product IDs |
|
|
38
|
+
| `download` | Download LROC EDR / CDR images |
|
|
39
|
+
| `ode-search` | Search ShadowCam, LROC and Kaguya products on ODE |
|
|
40
|
+
| `pairs` | Rank NAC stereo pairs or pick illumination-diverse SfS images |
|
|
41
|
+
| `process` | Calibrate and map-project NAC images with ISIS |
|
|
42
|
+
| `kaguya` | Import Kaguya TC / MI images into ISIS with CSM cameras |
|
|
43
|
+
| `shadowcam` | Prepare ShadowCam cubes with SPICE and CSM cameras |
|
|
44
|
+
| `stereo` | DEM from a NAC stereo pair |
|
|
45
|
+
| `sfs` | Shape-from-shading DEM from a YAML config or flags |
|
|
46
|
+
| `sfs-report` | Metrics, figures and an HTML report for an SfS run |
|
|
47
|
+
| `workspace` | SQL over a run's DuckDB workspace (footprints, bundle-adjust stats) |
|
|
48
|
+
| `reference` | Artemis III regions, PGDA LOLA DEMs and published SfS DEMs |
|
|
49
|
+
| `app` / `serve` | The desktop app, or the same page served to a browser |
|
|
50
|
+
|
|
51
|
+
Every option is in the [CLI reference](https://alexmaietta.github.io/lunar-toolkit/cli/).
|
|
52
|
+
|
|
53
|
+
## Python
|
|
54
|
+
|
|
55
|
+
```python
|
|
56
|
+
from lunar_toolkit import CumIndex, NacImage
|
|
57
|
+
|
|
58
|
+
ci = CumIndex() # the local EDR index
|
|
59
|
+
df = ci.search(point=(-85.98, -0.26), radius_km=2, nac_only=True)
|
|
60
|
+
print(len(df), "NAC images within 2 km of Malapert")
|
|
61
|
+
|
|
62
|
+
img = NacImage(df.iloc[0]["PRODUCT_ID"])
|
|
63
|
+
print(img.product_id, img.start_time, img.pixel_scale, img.incidence_angle, img.sub_solar_azimuth)
|
|
64
|
+
print(img.edr_url)
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
More in the [API reference](https://alexmaietta.github.io/lunar-toolkit/api/cumindex/).
|
|
68
|
+
|
|
69
|
+
## Development
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
pip install -e ".[dev]"
|
|
73
|
+
pre-commit install
|
|
74
|
+
pytest
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Acknowledgements
|
|
78
|
+
|
|
79
|
+
This toolkit only wraps and indexes the work of others.
|
|
80
|
+
|
|
81
|
+
| What | Provided by |
|
|
82
|
+
|---|---|
|
|
83
|
+
| LROC NAC and WAC images | [Lunar Reconnaissance Orbiter Camera](https://www.lroc.asu.edu/) team, Arizona State University |
|
|
84
|
+
| ShadowCam images | [ShadowCam](https://www.shadowcam.asu.edu/) team (Arizona State University and Malin Space Science Systems), a NASA instrument on KARI's Korea Pathfinder Lunar Orbiter (Danuri) |
|
|
85
|
+
| Kaguya Terrain Camera and Multiband Imager images | JAXA [SELENE (Kaguya)](https://www.selene.jaxa.jp/) teams, distributed through JAXA's [DARTS](https://darts.isas.jaxa.jp/) archive |
|
|
86
|
+
| Data archives and search | NASA Planetary Data System [Imaging Node](https://pds-imaging.jpl.nasa.gov/), and the Geosciences Node's [Orbital Data Explorer](https://ode.rsl.wustl.edu/moon/) |
|
|
87
|
+
| LOLA 5 m site DEMs | LOLA team, NASA GSFC [Planetary Geodesy Data Archive](https://pgda.gsfc.nasa.gov/products/78) |
|
|
88
|
+
| Published SfS DEMs and the SfS workflow | Bertone et al. and the NASA GSFC LuNaMaps / Artemis III work, on [Zenodo](https://doi.org/10.5281/zenodo.17954508) |
|
|
89
|
+
| [ISIS](https://isis.astrogeology.usgs.gov/) and [ALE](https://github.com/DOI-USGS/ale) | USGS Astrogeology Science Center |
|
|
90
|
+
| [Ames Stereo Pipeline](https://stereopipeline.readthedocs.io/) | NASA Ames Research Center |
|
|
91
|
+
| [SPICE](https://naif.jpl.nasa.gov/) | NASA Navigation and Ancillary Information Facility (NAIF) |
|
|
92
|
+
| [GDAL](https://gdal.org/) and [DuckDB](https://duckdb.org/) | their open-source communities |
|
|
93
|
+
|
|
94
|
+
Please cite the instruments, data sets and software below when you publish results made with them.
|
|
95
|
+
|
|
96
|
+
## References
|
|
97
|
+
|
|
98
|
+
### Software
|
|
99
|
+
|
|
100
|
+
- Beyer, R. A., Alexandrov, O., & McMichael, S. (2018). The Ames Stereo Pipeline: NASA's open source software for deriving and processing terrain data. *Earth and Space Science*, 5, 537-548. [doi:10.1029/2018EA000409](https://doi.org/10.1029/2018EA000409)
|
|
101
|
+
- Alexandrov, O., & Beyer, R. A. (2018). Multiview shape-from-shading for planetary images. *Earth and Space Science*, 5, 652-666. [doi:10.1029/2018EA000390](https://doi.org/10.1029/2018EA000390)
|
|
102
|
+
- Alexandrov, O., McMichael, S., Broxton, M., et al. (2024). NeoGeographyToolkit/StereoPipeline: ASP 3.4.0. Zenodo. [doi:10.5281/zenodo.12176190](https://doi.org/10.5281/zenodo.12176190) (cite the version you use)
|
|
103
|
+
- Laura, J., Acosta, A., Addair, T., et al. (2023). Integrated Software for Imagers and Spectrometers (ISIS) 7.2.0. Zenodo. [doi:10.5281/zenodo.7644616](https://doi.org/10.5281/zenodo.7644616) (cite the version you use)
|
|
104
|
+
- Acton, C. H. (1996). Ancillary data services of NASA's Navigation and Ancillary Information Facility. *Planetary and Space Science*, 44, 65-70. [doi:10.1016/0032-0633(95)00107-7](<https://doi.org/10.1016/0032-0633(95)00107-7>)
|
|
105
|
+
- Rouault, E., Warmerdam, F., Schwehr, K., et al. (2025). GDAL. Zenodo. [doi:10.5281/zenodo.5884351](https://doi.org/10.5281/zenodo.5884351)
|
|
106
|
+
- Raasveldt, M., & Muhleisen, H. (2019). DuckDB: an embeddable analytical database. *SIGMOD '19*, 1981-1984. [doi:10.1145/3299869.3320212](https://doi.org/10.1145/3299869.3320212)
|
|
107
|
+
|
|
108
|
+
### Instruments and missions
|
|
109
|
+
|
|
110
|
+
- Vondrak, R., Keller, J., Chin, G., & Garvin, J. (2010). Lunar Reconnaissance Orbiter (LRO): observations for lunar exploration and science. *Space Science Reviews*, 150, 7-22. [doi:10.1007/s11214-010-9631-5](https://doi.org/10.1007/s11214-010-9631-5)
|
|
111
|
+
- Robinson, M. S., Brylow, S. M., Tschimmel, M., et al. (2010). Lunar Reconnaissance Orbiter Camera (LROC) instrument overview. *Space Science Reviews*, 150, 81-124. [doi:10.1007/s11214-010-9634-2](https://doi.org/10.1007/s11214-010-9634-2)
|
|
112
|
+
- Humm, D. C., Tschimmel, M., Brylow, S. M., et al. (2016). Flight calibration of the LROC Narrow Angle Camera. *Space Science Reviews*, 200, 431-473. [doi:10.1007/s11214-015-0201-8](https://doi.org/10.1007/s11214-015-0201-8)
|
|
113
|
+
- Smith, D. E., Zuber, M. T., Jackson, G. B., et al. (2010). The Lunar Orbiter Laser Altimeter investigation on the Lunar Reconnaissance Orbiter mission. *Space Science Reviews*, 150, 209-241. [doi:10.1007/s11214-009-9512-y](https://doi.org/10.1007/s11214-009-9512-y)
|
|
114
|
+
- Robinson, M. S., Brylow, S. M., Caplinger, M. A., et al. (2023). ShadowCam instrument and investigation overview. *Journal of Astronomy and Space Sciences*, 40(4), 149-171. [doi:10.5140/JASS.2023.40.4.149](https://doi.org/10.5140/JASS.2023.40.4.149)
|
|
115
|
+
- Kato, M., Sasaki, S., Takizawa, Y., & the Kaguya project team (2010). The Kaguya mission overview. *Space Science Reviews*, 154, 3-19. [doi:10.1007/s11214-010-9678-3](https://doi.org/10.1007/s11214-010-9678-3)
|
|
116
|
+
- Haruyama, J., Matsunaga, T., Ohtake, M., et al. (2008). Global lunar-surface mapping experiment using the Lunar Imager/Spectrometer on SELENE. *Earth, Planets and Space*, 60, 243-255. [doi:10.1186/BF03352788](https://doi.org/10.1186/BF03352788)
|
|
117
|
+
- Ohtake, M., Haruyama, J., Matsunaga, T., et al. (2008). Performance and scientific objectives of the SELENE (KAGUYA) Multiband Imager. *Earth, Planets and Space*, 60, 257-264. [doi:10.1186/BF03352789](https://doi.org/10.1186/BF03352789)
|
|
118
|
+
|
|
119
|
+
### Topography
|
|
120
|
+
|
|
121
|
+
- Mazarico, E., Neumann, G. A., Smith, D. E., Zuber, M. T., & Torrence, M. H. (2011). Illumination conditions of the lunar polar regions using LOLA topography. *Icarus*, 211, 1066-1081. [doi:10.1016/j.icarus.2010.10.030](https://doi.org/10.1016/j.icarus.2010.10.030) (PGDA site numbering)
|
|
122
|
+
- Barker, M. K., Mazarico, E., Neumann, G. A., et al. (2021). Improved LOLA elevation maps for south pole landing sites: error estimates and their impact on illumination conditions. *Planetary and Space Science*, 203, 105119. [doi:10.1016/j.pss.2020.105119](https://doi.org/10.1016/j.pss.2020.105119)
|
|
123
|
+
- Henriksen, M. R., Manheim, M. R., Burns, K. N., et al. (2017). Extracting accurate and precise topography from LROC narrow angle camera stereo observations. *Icarus*, 283, 122-137. [doi:10.1016/j.icarus.2016.05.012](https://doi.org/10.1016/j.icarus.2016.05.012)
|
|
124
|
+
- Bertone, S., Barker, M., Mazarico, E., McKenna, T., & Petro, N. (2026). Enhanced topography models for selected lunar south pole regions with shape-from-shading. *The Planetary Science Journal*, 7, 118. [doi:10.3847/PSJ/ae5b70](https://doi.org/10.3847/PSJ/ae5b70). Data: [doi:10.5281/zenodo.17954508](https://doi.org/10.5281/zenodo.17954508)
|
|
125
|
+
|
|
126
|
+
## License
|
|
127
|
+
|
|
128
|
+
BSD 3-Clause. See [LICENSE](LICENSE).
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"""Find, download and process lunar orbital imagery and build DEMs with ISIS + ASP."""
|
|
2
|
+
|
|
3
|
+
from .downloader import PdsDownloader
|
|
4
|
+
from .lroc import CumIndex, NacImage, NacImageCollection, NacProcessor
|
|
5
|
+
|
|
6
|
+
__all__ = ["CumIndex", "NacImage", "NacImageCollection", "NacProcessor", "PdsDownloader"]
|