Load Data via HAPI (the Heliophysics Application Program Interface)

HAPI is a protocol developed by the heliophsics community to locate and download heliophysics data from various data archive services, for example:

https://cdaweb.gsfc.nasa.gov/hapi'
https://pds-ppi.igpp.ucla.edu/hapi
http://planet.physics.uiowa.edu/das/das2Server/hapi
https://iswa.gsfc.nasa.gov/IswaSystemWebApp/hapi
http://lasp.colorado.edu/lisird/hapi
pyspedas.hapi(trange=None, server=None, dataset=None, parameters='', suffix='', prefix='', catalog=False, quiet=False)[source]

Loads data from a HAPI server into tplot variables

Parameters:
  • trange (list of str or list of float) – Time range to load the data for

  • server (str) – HAPI server to load the data from

  • dataset (str) – HAPI dataset to load

  • parameters (str or list of str) – Parameters in the dataset to load; default is to load them all Default: ‘’ (load all parameters)

  • prefix (str) – Prefix to append to the tplot variables Default: ‘’

  • suffix (str) – Suffix to append to the tplot variables Default: ‘’

  • catalog (bool) – If True, returns the server’s catalog of datasets Default: False

  • quiet (bool) – If True, suppress printing the catalog ids retrieved Default: False

Returns:

List of catalog ids retrieved or tplot variables created.

Return type:

list of str

Examples

>>> # Print catalog from CDAWeb HAPI server
>>> import pyspedas
>>> cat_entries = pyspedas.hapi(server='https://cdaweb.gsfc.nasa.gov/hapi', catalog=True)
>>> # Load OMNI data from CDAWeb HAPI server
>>> import pyspedas
>>> from pyspedas import tplot
>>> h_vars = pyspedas.hapi(trange=['2003-10-20', '2003-11-30'],server='https://cdaweb.gsfc.nasa.gov/hapi',dataset='OMNI_HRO2_1MIN')
>>> tplot(['BX_GSE','BY_GSE','BZ_GSE'])