PLOTting into a 2-D array [message #46769] |
Mon, 19 December 2005 09:42 |
M. Katz
Messages: 69 Registered: May 2005
|
Member |
|
|
Gurus,
Is there a way to use a command like PLOTS (or something related) to
put "z" data from an arbitrary x-y path into a 2-D (floating-point,
double, or long) image array?
With
PLOT, x, y, /nodata
PLOTS, x, y, color=zarray, /data
IDL draws a picture that can be captured as a 2D image array using
simple, direct graphics. And IDL does this so much faster than I could
possibly do it the long way.
Here's a statement of the problem. I have experimental data gathered
while a system is "scanning" an arbitrary (x,y) path. The data arrays
can contain hundreds of MB of data. When I use PLOTS, and BYTSCL() the
"signal," I can generate a decent visualization of my data fairly
quickly. But to capture the resultant "image" means converting to
whatever the device-limited color-scale is--like 8-bit.
The "long way" solution would be to discretize the (x,y) path
coordinates into pixel-x-y values, and then do some
summing/histogramming/averaging/etc. on the z values. This is obviously
very time consuming. What would be ideal is to "draw" the data into the
array pixels, using the speed of PLOTS or a similar, optimized routine.
I understand that there are some subtleties regarding multiple data
points assigned to the same pixel and such, but I'm willing to live
with a slightly coarse rendering if I can make back the speed of PLOTS.
Thanks,
M. Katz
|
|
|