Debian Codegraph @

examples/list_hmi_series.py

raw
1 """
2 ==============================================
3 Print all HMI series and prime keys with notes
4 ==============================================
5
6 This example shows how to find and display the HMI series names, prime keys and corresponding notes.
7 """
8
9 import textwrap
10
11 import drms
12
13 ###############################################################################
14 # First we will create a `drms.Client`, using the JSOC baseurl.
15 client = drms.Client()
16
17 ###############################################################################
18 # Get all available HMI series and print their names, prime keys and notes.
19
20 hmi_series = client.series(regex=r"hmi\.", full=True)
21
22 # Print series names, prime-keys (pkeys) and notes
23 for series in hmi_series.index:
24 print("Series:", hmi_series.name[series])
25 print(" Notes:", (f"\n{8 * ' '}").join(textwrap.wrap(hmi_series.note[series])))