Skip to content

das2c_pdims

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

FUNCTION

das2c_pdims

PURPOSE

List the physical dimensions represented in a das2 dataset.

CALLING SEQUENCE

pdim_array = das2c_pdims(dataset)
pdim = das2c_pdims(dataset, pdim_name)

INPUTS

Parameter Type Purpose
dataset DAS2C_DSET A structure as return by das2c_datasets

OPTIONAL INPUTS

Parameter Type Purpose
pdim_name String The variable group (aka physical dimension's) name. This input is only required if information concerting a single physical dimension is desired.

Dimension names are somewhat standardized. For example time tags are usually in dimension 'time' and energy bin centers are typically in a dimension named 'energy'. Application code shouldn't depend on this fact but it may use the standardized names as plotting hints.

OUTPUT

This function returns an array of DAS2C_PDIM structures providing an overview of each variable group in the dataset. One variable group typically corresponds to one physical dimension, hence the name "pdim". DAS2C_PDIM structures have the following fields.

Field Type Purpose
RESULT Long The result ID of this dataset, starts from 1
DSET Long The ID number of this dataset, starts from 0
PDIM String The name of this physical dimension, ex: 'time'
USE String The intended usage of values from this pdim, will be one of two strings, COORD or DATA
N_VARS Long The number of variables carrying data values for this physical dimension.
N_PROPS Long The number of metadata properties for this dimension
N_VALS Long64 The total number of stored values in the variables for this dimension.

If a particular variable group is requested by name and it doesn't exist in the given dataset, !NULL is returned.

EXAMPLES

  1. List summary information on all physical dimensions for dataset 0 in result 27.

    result = das2c_result(27)
    ds = das2c_datasets(result, 0)
    das2c_pdims(ds)
  2. List summary information on the time dimension in the same dataset.

    das2c_pdims(ds, 'time')

MODIFICATION HISTORY

C. Piker, 2020-03-12 - First version

C. Piker, 2023-12-03 - Var name switch before TRACERS usage, query --became--> result

Clone this wiki locally