feature(helioviewer): add documentation about sources to the script and update the readme
This commit is contained in:
@@ -6,6 +6,7 @@ Holt ein Sonnen-Vollscheibenbild von Helioviewer zu einem Zeitpunkt.
|
||||
Beispiel:
|
||||
./helioviewer_grab.py 2026-08-12T18:18:00Z hmi_continuum
|
||||
./helioviewer_grab.py --list
|
||||
./helioviewer_grab.py --sources
|
||||
"""
|
||||
|
||||
import json
|
||||
@@ -15,6 +16,26 @@ import urllib.request
|
||||
|
||||
API = "https://api.helioviewer.org/v2"
|
||||
|
||||
# Kuratierte Kurzerklaerung der gebraeuchlichsten Quellen (sourceId -> Text).
|
||||
# Nur eine Auswahl, keine vollstaendige Doku -- fuer alle IDs siehe --list.
|
||||
SOURCE_INFO = {
|
||||
8: "AIA 94 - hot flare plasma (~6 MK)",
|
||||
9: "AIA 131 - flaring regions (~10 MK)",
|
||||
10: "AIA 171 - quiet corona, coronal loops (~0.8 MK)",
|
||||
11: "AIA 193 - corona, coronal holes (~1.2 MK)",
|
||||
12: "AIA 211 - active region corona (~2 MK)",
|
||||
13: "AIA 304 - chromosphere/transition region, prominences (~0.05 MK)",
|
||||
14: "AIA 335 - active region corona (~2.5 MK)",
|
||||
15: "AIA 1600 - upper photosphere/transition region, flare ribbons",
|
||||
16: "AIA 1700 - photosphere/temperature minimum",
|
||||
17: "AIA 4500 - near-visible continuum, sunspots",
|
||||
18: "HMI continuum - white-light photosphere: sunspots, granulation "
|
||||
"(highest full-disk resolution, 0.5\"/px)",
|
||||
19: "HMI magnetogram - photospheric magnetic field map",
|
||||
94: "GONG H-alpha - chromosphere: filaments, plage, flare ribbons "
|
||||
"(ground-based network)",
|
||||
}
|
||||
|
||||
|
||||
def call(endpoint, **params):
|
||||
"""GET auf die Helioviewer-API. Gibt (content_type, bytes) zurueck."""
|
||||
@@ -64,6 +85,11 @@ def main():
|
||||
print(f"{sid:4d} {'/'.join(path):40s} {nick}")
|
||||
return
|
||||
|
||||
if "--sources" in sys.argv:
|
||||
for sid, desc in sorted(SOURCE_INFO.items()):
|
||||
print(f"{sid:4d} {desc}")
|
||||
return
|
||||
|
||||
date = sys.argv[1] if len(sys.argv) > 1 else "2026-08-12T18:18:00Z"
|
||||
what = sys.argv[2] if len(sys.argv) > 2 else "continuum"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user