Tom, I was actually wondering if it was possible to extract the range
value for the "index" input field.
What do you mean? In your example, the MathType is:
that tells me that 'index' is the domain of your "function" and the
tuple 'torque, RI_X, ..., Cost' is the range. So to say "extract the
range value for 'index' means to me that you want to get the values of
'torque, RI_X, ..., Cost' for some value of 'index'. In my example, you
would simply refer to "a" and that gives you the tuple of 'torque...'
ie. I'm trying to see if the input
"index" is mapped to the Visad parameter "iso-contour".
I'm not sure what this has to do with the "range value" you asked about
in the previous sentence?
I don't think I
can just access the value of the first spot in an array of the types
since index seems to occur in different places in the domain (and is
In your MathType, you only have _one_ domain component: index.
Everything else is a "range component".
listed in a different order on the left column of the mapping dialog
box) for each csv file I've tried. Do you know if there is a way to see
what value "index" was mapped to?
I'm going to assume you're only interested in discovering the
Scalar-to-Display mappings you've done, and are really only interested
in finding out what, if anything, the RealType called "index" has been
mapped to a DisplayScalar.
You can use:
which will return a Vector of the mappings. You can then look at each
element's getDisplayScalar() and see if that is iso-contour (I use the
toString() method for that...), and getScalar() to see if it is 'index'
Sorry for my confusion...
Michelle Kam (408) 742-2881
Lockheed Martin Space Systems Co. SSM/ATC/MSIS
1111 Lockheed Martin Way, Sunnyvale, CA 94089
From: Bill Hibbard [mailto:billh@xxxxxxxxxxxxx]
Sent: Tuesday, July 22, 2003 12:07 PM
To: Kam, Michelle C
Subject: RE: ShadowFunctionOrSetType
On Tue, 22 Jul 2003, Kam, Michelle C wrote:
I'm referring to an example shown below from the url you suggested.
I'm wondering how to specify the Data object,
"d:\\visad\\data\\tes5.csv", before calling getType() on it. I don't
know of a Data constructor that can take in a string.
You have to have a Data object before calling getType(). You can
either construct the Data object, or read it from a file.
Also, when I get
the FunctionType and call getDomain() on the FunctionType, it returns
RealTupleType and I think TupleType.TupleComponents.length would then
give me the number of input fields. Would that be one way to extract
number of input fields?
// get the MathType of a Data object named 'vis5d'
FunctionType vis5d_type = (FunctionType) vis5d.getType();
// extract time, the domain of the FunctionType
RealType time = (RealType) vis5d_type.getDomain().getComponent(0);
Also, if the exception was thrown because index was in the domain of
function and it was mapped to iso-contour, are there other fields in
Visad range that would produce the same error when index is mapped to
it? What about other input fields in the domain besides index?
I think you'd get the same Exception with Flow, Text, Shape and
Tom Whittaker (tomw@xxxxxxxxxxxxx)
University of Wisconsin-Madison
Space Science and Engineering Center
Cooperative Institute for Meteorological Satellite Studies