As you'll see, VisAD *Types* do not have to be simple one-sylable
parameters; in fact, most are not. VisAD has terminology to cope with
these, words like "RealTupleType" and "FunctionType" and "SetType".
The key is that each quantitiy in VisAD must have a type...just like
in any other language. VisAD also has *TextTypes*, and so there
is a more generic way to refer to all these: **MathType**

- getType(Data d) - returns the MathType of the Data object
- dumpType(Data d) - lists out the Data and MathType information of the Data object
- getRealType(String s) - returns a VisAD RealType with the name s (makes a new one, if needed)
- makeType(String s) - makes a VisAD MathType from the string

t=makeType('(Time->((pixel,line)->bright))')If you then just command

If you want a more thorough listing of the type information, use the
` dumpTypes(d) ` function and you will get a listing that looks like:

VisAD MathType analysis FunctionType: Domain has 2 components: 0. RealType: Longitude 0. Name = Longitude 0. Unit: deg 1. RealType: Latitude 1. Name = Latitude 1. Unit: deg Range: RealTupleType has 1 components: 0. RealType: value 0. Name = value - - - - - - - - - - - - - - - - - - - - - - - DataType analysis... FlatField of length = 360 ((Longitude, Latitude) -> value) Domain has 2 components: Linear2DSet: Length = 360 0. Linear1DSet (GENERIC_REAL) Range = -130.0 to -40.0 step 10.0 1. Linear1DSet (GENERIC_REAL) Range = 20.0 to 60.0 step 1.1428571428571428 Range has 1 components: 0. FloatSet (value) Dimension = 1 0. number missing = 10The first portion of this is for the "MathTypes" (ref: VisAD tutorial), that is the types of the variables defined by the structure (like "real" or "function"), and shows their structure and relationships.

The second portion of this is for the "Data Types", that is what data structures (and sub-structures) are defined; you'll notice that where possible some numeric information is also provided. In this case, a VisAD "FlatField" (basically, an array of 360 samples) is defined as a mapping from a domain of (Lontitude,Latitude) pairs to a set of floating point numbers in the range. Remember that VisAD data are really finite samples of continuous functions, so what is being shown here is that there are 360 samples in the Longitude space from (-130 to -40) and Latitude space from (20 to 60).

VisAD data structures can be vary in complexity, and I encourage you to look over the VisAD tutorial for programmers for more details. Later sections of this tutorial will discuss how to manipulate the data in the objects.

- size = data.length
- makeUnit(String name) - makes a Unit object from name (like "degC")
- range methods
- rangeDimension(Data d) - returns integer number of rangecomponents
- rangeType(Data d, int component) - returns String name of component
- rangeType(Data d) - returns the (RealTuple)Type of the range

- domain methods
- domainDimension(Data d) - returns integer number of domain components
- domainType(Data d, component) - returns String name of component
- domainType(Data d) - returns the (RealTuple)Type of the domain
- domainFactor(Data d, Type t) - returns a field with the Type
factored out.

More examples using all these...

Back to the home page