HEKRow#

class sunpy.net.hek.HEKRow(table, index)[source]#

Bases: Row

Handles the response from the HEK. Each HEKRow object is a subclass of Row. The column-row key-value pairs correspond to the HEK feature/event properties and their values, for that record from the HEK. Each HEKRow object also has extra properties that relate HEK concepts to VSO concepts.

Attributes Summary

vso_all

vso_instrument

vso_time

Methods Summary

get(key[, default])

Return the value for key if key is in the columns, else default.

get_voevent([as_dict, base_url])

Retrieves the VOEvent object associated with a given event and returns it as either a Python dictionary or an XML string.

Attributes Documentation

vso_all#
vso_instrument#
vso_time#

Methods Documentation

get(key, default=None)[source]#

Return the value for key if key is in the columns, else default.

Parameters:
  • key (str, positional-only) – The name of the column to look for.

  • default (object, optional, positional-only) – The value to return if the key is not among the columns.

Returns:

object – The value in the key column of the row if present, default otherwise.

Examples

>>> from astropy.table import Table
>>> t = Table({"a": [2, 3, 5], "b": [7, 11, 13]})
>>> t[0].get("a")
2
>>> t[1].get("b", 0)
11
>>> t[2].get("c", 0)
0
get_voevent(as_dict=True, base_url='http://www.lmsal.com/hek/her?')[source]#

Retrieves the VOEvent object associated with a given event and returns it as either a Python dictionary or an XML string.