[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: visualizing data in 3-D
Hi Patrick--
I am not sure if you have gotten any responses to your question. I
think your question is specialized enough that it may be difficult for
us to understand it.
However, before you go delving into all the intricacies of "thinking
in IDL", using HISTOGRAM and wrapping array indices around your brain,
maybe you could take the low-tech approach.
I think what you want to do is simply locate the same density level in
each measurement train. This might be best accomplished using
VALUE_LOCATE.
levels = [21.9, 25, 30, 35, 40]
i1 = value_locate(y1, levels)
i2 = value_locate(y2, levels)
i3 = value_locate(y3, levels)
This will find the index position of each of the levels, in each of
the measurements. I1 are the indices of the 21.9, 25, ... values in
the first set of measurements, etc. This is not exact actually, but
it finds the nearest neighbor.
Then all you need to do is stitch them together.
for j = 0, n_elements(levels)-1 do $
oplot, [x1(i1(j)), x2(i2(j)), x3(i3(j))], [y1(i1(j)), y2(i2(j)), y3(i3(j))]
Hopefully from there you can decide if you need more precision,
faster, etc. You can also look at code like TABINV in the IDL
Astronomy Library, which does tabular interpolation.
Craig
--
--------------------------------------------------------------------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
--------------------------------------------------------------------------