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

Home » Public Forums » archive » I have a problem with ENVI's Band Math Tool and functions written by me.
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: I have a problem with ENVI's Band Math Tool and functions written by me. [message #38140 is a reply to message #38083] Sun, 22 February 2004 17:16 Go to previous message
tianyf_cn is currently offline  tianyf_cn
Messages: 19
Registered: November 2002
Junior Member
wl2776@yandex.ru (wl) wrote in message news:<1c9e5a19.0402190718.6cd9ec66@posting.google.com>...
> I have a function:
>
> function xlorofil, b1, b2
> if (b2 ne 0) then begin
~~~~~~~~~
ENVI regards it as a variable (not a 2-d array).

I recommend you to use WHERE function to find the subscripts of
nonzero pixels and then perform calculations.

Regard,
Tian.



> return, 0.88*(b1/float(b2))^(-2.26)
> endif else begin
> return, -2
> endelse
> end
>
> It is situated in the file in save_add directory.
> On startup idlde writes that this module was compiled successfully.
>
> When I try to use it in Band Math
>
> xlorofil(b1,b2)
>
> I get a message saying that I have entered an invalid expression.
>
> However command
>
> print, xlorofil(1,2)
>
> executed from the command line of idlde, works fine.
>
> And the expression
>
> xlorofil(b1,2)
>
> is accepted by the Band Math tool.
>
> Where is the problem?
> Why cannot I execute my funcion on two image bands?
[Message index]
 
Read Message
Read Message
Previous Topic: Array string
Next Topic: String composition

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

Current Time: Sun Oct 12 10:39:43 PDT 2025

Total time taken to generate the page: 0.87904 seconds