Re: A Lookup-table-ish problem [message #839] |
Thu, 29 April 1993 14:32 |
deutsch
Messages: 19 Registered: February 1992
|
Junior Member |
|
|
In article <1rp3hoINNr48@elroy.jpl.nasa.gov>, ian@gomez.jpl.nasa.gov (H. Ian Novack) writes:
> A problem for everyone to ponder:
>
> I have some water vapor image data that I'm converting to elevation. To do
> this, I have what amounts to two look-up tables of values. In other words, I
> have an array of water vapor values and an array of corresponding elevation
> values. I wish to take my water vapor image and make it into an elevation
> image. I hacked a routine to do this (using WHERE()), but it takes forever
> to run (on a 512x614 image) as it has several layers of loops.
>
> Is there something in IDL (v 3.0.0) or its userlib that does this? Anything
> like efficiently?
>
You can directly subscript a look-up table with the desired data.
e.g.:
IDL> a=indgen(3,3)
IDL> lut=[100,101,103,114,109,106,11,108,109,110,111,112]
IDL> print,lut(a)
100 101 103
114 109 106
11 108 109
sound like what you're after?
Eric
Eric Deutsch
University of Washington
Department of Astronomy FM-20
Seattle, WA 98195
deutsch@astro.washington.edu or UWSPAN::JANUS::DEUTSCH
|
|
|