cdasws Example IDL Jupyter Notebook

This Jupyter notebook demonstates using the cdasws IDL library to access data from cdaweb in the IDL programming language.

Note: This notebook is for the IDL version of cdasws. Jupyter notebooks for the Python version of cdasws is available at python cdasws notebooks. This notebook contains the following sections:

  1. Installation
  2. Setup
  3. Get Observatory Groups
  4. Get Instrument Types
  5. Get Datasets
  6. Get Inventory
  7. Get Variable Names
  8. Get Data
  9. Binning Example
  10. DOI Example
  11. Additional Documentation

Installation

The following contains the procedure to install the cdasws IDL library into your IDL environment. There are different procedures for different versions of IDL.

IDL 8.7.1 and higher

If you have an old version of the SPDF_CDAS package already installed, remove the old version.

If the lastest version of the SPDF_CDAS package is not already installed, install it as shown below.

You only need to install a particular version of the package once. You will need to restore the package everytime you restart your IDL session. Restore the package as shown below.

IDL 8.4.0 and newer

Download spdfcdas.sav. You will need to restore the package everytime you restart your IDL session. Restore the package as shown below.

Setup

Create an SpdfCdas object that will be used in the code that follows.

Get Observatory Groups

The following code demonstrates how to get the mission/observatory groups supported by cdaweb.

Get Intrument Types

The following code demonstrates how to get the intrument types supported by cdaweb.

Get Datasets

The following code demonstrates how to find the datasets for a specific observatory group and instrument type.

Get Inventory

The following code demonstrates getting the available data inventory.

Get Variable Names

The following code demonstrates how to a dataset's variable names.

Get Data

The following code demonstrates how to access magnetic field measurements from the ACE mission dataset.

Use the standard IDL PLOT procedure to display the data.

Print the values.

Use the cdawlib plotmaster function to plot the data.

Binning Example

For analysis, it is often useful to place two datasets that have different timestamps on the same time grid (with optional spike removal). The following demonstrates doing this with cdasws and the datasets AC_H0_SWE and AC_H2_SWE. For more information on binning, see binning in cdaweb.

Display Original Data

Get and gets and displays the original, unbinned data.

Bin Data

The following code gets data after it has been binned with 60 second time intervals and any missing values created by interpolation.

Compare Data

The following code compares the binned data from the two datasets by plotting the values.

DOI Example

The following code gets data from a dataset using the dataset's Digital Object Identifier and displays the dataset's values.

Additional Documentation

View the cdasws API for additional functions.