Skip to content

Commit b9564e0

Browse files
committed
lunch break readme update
1 parent f0f84c3 commit b9564e0

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed

README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
### What is this?
2+
3+
A small Python package aimed at extracting cutouts of Lunar craters from a larger dataset of Lunar elevation. The dataset is an 8 GB [digital elevation model](https://astrogeology.usgs.gov/search/map/Moon/LRO/LOLA/Lunar_LRO_LOLA_Global_LDEM_118m_Mar2014) based on the Lunar Orbiter Laser Altimeter (LOLA) data from NASA's Lunar Reconnaissance Orbiter spacecraft.
4+
5+
### What can it do?
6+
7+
For example, it can make a cutout around the Tycho crater and warp it to get rid of projection errors (i.e. craters are circles, not ellipses), saving it into a .tif file:
8+
9+
```python
10+
from moon import io as mio
11+
12+
mio.crater_cutout('tycho', destNameOrDestDS="tycho.tif", format="GTIFF")
13+
```
14+
15+
Or a `flask` server can be started, serving the `.tif` cutouts via a (rudimentary) simple API:
16+
17+
`export FLASK_APP=lunar_api.py; python -m flask run` (server side)
18+
19+
`curl http://127.0.0.1:5000/craters\?name=tycho --output tycho.tif` (client side)
20+
21+
Open and plot the elevation with `rasterio`:
22+
23+
```python
24+
import rasterio
25+
import rasterio.plot as rioplot
26+
import matplotlib.pyplot as plt
27+
28+
dem = rasterio.open('tycho.tif')
29+
ax = rioplot.show(dem, title='Tycho crater')
30+
ax.set_xlabel('meters')
31+
ax.set_ylabel('meters')
32+
```
33+
34+
![Tycho crater](https://github.com/vlas-sokolov/moon/blob/master/figures/tycho.png)
35+
36+
### References
37+
38+
- Explanation and full list of data references for LOLA dataset: [link](https://astrogeology.usgs.gov/search/map/Moon/LRO/LOLA/Lunar_LRO_LOLA_Global_LDEM_118m_Mar2014)
39+
- Tables of Lunar features come from the International Astronomical Union Planetary Gazetteer: can be downloaded as .csv [here](https://planetarynames.wr.usgs.gov/), with a good read on all the history behind the moon feature naming [here](https://the-moon.us/wiki/IAU_nomenclature)

figures/tycho.png

194 KB
Loading

webcache/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

0 commit comments

Comments
 (0)