|
1 | | -# NASA Sky Data Prototype |
| 1 | +# NASA Sky Explorer Prototype |
2 | 2 |
|
3 | | -Prototype utilities for building an ESASky-like explorer backed exclusively by public NASA archives. The initial focus is on downloading survey cutouts and generating quick-look imagery from NASA's **SkyView** service, which federates data from multiple missions (DSS, GALEX, WISE, 2MASS, Fermi, ROSAT, etc.). |
| 3 | +A barebones FastAPI project that serves the landing page for the NASA Sky Explorer Prototype |
4 | 4 |
|
5 | | -## 🚀 Goals |
| 5 | +## Quickstart |
6 | 6 |
|
7 | | -- Help you discover NASA-managed astronomical data that can power a visual explorer. |
8 | | -- Provide a reproducible script that fetches science-ready survey tiles and converts them into PNG previews. |
9 | | -- Document next steps for evolving the prototype into a richer web or desktop application. |
| 7 | +1. Create a virtual environment and install the dependencies: |
10 | 8 |
|
11 | | -## 📡 Key NASA Data Sources |
| 9 | + ```bash |
| 10 | + python -m venv .venv |
| 11 | + source .venv/bin/activate |
| 12 | + pip install -r requirements.txt |
| 13 | + ``` |
12 | 14 |
|
13 | | -| Archive | What you get | Programmatic access | |
14 | | -| --- | --- | --- | |
15 | | -| [NASA SkyView](https://skyview.gsfc.nasa.gov/current/cgi/titlepage.pl) | On-the-fly projection of surveys (optical, IR, UV, X-ray, gamma) | HTTP service + [`astroquery.skyview`](https://astroquery.readthedocs.io/en/latest/skyview/skyview.html) | |
16 | | -| [Mikulski Archive for Space Telescopes (MAST)](https://archive.stsci.edu/) | HST, JWST, Kepler/K2, TESS, GALEX, etc. | [`astroquery.mast`](https://astroquery.readthedocs.io/en/latest/mast/mast.html) APIs | |
17 | | -| [High Energy Astrophysics Science Archive Research Center (HEASARC)](https://heasarc.gsfc.nasa.gov/docs/archive.html) | Chandra, XMM-Newton, Swift, Fermi, ROSAT, etc. | [`astroquery.heasarc`](https://astroquery.readthedocs.io/en/latest/heasarc/heasarc.html), TAP | |
18 | | -| [Planetary Data System (PDS)](https://pds.nasa.gov/) | Planetary mission data (images, spectra, telemetry) | [PDS Imaging Node APIs](https://pds-imaging.jpl.nasa.gov/help/), [PDS Search](https://pds.nasa.gov/services/search/) | |
19 | | -| [NASA/IPAC Infrared Science Archive (IRSA)](https://irsa.ipac.caltech.edu/frontpage/) | WISE/NEOWISE, Spitzer, 2MASS, Planck, etc. | [`astroquery.irsa`](https://astroquery.readthedocs.io/en/latest/irsa/irsa.html), VO TAP | |
20 | | -| [NASA Open Data Portal](https://data.nasa.gov/) | Curated datasets across NASA centers | REST API + CSV/JSON exports | |
| 15 | +2. Launch the development server: |
21 | 16 |
|
22 | | -> Some APIs (e.g. MAST, NASA Open APIs) require a free API key or authentication token. The SkyView service used in this prototype is fully open and anonymous. |
| 17 | + ```bash |
| 18 | + uvicorn src.server:app --reload |
| 19 | + ``` |
23 | 20 |
|
24 | | -## 🧭 Prototype walkthrough |
| 21 | +3. Open <http://127.0.0.1:8000/> in your browser to view the page titled **“Minimal FastAPI App.”** |
25 | 22 |
|
26 | | -### 1. Create an isolated environment |
| 23 | +## Project structure |
27 | 24 |
|
28 | | -```bash |
29 | | -python -m venv .venv |
30 | | -source .venv/bin/activate |
31 | | -pip install -r requirements.txt |
32 | 25 | ``` |
33 | | - |
34 | | -### 2. Fetch a survey cutout and generate a PNG |
35 | | - |
36 | | -The CLI accepts either a resolvable object name or explicit coordinates. A DSS2 Red cutout of the Whirlpool Galaxy at 0.4° scale can be generated with: |
37 | | - |
38 | | -```bash |
39 | | -python -m src.skyview_downloader --target "M51" --survey "DSS2 Red" --width 0.4 --pixels 800 |
40 | | -``` |
41 | | - |
42 | | -To target custom celestial coordinates in decimal degrees: |
43 | | - |
44 | | -```bash |
45 | | -python -m src.skyview_downloader --ra 201.3651 --dec -43.0191 --survey "WISE 3.4" --width 1.0 --pixels 1024 |
| 26 | +NASASpaceAppsChallenge2025/ |
| 27 | +├── requirements.txt # FastAPI and Uvicorn dependencies |
| 28 | +├── src/ |
| 29 | +│ ├── __init__.py |
| 30 | +│ └── server.py # FastAPI application serving the HTML page |
| 31 | +└── web/ |
| 32 | + └── index.html # Static HTML served at the root route |
46 | 33 | ``` |
47 | 34 |
|
48 | | -Outputs are written to `outputs/`: |
49 | | - |
50 | | -- `<target>-<survey>.fits` — the raw FITS cutout. |
51 | | -- `<target>-<survey>.png` — contrast-stretched preview (Astropy WCS axes, grayscale colormap). |
52 | | - |
53 | | -### 3. Spin up the interactive globe prototype |
54 | | - |
55 | | -Launch the FastAPI service, which proxies NASA's SkyView service and serves the front-end assets: |
56 | | - |
57 | | -```bash |
58 | | -uvicorn src.server:app --reload |
59 | | -``` |
60 | | - |
61 | | -Then open <http://127.0.0.1:8000/app> in your browser. Rotate the sphere with your mouse or trackpad, use the zoom buttons to adjust the field of view, and switch between surveys (DSS, WISE, GALEX, Fermi). Every interaction requests a fresh cutout from NASA SkyView, so you're always looking at live archival imagery. |
62 | | - |
63 | | -> The backend stores PNG tiles in `outputs/` to avoid re-downloading frequently requested fields. |
64 | | -
|
65 | | -### 4. Inspect available surveys |
66 | | - |
67 | | -NASA maintains the full survey catalogue at <https://skyview.gsfc.nasa.gov/current/cgi/survey.pl>. Any entry in the "Survey" column is compatible with the `--survey` option. |
| 35 | +Feel free to build on this foundation for richer APIs or interfaces. |
0 commit comments