This page was created by the IDL library routine `mk_html_help2`.

Last modified: Mon Aug 25 17:03:10 2025.

# Directory Listing of Routines

# general/spedas_tools/hapi

- HAPI_LOAD_DATA
  Load data and query information from a Heliophysics API server
- HAPI_LOAD_DATA_UT__DEFINE

# Routine Descriptions

## HAPI_LOAD_DATA

[Next Routine] [List of Routines]

     PROCEDURE:
             hapi_load_data

     PURPOSE:
             Load data and query information from a Heliophysics API server

     KEYWORDS:
             trange:       time range of interest [starttime, endtime] with the format
                           ['YYYY-MM-DD','YYYY-MM-DD'] or to specify more or less than a day
                           ['YYYY-MM-DD/hh:mm:ss','YYYY-MM-DD/hh:mm:ss']
             capabilities: describes relevant capabilities for the HAPI server (optional)
             catalog:      provides a list of datasets available from the HAPI server (optional)
             info:         provides information on a given dataset (optional)
             dataset:      dataset to load (optional)

             server:       HAPI server to connect to (e.g, 'http://datashop.elasticbeanstalk.com/hapi')
             parameters:   limit the requested parameters to a string or array of strings (works in
                           conjunction with /info and trange= keywords) (optional)

     EXAMPLES:
      List server capabilities:
        IDL> hapi_load_data, /capabilities, server='http://datashop.elasticbeanstalk.com/hapi'
        HAPI v1.1
        Output formats: csv, binary, json

      List the datasets available on this server:
        IDL> hapi_load_data, /catalog, server='http://datashop.elasticbeanstalk.com/hapi'
        HAPI v1.1
        1: CASSINI_LEMMS_PHA_CHANNEL_1_SEC
        2: CASSINI_LEMMS_REG_CHANNEL_PITCH_ANGLE_10_MIN_AVG
        ....

      Get info on a dataset:
        IDL> hapi_load_data, /info, dataset='spase://VEPO/NumericalData/Voyager1/LECP/Flux.Proton.PT1H', server='http://datashop.elasticbeanstalk.com/hapi'
        HAPI v1.1
        Dataset: spase://VEPO/NumericalData/Voyager1/LECP/Flux.Proton.PT1H
        Start: 1977-09-07T00:00:00.000
        End: 2017-05-02T21:38:00.000
        Parameters: Epoch, year, doy, hr, dec_year, dec_doy, flux, flux_uncert

      Load and plot the Voyager 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'

      Load and plot the Voyager flux data (limit the request to the 'flux' variable via the parameters keyword):
        IDL> hapi_load_data, parameter='flux', 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'

     NOTES:
             - capabilities, catalog, info keywords are informational
             - Requires IDL 8.3 or later due to json_parse + orderedhash usage

    $LastChangedBy: nikos $
    $LastChangedDate: 2022-02-11 14:35:22 -0800 (Fri, 11 Feb 2022) $
    $LastChangedRevision: 30578 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/general/spedas_tools/hapi/hapi_load_data.pro $

(See general/spedas_tools/hapi/hapi_load_data.pro)

## HAPI_LOAD_DATA_UT__DEFINE

[Previous Routine] [List of Routines]

     Unit tests for hapi_load_data

     To run:
         IDL> mgunit, 'hapi_load_data_ut'

     $LastChangedBy: egrimes $
     $LastChangedDate: 2018-08-20 11:53:54 -0700 (Mon, 20 Aug 2018) $
     $LastChangedRevision: 25664 $
     $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/general/spedas_tools/hapi/hapi_load_data_ut__define.pro $

(See general/spedas_tools/hapi/hapi_load_data_ut__define.pro)