lunar-toolkit 0.1.0__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.
Files changed (94) hide show
  1. lunar_toolkit-0.1.0/LICENSE +28 -0
  2. lunar_toolkit-0.1.0/PKG-INFO +180 -0
  3. lunar_toolkit-0.1.0/README.md +131 -0
  4. lunar_toolkit-0.1.0/lunar_toolkit/__init__.py +6 -0
  5. lunar_toolkit-0.1.0/lunar_toolkit/asp.py +451 -0
  6. lunar_toolkit-0.1.0/lunar_toolkit/cli/__init__.py +88 -0
  7. lunar_toolkit-0.1.0/lunar_toolkit/cli/_jobs.py +437 -0
  8. lunar_toolkit-0.1.0/lunar_toolkit/cli/_status.py +368 -0
  9. lunar_toolkit-0.1.0/lunar_toolkit/cli/_utils.py +128 -0
  10. lunar_toolkit-0.1.0/lunar_toolkit/cli/app.py +229 -0
  11. lunar_toolkit-0.1.0/lunar_toolkit/cli/build_db.py +130 -0
  12. lunar_toolkit-0.1.0/lunar_toolkit/cli/download.py +111 -0
  13. lunar_toolkit-0.1.0/lunar_toolkit/cli/kaguya.py +253 -0
  14. lunar_toolkit-0.1.0/lunar_toolkit/cli/ode_search.py +144 -0
  15. lunar_toolkit-0.1.0/lunar_toolkit/cli/pairs.py +236 -0
  16. lunar_toolkit-0.1.0/lunar_toolkit/cli/process.py +138 -0
  17. lunar_toolkit-0.1.0/lunar_toolkit/cli/query.py +70 -0
  18. lunar_toolkit-0.1.0/lunar_toolkit/cli/reference.py +233 -0
  19. lunar_toolkit-0.1.0/lunar_toolkit/cli/search.py +90 -0
  20. lunar_toolkit-0.1.0/lunar_toolkit/cli/serve.py +719 -0
  21. lunar_toolkit-0.1.0/lunar_toolkit/cli/sfs.py +344 -0
  22. lunar_toolkit-0.1.0/lunar_toolkit/cli/sfs_report.py +148 -0
  23. lunar_toolkit-0.1.0/lunar_toolkit/cli/shadowcam.py +246 -0
  24. lunar_toolkit-0.1.0/lunar_toolkit/cli/stereo.py +85 -0
  25. lunar_toolkit-0.1.0/lunar_toolkit/cli/workspace.py +84 -0
  26. lunar_toolkit-0.1.0/lunar_toolkit/config.py +345 -0
  27. lunar_toolkit-0.1.0/lunar_toolkit/constants.py +217 -0
  28. lunar_toolkit-0.1.0/lunar_toolkit/csm.py +340 -0
  29. lunar_toolkit-0.1.0/lunar_toolkit/downloader.py +447 -0
  30. lunar_toolkit-0.1.0/lunar_toolkit/geometry.py +556 -0
  31. lunar_toolkit-0.1.0/lunar_toolkit/isis.py +222 -0
  32. lunar_toolkit-0.1.0/lunar_toolkit/kaguya/__init__.py +45 -0
  33. lunar_toolkit-0.1.0/lunar_toolkit/kaguya/mi.py +274 -0
  34. lunar_toolkit-0.1.0/lunar_toolkit/kaguya/tc.py +370 -0
  35. lunar_toolkit-0.1.0/lunar_toolkit/lroc/__init__.py +6 -0
  36. lunar_toolkit-0.1.0/lunar_toolkit/lroc/cumindex.py +1197 -0
  37. lunar_toolkit-0.1.0/lunar_toolkit/lroc/nac.py +702 -0
  38. lunar_toolkit-0.1.0/lunar_toolkit/observation.py +127 -0
  39. lunar_toolkit-0.1.0/lunar_toolkit/ode.py +485 -0
  40. lunar_toolkit-0.1.0/lunar_toolkit/provenance.py +312 -0
  41. lunar_toolkit-0.1.0/lunar_toolkit/reference.py +1111 -0
  42. lunar_toolkit-0.1.0/lunar_toolkit/selection.py +714 -0
  43. lunar_toolkit-0.1.0/lunar_toolkit/sfs.py +1559 -0
  44. lunar_toolkit-0.1.0/lunar_toolkit/sfs_products.py +676 -0
  45. lunar_toolkit-0.1.0/lunar_toolkit/sfs_report.py +1328 -0
  46. lunar_toolkit-0.1.0/lunar_toolkit/shadowcam/__init__.py +29 -0
  47. lunar_toolkit-0.1.0/lunar_toolkit/shadowcam/sc.py +392 -0
  48. lunar_toolkit-0.1.0/lunar_toolkit/static/basemaps/lola_dem_global.tif +0 -0
  49. lunar_toolkit-0.1.0/lunar_toolkit/static/basemaps/lola_dem_north.tif +0 -0
  50. lunar_toolkit-0.1.0/lunar_toolkit/static/basemaps/lola_dem_south.tif +0 -0
  51. lunar_toolkit-0.1.0/lunar_toolkit/static/basemaps/lola_shade_global.jpg +0 -0
  52. lunar_toolkit-0.1.0/lunar_toolkit/static/basemaps/lola_shade_north.jpg +0 -0
  53. lunar_toolkit-0.1.0/lunar_toolkit/static/basemaps/lola_shade_south.jpg +0 -0
  54. lunar_toolkit-0.1.0/lunar_toolkit/static/basemaps/manifest.json +11 -0
  55. lunar_toolkit-0.1.0/lunar_toolkit/static/basemaps/wac_global.jpg +0 -0
  56. lunar_toolkit-0.1.0/lunar_toolkit/static/basemaps/wac_north.jpg +0 -0
  57. lunar_toolkit-0.1.0/lunar_toolkit/static/basemaps/wac_south.jpg +0 -0
  58. lunar_toolkit-0.1.0/lunar_toolkit/static/index.html +4197 -0
  59. lunar_toolkit-0.1.0/lunar_toolkit/stereo.py +519 -0
  60. lunar_toolkit-0.1.0/lunar_toolkit/stereo_dem.py +145 -0
  61. lunar_toolkit-0.1.0/lunar_toolkit/tools.py +264 -0
  62. lunar_toolkit-0.1.0/lunar_toolkit/workspace.py +1173 -0
  63. lunar_toolkit-0.1.0/lunar_toolkit.egg-info/PKG-INFO +180 -0
  64. lunar_toolkit-0.1.0/lunar_toolkit.egg-info/SOURCES.txt +92 -0
  65. lunar_toolkit-0.1.0/lunar_toolkit.egg-info/dependency_links.txt +1 -0
  66. lunar_toolkit-0.1.0/lunar_toolkit.egg-info/entry_points.txt +2 -0
  67. lunar_toolkit-0.1.0/lunar_toolkit.egg-info/requires.txt +31 -0
  68. lunar_toolkit-0.1.0/lunar_toolkit.egg-info/top_level.txt +1 -0
  69. lunar_toolkit-0.1.0/pyproject.toml +112 -0
  70. lunar_toolkit-0.1.0/setup.cfg +4 -0
  71. lunar_toolkit-0.1.0/tests/test_aoi.py +301 -0
  72. lunar_toolkit-0.1.0/tests/test_app.py +503 -0
  73. lunar_toolkit-0.1.0/tests/test_build.py +184 -0
  74. lunar_toolkit-0.1.0/tests/test_config.py +365 -0
  75. lunar_toolkit-0.1.0/tests/test_csm.py +230 -0
  76. lunar_toolkit-0.1.0/tests/test_download.py +267 -0
  77. lunar_toolkit-0.1.0/tests/test_footprints.py +148 -0
  78. lunar_toolkit-0.1.0/tests/test_integration.py +251 -0
  79. lunar_toolkit-0.1.0/tests/test_kaguya.py +189 -0
  80. lunar_toolkit-0.1.0/tests/test_kaguya_mi.py +179 -0
  81. lunar_toolkit-0.1.0/tests/test_lbl.py +61 -0
  82. lunar_toolkit-0.1.0/tests/test_ode.py +109 -0
  83. lunar_toolkit-0.1.0/tests/test_reference.py +510 -0
  84. lunar_toolkit-0.1.0/tests/test_selection.py +255 -0
  85. lunar_toolkit-0.1.0/tests/test_sfs.py +739 -0
  86. lunar_toolkit-0.1.0/tests/test_sfs_products.py +270 -0
  87. lunar_toolkit-0.1.0/tests/test_sfs_report.py +322 -0
  88. lunar_toolkit-0.1.0/tests/test_shadowcam.py +199 -0
  89. lunar_toolkit-0.1.0/tests/test_static.py +140 -0
  90. lunar_toolkit-0.1.0/tests/test_stereo.py +258 -0
  91. lunar_toolkit-0.1.0/tests/test_tool_env.py +32 -0
  92. lunar_toolkit-0.1.0/tests/test_tools.py +319 -0
  93. lunar_toolkit-0.1.0/tests/test_update.py +98 -0
  94. lunar_toolkit-0.1.0/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,180 @@
1
+ Metadata-Version: 2.4
2
+ Name: lunar-toolkit
3
+ Version: 0.1.0
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>=1.6; extra == "docs"
46
+ Requires-Dist: mkdocs-gen-files; extra == "docs"
47
+ Requires-Dist: mkdocstrings[python]; extra == "docs"
48
+ Dynamic: license-file
49
+
50
+ [![pipeline](https://img.shields.io/github/actions/workflow/status/alexmaietta/lunar-toolkit/ci.yml?branch=main&label=pipeline)](https://github.com/alexmaietta/lunar-toolkit/actions/workflows/ci.yml)
51
+ [![coverage](https://img.shields.io/endpoint?url=https://alexmaietta.github.io/lunar-toolkit/coverage/badge.json)](https://alexmaietta.github.io/lunar-toolkit/coverage/)
52
+ [![pypi](https://img.shields.io/pypi/v/lunar-toolkit)](https://pypi.org/project/lunar-toolkit/)
53
+ [![license](https://img.shields.io/badge/license-BSD_3--Clause-blue)](LICENSE)
54
+ [![app](https://img.shields.io/badge/app-open_in_browser-yellow)](https://alexmaietta.github.io/lunar-toolkit/browser/)
55
+
56
+ # Lunar Toolkit
57
+
58
+ ![Lunar Toolkit app](https://raw.githubusercontent.com/alexmaietta/lunar-toolkit/main/docs/images/hero.png)
59
+
60
+ Lunar Toolkit finds, downloads and processes lunar orbital imagery and turns it into DEMs.
61
+
62
+ 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.
63
+
64
+ See our [latest documentation](https://alexmaietta.github.io/lunar-toolkit/) for guides, the CLI reference and the API.
65
+
66
+ ## Install
67
+
68
+ ```bash
69
+ pip install lunar-toolkit
70
+ ```
71
+
72
+ 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 pull ghcr.io/alexmaietta/lunar-toolkit`, see [Install](https://alexmaietta.github.io/lunar-toolkit/install/)).
73
+
74
+ ## Quick start
75
+
76
+ ```bash
77
+ lunar build-db edr # local LROC EDR index (~3.8 GB download)
78
+ lunar search --point -85.98 -0.26 --radius-km 2 --nac-only
79
+ lunar download M165993756LE --output-dir raw
80
+ lunar app # desktop app with search, footprints, images and settings
81
+ ```
82
+
83
+ ## Commands
84
+
85
+ | Command | Description |
86
+ |---|---|
87
+ | `build-db` | Build or update the local LROC index (EDR, CDR, RDR) |
88
+ | `search` | Footprint search of the index by box, point + radius or AOI polygon |
89
+ | `query` | Print metadata for product IDs |
90
+ | `download` | Download LROC EDR / CDR images |
91
+ | `ode-search` | Search ShadowCam, LROC and Kaguya products on ODE |
92
+ | `pairs` | Rank NAC stereo pairs or pick illumination-diverse SfS images |
93
+ | `process` | Calibrate and map-project NAC images with ISIS |
94
+ | `kaguya` | Import Kaguya TC / MI images into ISIS with CSM cameras |
95
+ | `shadowcam` | Prepare ShadowCam cubes with SPICE and CSM cameras |
96
+ | `stereo` | DEM from a NAC stereo pair |
97
+ | `sfs` | Shape-from-shading DEM from a YAML config or flags |
98
+ | `sfs-report` | Metrics, figures and an HTML report for an SfS run |
99
+ | `workspace` | SQL over a run's DuckDB workspace (footprints, bundle-adjust stats) |
100
+ | `reference` | Artemis III regions, PGDA LOLA DEMs and published SfS DEMs |
101
+ | `app` / `serve` | The desktop app, or the same page served to a browser |
102
+
103
+ Every option is in the [CLI reference](https://alexmaietta.github.io/lunar-toolkit/cli/).
104
+
105
+ ## Python
106
+
107
+ ```python
108
+ from lunar_toolkit import CumIndex, NacImage
109
+
110
+ ci = CumIndex() # the local EDR index
111
+ df = ci.search(point=(-85.98, -0.26), radius_km=2, nac_only=True)
112
+ print(len(df), "NAC images within 2 km of Malapert")
113
+
114
+ img = NacImage(df.iloc[0]["PRODUCT_ID"])
115
+ print(img.product_id, img.start_time, img.pixel_scale, img.incidence_angle, img.sub_solar_azimuth)
116
+ print(img.edr_url)
117
+ ```
118
+
119
+ More in the [API reference](https://alexmaietta.github.io/lunar-toolkit/api/cumindex/).
120
+
121
+ ## Development
122
+
123
+ ```bash
124
+ pip install -e ".[dev]"
125
+ pre-commit install
126
+ pytest
127
+ ```
128
+
129
+ ## Acknowledgements
130
+
131
+ This toolkit only wraps and indexes the work of others.
132
+
133
+ | What | Provided by |
134
+ |---|---|
135
+ | LROC NAC and WAC images | [Lunar Reconnaissance Orbiter Camera](https://www.lroc.asu.edu/) team, Arizona State University |
136
+ | 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) |
137
+ | 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 |
138
+ | 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/) |
139
+ | LOLA 5 m site DEMs | LOLA team, NASA GSFC [Planetary Geodesy Data Archive](https://pgda.gsfc.nasa.gov/products/78) |
140
+ | 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) |
141
+ | [ISIS](https://isis.astrogeology.usgs.gov/) and [ALE](https://github.com/DOI-USGS/ale) | USGS Astrogeology Science Center |
142
+ | [Ames Stereo Pipeline](https://stereopipeline.readthedocs.io/) | NASA Ames Research Center |
143
+ | [SPICE](https://naif.jpl.nasa.gov/) | NASA Navigation and Ancillary Information Facility (NAIF) |
144
+ | [GDAL](https://gdal.org/) and [DuckDB](https://duckdb.org/) | their open-source communities |
145
+
146
+ Please cite the instruments, data sets and software below when you publish results made with them.
147
+
148
+ ## References
149
+
150
+ ### Software
151
+
152
+ - 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)
153
+ - 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)
154
+ - 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)
155
+ - 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)
156
+ - 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>)
157
+ - Rouault, E., Warmerdam, F., Schwehr, K., et al. (2025). GDAL. Zenodo. [doi:10.5281/zenodo.5884351](https://doi.org/10.5281/zenodo.5884351)
158
+ - 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)
159
+
160
+ ### Instruments and missions
161
+
162
+ - 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)
163
+ - 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)
164
+ - 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)
165
+ - 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)
166
+ - 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)
167
+ - 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)
168
+ - 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)
169
+ - 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)
170
+
171
+ ### Topography
172
+
173
+ - 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)
174
+ - 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)
175
+ - 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)
176
+ - 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)
177
+
178
+ ## License
179
+
180
+ BSD 3-Clause. See [LICENSE](LICENSE).
@@ -0,0 +1,131 @@
1
+ [![pipeline](https://img.shields.io/github/actions/workflow/status/alexmaietta/lunar-toolkit/ci.yml?branch=main&label=pipeline)](https://github.com/alexmaietta/lunar-toolkit/actions/workflows/ci.yml)
2
+ [![coverage](https://img.shields.io/endpoint?url=https://alexmaietta.github.io/lunar-toolkit/coverage/badge.json)](https://alexmaietta.github.io/lunar-toolkit/coverage/)
3
+ [![pypi](https://img.shields.io/pypi/v/lunar-toolkit)](https://pypi.org/project/lunar-toolkit/)
4
+ [![license](https://img.shields.io/badge/license-BSD_3--Clause-blue)](LICENSE)
5
+ [![app](https://img.shields.io/badge/app-open_in_browser-yellow)](https://alexmaietta.github.io/lunar-toolkit/browser/)
6
+
7
+ # Lunar Toolkit
8
+
9
+ ![Lunar Toolkit app](https://raw.githubusercontent.com/alexmaietta/lunar-toolkit/main/docs/images/hero.png)
10
+
11
+ Lunar Toolkit finds, downloads and processes lunar orbital imagery and turns it into DEMs.
12
+
13
+ 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.
14
+
15
+ See our [latest documentation](https://alexmaietta.github.io/lunar-toolkit/) for guides, the CLI reference and the API.
16
+
17
+ ## Install
18
+
19
+ ```bash
20
+ pip install lunar-toolkit
21
+ ```
22
+
23
+ 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 pull ghcr.io/alexmaietta/lunar-toolkit`, see [Install](https://alexmaietta.github.io/lunar-toolkit/install/)).
24
+
25
+ ## Quick start
26
+
27
+ ```bash
28
+ lunar build-db edr # local LROC EDR index (~3.8 GB download)
29
+ lunar search --point -85.98 -0.26 --radius-km 2 --nac-only
30
+ lunar download M165993756LE --output-dir raw
31
+ lunar app # desktop app with search, footprints, images and settings
32
+ ```
33
+
34
+ ## Commands
35
+
36
+ | Command | Description |
37
+ |---|---|
38
+ | `build-db` | Build or update the local LROC index (EDR, CDR, RDR) |
39
+ | `search` | Footprint search of the index by box, point + radius or AOI polygon |
40
+ | `query` | Print metadata for product IDs |
41
+ | `download` | Download LROC EDR / CDR images |
42
+ | `ode-search` | Search ShadowCam, LROC and Kaguya products on ODE |
43
+ | `pairs` | Rank NAC stereo pairs or pick illumination-diverse SfS images |
44
+ | `process` | Calibrate and map-project NAC images with ISIS |
45
+ | `kaguya` | Import Kaguya TC / MI images into ISIS with CSM cameras |
46
+ | `shadowcam` | Prepare ShadowCam cubes with SPICE and CSM cameras |
47
+ | `stereo` | DEM from a NAC stereo pair |
48
+ | `sfs` | Shape-from-shading DEM from a YAML config or flags |
49
+ | `sfs-report` | Metrics, figures and an HTML report for an SfS run |
50
+ | `workspace` | SQL over a run's DuckDB workspace (footprints, bundle-adjust stats) |
51
+ | `reference` | Artemis III regions, PGDA LOLA DEMs and published SfS DEMs |
52
+ | `app` / `serve` | The desktop app, or the same page served to a browser |
53
+
54
+ Every option is in the [CLI reference](https://alexmaietta.github.io/lunar-toolkit/cli/).
55
+
56
+ ## Python
57
+
58
+ ```python
59
+ from lunar_toolkit import CumIndex, NacImage
60
+
61
+ ci = CumIndex() # the local EDR index
62
+ df = ci.search(point=(-85.98, -0.26), radius_km=2, nac_only=True)
63
+ print(len(df), "NAC images within 2 km of Malapert")
64
+
65
+ img = NacImage(df.iloc[0]["PRODUCT_ID"])
66
+ print(img.product_id, img.start_time, img.pixel_scale, img.incidence_angle, img.sub_solar_azimuth)
67
+ print(img.edr_url)
68
+ ```
69
+
70
+ More in the [API reference](https://alexmaietta.github.io/lunar-toolkit/api/cumindex/).
71
+
72
+ ## Development
73
+
74
+ ```bash
75
+ pip install -e ".[dev]"
76
+ pre-commit install
77
+ pytest
78
+ ```
79
+
80
+ ## Acknowledgements
81
+
82
+ This toolkit only wraps and indexes the work of others.
83
+
84
+ | What | Provided by |
85
+ |---|---|
86
+ | LROC NAC and WAC images | [Lunar Reconnaissance Orbiter Camera](https://www.lroc.asu.edu/) team, Arizona State University |
87
+ | 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) |
88
+ | 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 |
89
+ | 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/) |
90
+ | LOLA 5 m site DEMs | LOLA team, NASA GSFC [Planetary Geodesy Data Archive](https://pgda.gsfc.nasa.gov/products/78) |
91
+ | 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) |
92
+ | [ISIS](https://isis.astrogeology.usgs.gov/) and [ALE](https://github.com/DOI-USGS/ale) | USGS Astrogeology Science Center |
93
+ | [Ames Stereo Pipeline](https://stereopipeline.readthedocs.io/) | NASA Ames Research Center |
94
+ | [SPICE](https://naif.jpl.nasa.gov/) | NASA Navigation and Ancillary Information Facility (NAIF) |
95
+ | [GDAL](https://gdal.org/) and [DuckDB](https://duckdb.org/) | their open-source communities |
96
+
97
+ Please cite the instruments, data sets and software below when you publish results made with them.
98
+
99
+ ## References
100
+
101
+ ### Software
102
+
103
+ - 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)
104
+ - 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)
105
+ - 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)
106
+ - 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)
107
+ - 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>)
108
+ - Rouault, E., Warmerdam, F., Schwehr, K., et al. (2025). GDAL. Zenodo. [doi:10.5281/zenodo.5884351](https://doi.org/10.5281/zenodo.5884351)
109
+ - 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)
110
+
111
+ ### Instruments and missions
112
+
113
+ - 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)
114
+ - 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)
115
+ - 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)
116
+ - 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)
117
+ - 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)
118
+ - 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)
119
+ - 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)
120
+ - 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)
121
+
122
+ ### Topography
123
+
124
+ - 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)
125
+ - 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)
126
+ - 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)
127
+ - 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)
128
+
129
+ ## License
130
+
131
+ 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"]