libdas2
das2 core C utilities
|
#include <das2/dimension.h>
Inherits Descriptor.
Das2 Physical Dimensions.
Das2 dimensions are groups of variables within a single dataset that describe the same physical thing. For example the "Time" coordinate dimension would groups all variables that locate data in time. An "Ex" dimension would provide a group of variables describing the electric field in a spacecraft X direction.
A dimension needs to have at least one variable, but it may have many. For example, a dataset that only provides time values by single points would only have a single variable in the time dimension. Hovever a dataset providing extended duration events would need two time variables. One time variable could provide the event start times and another the end times.
There are two basic types of dimensions, coordinates and data. Coordinate dimensions provide variables to locate data in an independent parameter space, these are typically the X-axis values (or X and Y for spectrograms). Data dimensions typically group together related measurements.
Public Member Functions | |
DasDim * | new_DasDim (const char *sId, enum dim_type dtype, int nRank) |
Create a new dimension (not as impressive as it sounds) More... | |
const char * | DasDim_id (const DasDim *pThis) |
Get the dimension's id. More... | |
char * | DasDim_toStr (const DasDim *pThis, char *sBuf, int nLen) |
Print an information string describing a dimension. More... | |
int | DasDim_copyInProps (DasDim *pThis, char cAxis, const DasDesc *pOther) |
Copy in dataset properties from some other descriptor. More... | |
bool | DasDim_addVar (DasDim *pThis, const char *sRole, DasVar *pVar) |
Add a variable to a dimension. More... | |
const DasVar * | DasDim_getVar (const DasDim *pThis, const char *sRole) |
Get a variable providing values for a particular role in the dimension. More... | |
const DasVar * | DasDim_getPointVar (const DasDim *pThis) |
Get a variable poviding single point values in a dimension. More... | |
DasVar * | DasDim_popVar (DasDim *pThis, const char *role) |
Remove a variable by role from a dimensions. More... | |
void | del_DasDim (DasDim *pThis) |
Delete a dimension and drop the reference count on all contained variables. More... | |
int | DasDim_shape (const DasDim *pThis, ptrdiff_t *pShape) |
Get the maximum extent of this dimension in index space. More... | |