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

Home » Public Forums » archive » Re: Convert pixel values
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Convert pixel values [message #42400] Tue, 08 February 2005 00:50
Timm Weitkamp is currently offline  Timm Weitkamp
Messages: 66
Registered: August 2002
Member
On 07.02.05 at 23:41 -0600, Michael Wallace wrote:

>> I thought this was a simple problem: I need to convert all pixels with
>> a value of -32767 to a value of 0 in an image with 175 bands. Becoming
>> nightmare! Is there a simple way to do it?
>
> ; arr is your array
> arr[where(arr eq -32767)] = 0

Yes, or:
arr = arr * (arr ne -32767)

--
Timm Weitkamp <http://people.web.psi.ch/weitkamp>
Re: Convert pixel values [message #42401 is a reply to message #42400] Mon, 07 February 2005 21:41 Go to previous message
Michael Wallace is currently offline  Michael Wallace
Messages: 409
Registered: December 2003
Senior Member
> I thought this was a simple problem: I need to convert all pixels with
> a value of -32767 to a value of 0 in an image with 175 bands. Becoming
> nightmare! Is there a simple way to do it?

; arr is your array
arr[where(arr eq -32767)] = 0

-Mike
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Convert pixel values
Next Topic: Re: MAP_SET vs MAP_PROJ_*

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

Current Time: Wed Oct 08 19:36:34 PDT 2025

Total time taken to generate the page: 0.00489 seconds