query_hek#

iris.data.query_hek(time_start=None, time_stop=None, description='', obs_id=None, limit=200, nrt=False)[source]#

Constructs a query that can be sent to the Heliophysics Event Knowledge Base (HEK) to receive a list of URLs.

Parameters:
  • time_start (None | Time) – The start time of the search period. If None, the start of operations, 2013-07-20 will be used.

  • time_stop (None | Time) – The end time of the search period. If None, the current time will be used.

  • description (str) – The description of the observation. If an empty string, observations with any description will be returned.

  • obs_id (None | int) – the OBSID of the observation, a number which describes the size, cadence, etc. of the observation. If None, all OBSIDs will be used.

  • limit (int) – the maximum number of files returned by the query

  • nrt (bool) – Whether to return results with near-real-time (NRT) data.

Return type:

str

Examples

Construct a query for the first 100 A1: QS monitoring observations in 2023

import astropy.time
import iris

iris.data.query_hek(
    time_start=astropy.time.Time("2023-01-01T00:00"),
    time_stop=astropy.time.Time("2024-01-01T00:00"),
    description="A1: QS monitoring",
    limit=100,
)
'https://www.lmsal.com/hek/hcr?cmd=search-events3&outputformat=json&startTime=2023-01-01T00:00&stopTime=2024-01-01T00:00&hasData=true&hideMostLimbScans=true&obsDesc=A1: QS monitoring&limit=100'