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

Home » Public Forums » archive » Re: Need Help Resolving ENDIF Errors
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: Need Help Resolving ENDIF Errors [message #65531 is a reply to message #65526] Tue, 10 March 2009 15:18 Go to previous messageGo to previous message
Andi Walther is currently offline  Andi Walther
Messages: 5
Registered: March 2009
Junior Member
On 10 Mrz., 16:56, Andi Walther <andi.b.walt...@googlemail.com> wrote:
>> XX=readfits('/home/kphil/img/img213.fits')
>> YY=readfits('/home/kphil/img/img213.fits', EXTEN_NO=1)
>> ZZ =YY
>
>> G  = where(ZZ ne 0)
>> invarmap=  ZZ * 0.0
>> invarmap[G] = (1./(ZZ[G])^2)
>
>> if ((where(XX ne XX))(0) ne -1) then begin
>>    ZZ[where(XX ne XX)] = 0
>>    XX[where(XX ne XX)] = 0
>> endif
>
> in case you meant
> if ((where(XX ne YY))(0) ne -1) then begin
>     ZZ[where(XX ne YY)] = 0
>     XX[where(XX ne YY)] = 0
>  endif
>
> you can just use
>
> IDL> ivermap = (1/((ZZ^2)>1)) * (ZZ NE 0)
> IDL> ZZ = XX * ( XX EQ YY)

And, you can't us blocks (everything that starts with a BEGIN) in
batch files.
That means you will get this error message with

IDL> @my_program_with_an_if_block
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: using irregularly spaced coordinates with ray-casting in iVolume
Next Topic: OpenADDE and IDL

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

Current Time: Wed Oct 08 19:29:06 PDT 2025

Total time taken to generate the page: 0.00444 seconds