Heliophysics Application Programmer’s Interface: Difference between revisions

From SPEDAS Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:


SPEDAS provides easy access to data on servers which implement the Heliophysics Application Programmer’s Interface via the command-line routine: hapi_load_data.  
SPEDAS provides easy access to data on servers which implement the Heliophysics Application Programmer’s Interface [https://github.com/hapi-server/data-specification] via the command-line routine: hapi_load_data.  


== Command-line ==
== Command-line ==
Line 49: Line 49:


== SPEDAS GUI ==
== SPEDAS GUI ==
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 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.
 


[[File:Spedas_gui_hapi_load.png|600px|center]]
[[File:Spedas_gui_hapi_load.png|600px|center]]

Latest revision as of 17:44, 21 May 2018

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

Command-line

Keywords

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


Examples

To list a server's capabilities:

<syntaxhighlight lang="idl"> IDL> hapi_load_data, /capabilities, server='http://datashop.elasticbeanstalk.com/hapi' </syntaxhighlight>


To list the datasets available on this server:

<syntaxhighlight lang="idl"> IDL> hapi_load_data, /catalog, server='http://datashop.elasticbeanstalk.com/hapi' </syntaxhighlight>


To get informaton on a dataset:

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


Load and plot some Voyager 1 proton flux data:

<syntaxhighlight lang="idl"> 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' </syntaxhighlight>

SPEDAS GUI

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.