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

Home » Public Forums » archive » Re: divide by zero problems
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: divide by zero problems [message #15355 is a reply to message #15333] Tue, 11 May 1999 00:00 Go to previous messageGo to previous message
korpela is currently offline  korpela
Messages: 59
Registered: September 1993
Member
In article <3737C79C.372FA82E@aims.gov.au>,
Mark Rehbein <mrehbein@aims.gov.au> wrote:
> composite=sum image/ sum mask.
>
> sometimes my images are very cloudy and as such my "sum mask" has zero's
> in it and likewise for my "sum image". So I get divide by zero's and
> NaN's in my resultant composite image. In fact I get whole image of
> NaN's in my composite even though my sum image and sum mask have decent
> values in them.

Rather than using 0 in the mask image you could use a small non-zero value
like 1e-6.

Another option is after the division you can set the NaN values to another
value. The following statement will set NaN pixels in an image to 0.

image(where(image ne image))=0

Eric
--
Eric Korpela | An object at rest can never be
korpela@ssl.berkeley.edu | stopped.
<a href="http://setiathome.ssl.berkeley.edu/~korpela">Click for home page.</a>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Making an array of structures containing pointers
Next Topic: coherence test implementation

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

Current Time: Sun Oct 12 07:20:50 PDT 2025

Total time taken to generate the page: 0.63558 seconds