Heliophysics Application Programmer’s Interface

From SPEDAS Wiki
Jump to navigation Jump to search

SPEDAS provides easy access to data on servers which implement the Heliophysics Application Programmer’s Interface via the command-line routine: hapi_load_data.



server (required): specify the HAPI server to connect to

capabilities: list the server capabilities

catalog: list the datasets available on the server

info: return information on a dataset

trange: two element array specifying the time range for the dataset you would like to download

parameters: restrict the parameters in the dataset to just those requested in this keyword


To list a server's capabilities:

IDL> hapi_load_data, /capabilities, server='http://datashop.elasticbeanstalk.com/hapi'

To list the datasets available on this server:

IDL> hapi_load_data, /catalog, server='http://datashop.elasticbeanstalk.com/hapi'

To get informaton on a dataset:

IDL> hapi_load_data, /info, dataset='spase://VEPO/NumericalData/Voyager1/LECP/Flux.Proton.PT1H', server='http://datashop.elasticbeanstalk.com/hapi'

Load and plot some Voyager 1 proton flux data:

IDL> hapi_load_data, trange=['77-09-27', '78-01-20'], dataset='spase://VEPO/NumericalData/Voyager1/LECP/Flux.Proton.PT1H', server='http://datashop.elasticbeanstalk.com/hapi'
IDL> tplot, 'flux'


In addition to the command-line access to HAPI servers, the SPEDAS GUI allows users to load data from HAPI servers with an easy to use GUI interface. In the GUI, go to "File" -> "Load Data using HAPI", then (1) select your HAPI server, (2) load the datasets from it, select one of the datasets and either get the dataset information (3) and/or (4) select the time range for the dataset; finally, click "Load Data" to load the data into GUI variables.

Spedas gui hapi load.png