Heliophysics Application Programmer’s Interface: Difference between revisions

From SPEDAS Wiki
Jump to navigation Jump to search
(Created page with " SPEDAS provides easy access to data on servers which implement the Heliophysics Application Programmer’s Interface via the command-line routine: hapi_load_data. == Comman...")
 
No edit summary
Line 25: Line 25:
IDL> hapi_load_data, /capabilities, server='http://datashop.elasticbeanstalk.com/hapi'
IDL> hapi_load_data, /capabilities, server='http://datashop.elasticbeanstalk.com/hapi'
</syntaxhighlight>
</syntaxhighlight>


To list the datasets available on this server:
To list the datasets available on this server:
Line 31: Line 32:
IDL> hapi_load_data, /catalog, server='http://datashop.elasticbeanstalk.com/hapi'
IDL> hapi_load_data, /catalog, server='http://datashop.elasticbeanstalk.com/hapi'
</syntaxhighlight>
</syntaxhighlight>


To get informaton on a dataset:
To get informaton on a dataset:
Line 37: Line 39:
IDL> hapi_load_data, /info, dataset='spase://VEPO/NumericalData/Voyager1/LECP/Flux.Proton.PT1H', server='http://datashop.elasticbeanstalk.com/hapi'
IDL> hapi_load_data, /info, dataset='spase://VEPO/NumericalData/Voyager1/LECP/Flux.Proton.PT1H', server='http://datashop.elasticbeanstalk.com/hapi'
</syntaxhighlight>
</syntaxhighlight>


Load and plot some Voyager 1 proton flux data:
Load and plot some Voyager 1 proton flux data:

Revision as of 17:13, 21 May 2018

SPEDAS provides easy access to data on servers which implement the Heliophysics Application Programmer’s Interface 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>