comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: [Q]IDL: Using WHERE.
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: [Q]IDL: Using WHERE. [message #5962 is a reply to message #5958] Thu, 21 March 1996 00:00 Go to previous messageGo to previous message
Paul Schopf is currently offline  Paul Schopf
Messages: 2
Registered: March 1996
Junior Member
Thomas A. McGlynn wrote:

[snip, snip, snip]

> This is something that I've always wanted to be able to do efficiently
> but seem always to need to go through large arrays twice.
> I frequently run into the situation that I want to do one thing for

> with some bad pixels set to <0 and I want to display a logarithmic
> image of the data, I might want to do something like:
>
> w=where(image le 0)
> ww = where(image gt 0)
> qmin = min(image(ww))
> image(w) = .5*qmin
> tvscl,alog(image)
>

I know that this is not exactly what we are discussing here, but
how about

tvscl, alog( image > 0.5*min( image(where(image gt 0))) )

BTW, For Andy Loughe, note that we only ever need 1 line of
code, for maximum obfuscation. In this case if the where
statement fails, you are screwed anyway.

For Tom, I won't guarantee that this takes any less time.


--
Paul Schopf mailto://schopf@gsfc.nasa.gov
Coupled Climate Dynamics Group/971 http://ccdg.gsfc.nasa.gov/~paul
NASA Goddard Space Flight Center
Greenbelt, MD 20771
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Line index
Next Topic: [Q]: How to calculate distance from GPS measurements

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 23:59:35 PDT 2025

Total time taken to generate the page: 0.56926 seconds