entries_from_query_result

sunpy.database.tables.entries_from_query_result(qr, default_waveunit=None)[source] [edit on github]

Use a query response returned from sunpy.net.vso.VSOClient.search() or sunpy.net.vso.VSOClient.query_legacy() to generate instances of DatabaseEntry. Return an iterator over those instances.

Parameters:
  • qr (sunpy.net.vso.QueryResponse) – The query response from which to build the database entries.
  • default_waveunit (str, optional) – See sunpy.database.DatabaseEntry.from_query_result_block().

Examples

>>> from sunpy.net import vso
>>> from sunpy.database.tables import entries_from_query_result
>>> client = vso.VSOClient()  # doctest: +REMOTE_DATA
>>> qr = client.search(
...     vso.attrs.Time('2001/1/1', '2001/1/2'),
...     vso.attrs.Instrument('eit'))  # doctest: +REMOTE_DATA
>>> entries = entries_from_query_result(qr)  # doctest: +REMOTE_DATA
>>> entry = next(entries)  # doctest: +REMOTE_DATA
>>> entry.source  # doctest: +REMOTE_DATA
SOHO
>>> entry.provider  # doctest: +REMOTE_DATA
SDAC
>>> entry.physobs  # doctest: +REMOTE_DATA
'intensity'
>>> entry.fileid  # doctest: +REMOTE_DATA
/archive/soho/private/data/processed/eit/lz/2001/01/efz20010101.000042
>>> entry.observation_time_start, entry.observation_time_end  # doctest: +REMOTE_DATA
(datetime.datetime(2001, 1, 1, 0, 0, 42), datetime.datetime(2001, 1, 1, 0, 0, 54))
>>> entry.instrument  # doctest: +REMOTE_DATA
EIT
>>> entry.size  # doctest: +REMOTE_DATA
2059.0
>>> entry.wavemin, entry.wavemax  # doctest: +REMOTE_DATA
(19.5, 19.5)