QDataSet Intro

From autoplot.org

Jump to: navigation, search

QDataSet is a java interface for representing complex data sets. It is essentially an array with metadata attached to it, and complex structures are represented by connecting simple QDataSets to form more complex abstractions. It borrows good ideas from the NetCDF and CDF data models.

Here is the interface to a 1-dimensional QDataSet:

length() -> int
value(i) -> double
property( String ) -> Object

The number of dimensions of a QDataSet is called the "rank", and that is distinguish between indexes and physical dimensions. They needn't be the same as you will see later.

Schematically, a rank 1 dataset is drawn like so:

Image:QDataSetRank1.png

This shows the dataset geometry (the number of elements) and the properties, and omits the data. The name of the dataset is found in the optional property "NAME" (all properties are optional).

This is just a bunch of numbers until we start to apply semantics to it. If a dataset has a property "DEPEND_0", that means that the index corresponds to a physical dimension. It is a dependent variable of the independent variable that is the value of the property. So for example, if we have an array of temperature measurements that are sampled as a function of time, then schematically it would look like this:

Image:QDataSetRank1Depend0.jpg

(Note the DEPEND_0 property is implicit as the index is named.)

Similarly, if we have two indeces that correspond to physical dimensions, then DEPEND_1 would identify the dataset that tags the rows of the rank 2 dataset.

Image:QDataSetRank2.jpg

Units

UNITS is a property that identifies the physical unit of the values. In Autoplot, this points to an enumeration of Units found in the das2 library, in org.das2.datum.Units. In other applications of the data model, this might simply be a string.

Personal tools