Skip to content

Instantly share code, notes, and snippets.

@Raahul-Singh
Last active June 14, 2020 23:15
Show Gist options
  • Save Raahul-Singh/572f2b8b10d988f339ae9caf61445c72 to your computer and use it in GitHub Desktop.
Save Raahul-Singh/572f2b8b10d988f339ae9caf61445c72 to your computer and use it in GitHub Desktop.
Pythia Examples : get_observations_from_hek
def get_observations_from_hek(self, obsdate: str, event_type: str = 'AR',
observatory: str = 'SOHO'):
"""
Gets the observation metadata from HEK for the given obsdate.
By default gets Active Region data recieved from SOHO.
Parameters
----------
obsdate : str
The observation time and date.
event_type : str, optional
The type of Event, by default 'AR'
observatory : str, optional
Observatory that observed the Event, by default 'SOHO'
Returns
-------
results = sunpy.hek.HEKTable
The table of results recieved from HEK.
Examples
--------
>>> from pythia.seo import Sunspotter
>>> sunspotter = Sunspotter()
>>> obsdate = '2000-01-01 12:47:02'
>>> sunspotter.get_observations_from_hek(obsdate)
<HEKTable length=5>
SOL_standard absnetcurrenthelicity ... unsignedvertcurrent
str30 object ... object
------------------------------ --------------------- ... -------------------
SOL2000-01-01T09:35:02L054C117 None ... None
SOL2000-01-01T09:35:02L058C100 None ... None
SOL2000-01-01T09:35:02L333C106 None ... None
SOL2000-01-01T09:35:02L033C066 None ... None
SOL2000-01-01T09:35:02L012C054 None ... None
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment