HECClient

class sunpy.net.helio.HECClient(link=None)[source]

Bases: sunpy.net.base_client.BaseClient

Provides access to the HELIO webservices.

Methods Summary

fetch(*args, **kwargs)

This is a no operation function as this client does not download data.

get_table_names()

Returns a list of the available tables to query.

search(*args, **kwargs)

The simple interface to query the wsdl service.

select_table()

Creates a list of table names and prompts the user for a choice

time_query(start_time, end_time[, table, …])

Deprecated since version 2.1.

Methods Documentation

fetch(*args, **kwargs)[source]

This is a no operation function as this client does not download data.

get_table_names()[source]

Returns a list of the available tables to query.

Returns the names of all the tables that can be queried via the webservice.

Returns

tables.array (numpy.ma.core.MaskedArray) – A VOtable table of available tables names

Examples

>>> from sunpy.net.helio import hec
>>> hc = hec.HECClient()  
>>> print(hc.get_table_names())  
[('timed_see_flare',) ('hi_event',) ('yohkoh_flare_list',)
 ('wind_mfi_bs_crossing_time',) ('seeds_soho',) ('seeds_stb',)
 ...
 ('rhessi_hxr_flare',) ('cactus_soho_flow',) ('cactus_soho_cme',)
 ('stereob_het_sep',)]
search(*args, **kwargs)[source]

The simple interface to query the wsdl service.

Used to utilize the service’s TimeQuery() method, this is a simple interface between the sunpy module library and the web-service’s API.

Examples

>>> from sunpy.net.helio import attrs as ha
>>> from sunpy.net import attrs as a, Fido
>>> timerange = a.Time('2005/01/03', '2005/12/03')
>>> res = Fido.search(timerange, ha.MaxRecords(10),
...                   ha.TableName('rhessi_hxr_flare'))  
>>> res  
<sunpy.net.fido_factory.UnifiedResponse object at ...>
Results from 1 Provider:

10 Results from the HECClient:
hec_id      time_start          time_peak      ... energy_kev flare_number
------ ------------------- ------------------- ... ---------- ------------
 31463 2005-01-03T01:37:36 2005-01-03T01:37:54 ...          6      5010320
 31464 2005-01-03T01:51:36 2005-01-03T01:59:18 ...         12      5010301
 31465 2005-01-03T03:26:28 2005-01-03T03:42:50 ...          6      5010332
 31466 2005-01-03T03:46:04 2005-01-03T04:07:10 ...         12      5010302
 31467 2005-01-03T05:00:24 2005-01-03T05:00:30 ...          6      5010313
 31468 2005-01-03T06:40:48 2005-01-03T06:42:46 ...          6      5010314
 31469 2005-01-03T08:27:56 2005-01-03T08:28:26 ...          6      5010334
 31470 2005-01-03T09:31:00 2005-01-03T09:33:34 ...          6      5010322
 31471 2005-01-03T09:34:52 2005-01-03T09:59:46 ...          6      5010336
 31472 2005-01-03T11:06:48 2005-01-03T11:07:18 ...         12      5010304

select_table()[source]

Creates a list of table names and prompts the user for a choice

This takes the table of table names from get_table_names(), creates a list of the names, sorts them, then presents the tables in a convenient menu for the user to choose from. It returns a string containing the name of the table that the user picked.

Returns

str – Contains the name of the table that the user picked.

Examples

>>> from sunpy.net.helio import hec  
>>> hc = hec.HECClient()  
>>> hc.select_table()  
time_query(start_time, end_time, table=None, max_records=None)[source]

Deprecated since version 2.1: Use Fido.search instead

The simple interface to query the wsdl service. Used to utilize the service’s TimeQuery() method, this is a simple interface between the sunpy module library and the web-service’s API.

Parameters
  • start_time (str, parse_time parsable objects) – The time where the query window opens

  • end_time (str, parse_time parsable objects) – The time where the query window closes

  • table (bytes) – The table to query from. If the table is unknown, the user will be prompted to pick from a list of tables.

  • max_records (int) – The maximum number of desired records.

Returns

results (astropy.io.votable.tree.Table) – Table containing the results from the query.

Examples

>>> from sunpy.net.helio import hec  
>>> hc = hec.HECClient()  
>>> start = '2005/01/03'
>>> end = '2005/12/03'
>>> temp = hc.time_query(start, end, max_records=10)