There's a much easier way. The Statistics module
computes min and max directly.  Also, if you have
the series available (i.e., you import it as a series rather
than as a set of individual files) you can just pass the
series directly to the "min" input of Autocolor and
it will do exactly what you want it to do.

(btw for future reference, if you *wanted* to find the
min or max of the set of data elements, you would
do ForEachMember on the *data array*, and as you
thought, use GetGlobal and SetGlobal to cache
the current min or max. But generally this is a rather
slow way to do things and should certainly be avoided
if there are easy alternatives, as there are here)

Donna

_________________________________
Donna L. Gresh, Ph.D.
Visual Analysis Group
IBM T.J. Watson Research Center
(914) 784-5049
[EMAIL PROTECTED]


Trevor Wood <[EMAIL PROTECTED]> on 08/14/2000 04:35:11 PM

Please respond to [email protected]

To:   [email protected]
cc:
Subject:  [opendx-users] Compute min and max





Hi all.  I'm new to OpenDX and am trying to figure out how to use the
compute tool to calculate the min and max values of the data array to use
in AutoColor.  Basically, I have a series of surface data and I would like
to determine a fixed colormap so that the ColorBar will remain unchanged
as the sequencer plays.

I was thinking that I could pipe the series through ForEachMember then
through Compute with the expression "min(a,b)" where `b' is somehow saved
from the previous iteration (using GetLocal and SetLocal perhaps?).
However, it appears that min(a) works on an element-by-element basis
instead of finding the minimum value of the entire data array.

Any insights would be greatly appreciated.
Trevor



Reply via email to