Skip to content

das2c_datasets

C. Piker edited this page Dec 7, 2023 · 4 revisions

FUNCTION

das2c_datasets

PURPOSE

List stored datasets in a das2 query result

CALLING SEQUENCE

Result = das2c_datasets(result)
Result = das2c_datasets(result, ds_index)

INPUTS

Parameter Type Purpose
result DAS2C_RESULT

LONG

A result structure as returned by das2c_readhttp or das2c_results

A Result ID

OPTIONAL INPUTS

Parameter Type Purpose
ds_index Long The dataset index. Only required if information about a single dataset is desired. Most query results only contain a single dataset at index 0. However, some common ones such as the Juno Waves Survey data source return more that one.

OUTPUT

This function returns an array of DAS2C_DSET structures providing an overview of each stored result. Output structures have the following fields.

Field Type Purpose
RESULT Long The ID number of the result containing this dataest, starts from 1
DSET Long The ID number of this dataset, starts from 0
NAME String The name of this dataset, dataset names are not usually unique. This limits their utility.
RANK Long The number of entries in SHAPE field that matter. Since IDL uses a 'first index fastest' memory layout only the last RANK values of SHAPE array actually matter.
SHAPE Long64[8] The extents of this dataset in the full IDL index space.

Ideally this array would be of length RANK, however due to limitations on DLMs, this array is always 8 elements long. An example of trimming the shape array is provided in EXAMPLES below.

N_PDIMS Long The number of variable groups in the dataset. Typically 1 variable group corresponds to 1 physical dimension such as 'time' or 'energy'. Each variable play a set role in a variable group. See das2c_vars for details.
N_PROPS Long The number of metadata properties in the dataset
N_VALS Long64 The total number of actual data values in the dataset. Due to virtual indexes this may be less sum of the shapes of all variables.

EXAMPLES

  1. Get an array of dataset structures for datasets in a HTTP GET query.
    result = das2c_readhttp(url_string)
    ds_arr = das2c_datasets(result)
  2. Get the first dataset struture for result ID 27.
    result = das2c_results(27)
    ds = das2c_datasets(result, 0);
  3. Trim the shape array down to the actual rank of the dataset.
    ds = das2c_datesets(result, 0);
    shape = ds.shape[8 - ds.rank : -1 ]

MODIFICATION HISTORY

C. Piker, 2020-03-10 - Initial

Clone this wiki locally