Heliophysics Event Knowledgebase (HEK) queries


This gives some examples of how to query the HEK. Note that the HEK is described in Hurlburt et al. (2012, Sol. Phys., 275, 67).

General

Constructing a query for isolsearch

For finding events, a good way is to first go to isolsearch and use the web-tool to find a feature (e.g., sunspots). Once your query is returned, look for the 'Search results' box and click on 'export'. Now click on 'Solarsoft Call' and you'll receive a line of IDL code that can be copied into an IDL session.

Note that the ssw_her_query routine returns a structure in which all tags are strings. Try giving the keyword '/struct' to convert, e.g., integer entries into integers.

Also note that a limit is applied to the number of results that are returned. This can be changed by specifying 'result_limit='.

Constructing a query from IDL

The query input to 'ssw_her_query' has a distinct format in which the query is a single string. To construct this query string from a more standard calling sequence do, e.g.,

IDL> query=ssw_her_make_query(t1,t2,/fl)
IDL> her=ssw_her_query(query,/str)

Example 1: find IRIS observations of sunspots close to disk center

The IRIS catalog is built into the HEK so it's easy to cross-match events against the IRIS catalog.

Here I search for IRIS observations close to sunspots during the period 22-oct-2013 to 23-oct-2013, with a restriction that the sunspots are within +/- 300 arcsec of the central meridian.

IDL> query=ssw_her_make_query('22-oct-2013','23-oct-2013',/ss,x1=-300,x2=300)
IDL> her=ssw_her_query(query,/str)

There are 14 sunspots matched from the catalog (check the her.ss tag). Now we want to cross-match these against IRIS observations:

IDL> rmatch=100
IDL> tmatch=1800
IDL> for i=0,13 do iris=hek_match_events(her.ss[i],rmatch,tmatch,tar='hcr',instru='iris')

'rmatch' indicates that the IRIS pointing can be within 100" of the sunspot, and 'tmatch' that the IRIS observation can be within 1800s of the sunspot entry.

The routine hek_match_events always returns a null match (number of hits=1), so you have to look for when number of hits is more than 1. This is the case for her.ss[11].

Checking the output from hek_match_events, we find a match for a raster at 20:59 UT on 22-Oct-2013.

More generally, see the routine hek_find_iris_ss.pro for finding IRIS sunspot observations for a specified month.

Example 2: find spatial location of GOES flares

I do this by querying both the AIA 94 channel flare catalog and the GOES catalog.

First, the GOES catalog:

IDL> query=ssw_her_make_query('15-feb-2011','16-feb-2011',/fl,search_array=['obs_observatory=GOES','fl_goescls>=M5'])
IDL> goes=ssw_her_query(query,/str)

where we find one match (the famous X-flare of 15-Feb). Now the AIA 94 catalog:

IDL> query=ssw_her_make_query('15-feb-2011','16-feb-2011',/fl,search_array=['obs_observatory=SDO','obs_channelid=94'])
IDL> events=ssw_her_query(query,/str)

For which we find four matches.

We can now cross-match the two catalogs using timing information:

IDL> sdo_tai=anytim2tai(events.fl.required.event_peaktime)
IDL> goes_tai=anytim2tai(goes.fl.required.event_peaktime)
IDL> getmin=min(abs(goes_tai-sdo_tai),imin)

IDL> print,events.fl[imin].required.event_coord1,events.fl[imin].required.event_coord2
      192.000     -192.000

Thus the flare occurred at (+192,-192). Note that the AIA flare-finding algorithm seems to divide the Sun into large blocks, and the coordinates correspond to the centers of these boxes.


Page maintained by Dr Peter R Young.