Next: Getting and Setting Attributes Up: Writing QSAS Plug-ins Previous: Joining Time Series Data Contents

# Data Object Attributes

QSAS Data Objects are C++ class types used internally in QSAS to hold and manipulate data. When a Data Object is created, for example by ingestion of a CDF variable, it inherits certain metadata (attributes) of the data set. These are stored as cross-references (`xrefs') of the data object.

In the case of CDF or cef variable ingestion, the variable attributes should be available to the Data Object. The Global Attributes are available only via the browse interface and are not stored as xrefs to the data object. Data Objects created within QSAS are required to carry the 'minimal' set of attributes listed as essential in Tab.1. Details about these attributes are given in document DS-QMW-TN-0003. Attributes are accessed by name, so the user is free to invent and set new attributes. Users should avoid re-inventing the attributes named in Tab.1.

Attributes are only required for Data Objects that are visible to QSAS; in particular, objects that are to be added to the working list should meet the requirements below. Data Objects that exist only within functions or modules, as working space, aren't required to hold Attributes. The onus falls on the programmer of individual modules to ensure that any Data Object added to the working list has the required attributes.

Note that missing even ``essential'' attributes would not prove fatal, but can inhibit successful operation of other tools within the QSAS package (such as type checking in arithmetic and auto-labelling of plots). Attributes can be added to an object after it as been placed on the working list by double clicking the object and using the attribute browser/editor that pops up. This can be useful for ``quick and dirty'' plug-ins that are for use-once experiments, but is not generally recommended.

The time tags on a time series object are also attached to the object as a xref (TIME_TAGS), and may be accessed in the same way as any other xref. The names used for minimal qsas xrefs are defined in Xrefs.h and these defined strings are accessed through the names given in the second column in the table.

Table 1: Standard attributes for Qsas data objects. [*] means should be guaranteed by an analysis routine. [+] means should be set on input where ever possible, and should be set by an analysis routine, if possible.
Attribute | Xref | Type | Description | Example
Frame [*+] | FRAME | QdString | dim and frame | `"scalarna"` or
|  |  |  | `"vectorgse_xyz"`
SI_conversion [*+] | SI_CONVERSION | QdString | conversion factor | `"1.0e-9T"`
UNITS [+] | UNITS | QdString | unit string | `"nT"`
LABLAXIS [+] | LABLAXIS | QdString | plot axis label | `"B"`
FIELDNAM [+] | FIELDNAM | QdString | data identifier | `"DC Magnetic Field"`
SCALEMIN [+] | SCALEMIN | QdString | plot scaling | `"0.0"`
SCALEMAX [+] | SCALEMAX | QdString | plot scaling | `"10.0"`
VALIDMIN | VALIDMIN | QdString | plot scaling | `"0.0"`
VALIDMAX | VALIDMAX | QdString | plot scaling | `"10.0"`
FILLVAL | FILL_VALUE | QdString | missing data flag | `"0.0"`
SCALETYP | SCALETYP | QdString | plot scaling | `"lin"`

Subsections

- Getting and Setting Attributes
  - Useful functions for calculating attributes

Next: Getting and Setting Attributes Up: Writing QSAS Plug-ins Previous: Joining Time Series Data Contents