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()  
>>> qr = client.search(
...     vso.attrs.Time('2001/1/1', '2001/1/2'),
...     vso.attrs.Instrument('eit'))  
>>> entries = entries_from_query_result(qr)  
>>> entry = next(entries)  
>>> entry.source  
'SOHO'
>>> entry.provider  
'SDAC'
>>> entry.physobs  
'intensity'
>>> entry.fileid  
'/archive/soho/private/data/processed/eit/lz/2001/01/efz20010101.000042'
>>> entry.observation_time_start, entry.observation_time_end  
(datetime.datetime(2001, 1, 1, 0, 0, 42), datetime.datetime(2001, 1, 1, 0, 0, 54))
>>> entry.instrument  
'EIT'
>>> entry.size  
2059.0
>>> entry.wavemin, entry.wavemax  
(19.5, 19.5)