translate_results_to_query

sunpy.net.hek2vso.translate_results_to_query(results)[source]

Formulate VSO queries from HEK results.

Take the results from a HEK query either in the form of a single HEK response or a list containing multiple HEK responses then translates them into a VSO compatible query.

Parameters

results (sunpy.net.hek.hek.HEKRow or sunpy.net.hek.hek.HEKTable) – The HEK results from a HEK query to be translated.

Examples

>>> from sunpy.net import attrs as a
>>> from sunpy.net.hek import hek, HEKClient
>>> from sunpy.net.hek2vso import hek2vso, H2VClient
>>> h = HEKClient()  
>>> h2v = H2VClient()  
>>> q = h.search(a.Time('2011/08/09 07:23:56',
...             '2011/08/09 12:40:29'), a.hek.EventType('FL'))  
>>> len(q)  
19
>>> hek2vso.translate_results_to_query(q[0])  
[[<sunpy.net.attrs.Time(2011-08-08 01:30:04.000, 2011-08-10 00:00:04.000)>, <sunpy.net.attrs.Source(SDO: The Solar Dynamics Observatory.) object at ...>, <sunpy.net.attrs.Instrument(HMI: Helioseismic and Magnetic Imager) object at ...>, <sunpy.net.attrs.Wavelength(6172.999999999998, 6172.999999999998, 'Angstrom')>]]