# Accessing SSCWeb Data From IDL

This page describes an IDL library that provides easy access to SSCWeb data from an IDL program. With this library, an IDL user can retrieve data from SSCWeb. The data is automatically downloaded and read into an IDL object in the user's local IDL environment. The user can then write their own IDL code to analyze or visualize the data. This is further illustrated with an IDL Jupyter notebook example. There is also an example program that demonstrates many of the lower-level calls.

## Preparation

1. Download `spdfssc.sav`
2. Start IDL 8.4 or higher.
3. `IDL> restore, 'spdfssc.sav', /skip_existing`

## IDL Package Installation (alternative installation procedure)

If you are using IDL version 8.7.1 or higher, you may install the SPDF_SSC package by doing the following in an IDL session:
ipm, /install, 'https://berniegsfc.github.io/sscws/REST/SPDF_SSC.zip' restore, !package_path + '/SPDF_SSC/spdfssc.sav'

## "One-line" Data Access

The following demonstrates getting location data with a single line of IDL code. l = spdfGetLocations('iss', ['2013-01-01T00:00:00.000Z', '2013-01-01T01:00:00.000Z'])
An example use of the returned data is shown below: p = plot3d(l->getX(), l->getY(), l->getZ(), window_title='Orbit')

## "More Complete" SSCWeb Access Example

The following example demonstrates additional features of this library. spdfsscwsexample

## Conjunction Example

At this time, this IDL client library does not natively support the conjunction query capability of the SSC web services. However, it is possibly to use IDL's Python bridge to call the Python sscws library (which does support conjunction queries) from IDL. An example to find magnetic field line conjunctions of at least 2 THEMIS satellites with one of 4 THEMIS ground stations duing 2008 doy = 1 - 5 is provided in spdfsscwsconjunctionexample.
Note that this example does not function if restored from spdfssc.sav or the IPM package because those files were produced for compatibility with older versions of IDL. Use the source code to compile and run this example on IDL 8.5 or newer.

## IDL Jupyter Notebook Example

Use of this IDL library to access SSCWeb data if further illustrated in this IDL Jupyter notebook example ( ipynb file).
Notes:

- View SpdfSscWsExample documentation.
- View simplified API documentation.
- View complete API documentation.
- Get the source code.