Next: 1.6 Attributes
Up: 1.5.1 Variables
Previous: rVariables
zVariables are identical to rVariables in all but one respect. The
dimensionality of a zVariable may be different from that of the
rVariables (and other zVariables). This allows variables that do not
``fit'' into the dimensionality of the rVariables to be included
in the same CDF. Using only rVariables to store certain data sets
could result in wasted disk space or a CDF with rVariables whose
dimensionality is not
consistent with some of the data in the data set. zVariables are
intended to solve these problems. Note that a CDF may also contain
just zVariables.
Consider a data set that consists of some number of images, each containing
1024 by 1024 pixels. The data set also contains a palette that is used to
map pixel values to the actual color/shade to be displayed. Palettes are
also referred to as lookup tables or color lookup tables. For this example
assume that each image pixel is stored in an 8-bit byte and the palette is
a 1-dimensional array of 256 colors/shades. Indexing into the palette array
with a pixel value gives the appropriate color/shade to use.
Attempting to store the images and the palette using only rVariables
would result in one of two undesirable situations. If the CDF's
rVariables are 2-dimensional
with sizes [1024,1024] (to store the images), the palette
would have to be
stored in a 1024 by 1024 array that does not make sense logically and would
waste disk space regardless of how the dimension variances are set. If the
CDF's rVariables are 3-dimensional with sizes [1024,1024,256],
the images could be stored in an rVariable having dimension variances
[TRUE,TRUE,false] and the palette could be stored in an rVariable
having dimension variances
Next: 1.6 Attributes
Up: 1.5.1 Variables
Previous: rVariables
cdfsupport@nssdca.gsfc.nasa.gov