Das2 Datasets.
Das2 Datasets provide storage for arrays that contains both data values and coordinate values. Coordinate and Data arrays are doubly abstracted away dimensions and then a variable. Each dataset corresponds to a single index space and all variable in the dataset support the same bulk index range, though they may not produce unique values for each distinct set of indices.
Mapping from the dataset index space to individual arrays is handled by variables (DasVar).
A typical dataset consisting of a Time dimension, Frequency dimension and Amplitude dimension may have the following index ranges:
Time(i:0..152, j:- )
Freq(i:-, j:0..1440)
Amp( i:0..152, j:0..1440)
*
Here i is the first index and j is the second.
The first two dimensions define a time and frequency coordinates space, and the last provides amplitude values collected at over time and frequency.
- Todo:
- explain variables in dimensions and point-spreads
Binning these values could proceed in a loops such as described in the the ::DasDs_lengthLast function.
|
DasDs * | new_DasDs (const char *sId, const char *sGroupId, int nRank) |
| Create a new dataset object. More...
|
|
void | del_DasDs (DasDs *pThis) |
| Delete a Correlated Data object, cleaning up it's memory. More...
|
|
int | DasDs_shape (const DasDs *pThis, ptrdiff_t *pShape) |
| Return current valid ranges for whole data set iteration. More...
|
|
bool | DasDs_addAry (DasDs *pThis, DasAry *pAry) |
| Add an array to the dataset, stealing it's reference. More...
|
|
DasDim * | DasDs_makeDim (DasDs *pThis, enum dim_type dType, const char *sId) |
| Make a new dimension within this dataset. More...
|
|
const char * | DasDs_group (const DasDs *pThis) |
| Get the data set group id. More...
|
|
size_t | DasDs_numDims (const DasDs *pThis, enum dim_type vt) |
| Get the number of physical dimensions in this dataset. More...
|
|
const DasDim * | DasDs_getDim (const DasDs *pThis, size_t idx, enum dim_type vt) |
| Get a dimension by index. More...
|
|
DasDim * | DasDs_getDimById (DasDs *pThis, const char *sId) |
| Get a dimension by string id. More...
|
|
|
These work for any type of Descriptor, including PlaneDesc , PktDesc, StreamDesc, DasDs and DasVar.
To make your compiler happy you will need to cast Plane, Packet and Stream Descriptor pointers to just the generic type of Descriptor pointer when using these functions. For example:
* hasProperty((Descriptor*)pPktDesc, "SomePropName");
*
DasDesc
|
bool | DasDesc_equals (const DasDesc *pOne, const DasDesc *pTwo) |
| Check to see if two descriptors contain the same properties Note, the order of the properties may be different between the descriptors but if the contents are the same then the descriptors are considered to be equal. More...
|
|
const DasDesc * | DasDesc_parent (DasDesc *pThis) |
| The the parent of a Descriptor. More...
|
|
size_t | DasDesc_length (const DasDesc *pThis) |
| Get the number of properties in a descriptor. More...
|
|
const char * | DasDesc_getNameByIdx (const DasDesc *pThis, size_t uIdx) |
| Get a property name by an index. More...
|
|
const char * | DasDesc_getValByIdx (const DasDesc *pThis, size_t uIdx) |
| Get a property value by an index. More...
|
|
const char * | DasDesc_getTypeByIdx (const DasDesc *pThis, size_t uIdx) |
| Get a data type of a property by an index.
|
|
bool | DasDesc_has (const DasDesc *pThis, const char *propertyName) |
| Determine if a property is present in a Descriptor or it's ancestors. More...
|
|
DasErrCode | DasDesc_set (DasDesc *pThis, const char *sType, const char *sName, const char *sVal) |
| Generic property setter. More...
|
|
bool | DasDesc_remove (DasDesc *pThis, const char *propretyName) |
| Remove a property from a descriptor, if preset. More...
|
|
const char * | DasDesc_getStr (const DasDesc *pThis, const char *propertyName) |
| read the property of type String named propertyName.
|
|
DasErrCode | DasDesc_setStr (DasDesc *pThis, const char *sName, const char *sVal) |
| SetProperty methods add properties to any Descriptor (stream,packet,plane). More...
|
|
DasErrCode | DasDesc_vSetStr (DasDesc *pThis, const char *sName, const char *sFmt,...) |
| Set a string property in the manner of sprintf.
|
|
double | DasDesc_getDouble (const DasDesc *pThis, const char *propertyName) |
| Read the property of type double named propertyName. More...
|
|
DasErrCode | DasDesc_setDouble (DasDesc *pThis, const char *propertyName, double value) |
| Set property of type double.
|
|
double | DasDesc_getDatum (DasDesc *pThis, const char *sPropName, das_units units) |
| Get the a numeric property in the specified units. More...
|
|
DasErrCode | DasDesc_setDatum (DasDesc *pThis, const char *sName, double rVal, das_units units) |
| Set property of type Datum (double, UnitType pair) More...
|
|
double * | DasDesc_getDoubleAry (DasDesc *pThis, const char *propertyName, int *nitems) |
| Get the values of an array property. More...
|
|
DasErrCode | DasDesc_setDoubleArray (DasDesc *pThis, const char *propertyName, int nitems, double *value) |
| Set the property of type double array.
|
|
int | DasDesc_getInt (const DasDesc *pThis, const char *propertyName) |
| Get a property integer value. More...
|
|
DasErrCode | DasDesc_setInt (DasDesc *pThis, const char *sName, int nVal) |
| Set the property of type int.
|
|
bool | DasDesc_getBool (DasDesc *pThis, const char *sPropName) |
| Get a property boolean value. More...
|
|
DasErrCode | DasDesc_setDatumRng (DasDesc *pThis, const char *sName, double beg, double end, das_units units) |
| Set property of type DatumRange (double, double, UnitType triple)
|
|
DasErrCode | DasDesc_getStrRng (DasDesc *pThis, const char *sName, char *sMin, char *sMax, das_units *pUnits, size_t uLen) |
| Get a property of type DatumRange with unconverted strings. More...
|
|
DasErrCode | DasDesc_setFloatAry (DasDesc *pThis, const char *propertyName, int nitems, float *value) |
| Set the property of type float array. More...
|
|
void | DasDesc_copyIn (DasDesc *pThis, const DasDesc *source) |
| Deepcopy properties into a descriptor. More...
|
|
DasErrCode | DasDesc_encode (DasDesc *pThis, DasBuf *pBuf, const char *sIndent) |
| Encode a generic set of properties to a buffer. More...
|
|