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

Home » Public Forums » archive » Image division causes Floating illegal operand
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Image division causes Floating illegal operand [message #48769] Thu, 18 May 2006 10:55
elsueniero is currently offline  elsueniero
Messages: 5
Registered: May 2006
Junior Member
Hello,

I am writing a small program to calculate NDVI from MODIS images. I
got a mask of the valid pixels (no clouds or water) and two calibration
coefficients. The code is

partA = (b1*coef[0,1] - b0*coef[0,0])*mask
partB = (b1*coef[0,1] + b0*coef[0,0])*mask

ndviimg = partA / partB

ind = Where(Finite(ndviimg, /NAN), count)
IF count GT 0 THEN ndviimg[ind] = -1000.0

But I allways get an "Program caused arithmetic error: Floating illegal
operand" even if the resulting image looks good.
The problem is in the division, because if I comment the line, it won't
show.

Any ideas how to avoid this?
[Message index]
 
Read Message
Previous Topic: IDL command for directory files listing
Next Topic: Re: IDL command for directory files listing

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

Current Time: Sat Oct 11 10:42:36 PDT 2025

Total time taken to generate the page: 1.67967 seconds