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

Home » Public Forums » archive » Re: lunch envi function in 'batch mode'
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: lunch envi function in 'batch mode' [message #46326 is a reply to message #46310] Thu, 17 November 2005 05:08 Go to previous messageGo to previous message
Robert Moss is currently offline  Robert Moss
Messages: 74
Registered: February 1996
Member
S.Cogliati wrote:
> Hi, I'm developing an Idl application that utilize an Envi function
> (Envi_compute_sun_angles) so I lunch envi in batch mode in this way:
>
> ;start ENVI batch_mode
> OpenW, batch_lun, 'batch_log_from_ENVI.txt', /Get_LUN
> ENVI, /restore_base_save_files
> ENVI_INIT, /batch_mode, batch_unit=batch_lun
> free_lun,batch_lun
>
> ;compute the elevation angle
> elev=ENVI_COMPUTE_SUN_ANGLES (Day, Month, Year, GMTtime, Lat, Lon)
>
>
> I'm sure that when I compile the project the Envi rutines are loaded,
> but the first time that I run the code Idl stops at the Envi function
> call instruction and send me this error message:
>
> % XMANAGER: Caught unexpected error from client application. Message
> follows...
> % Variable is undefined: ENVI_COMPUTE_SUN_ANGLES.
> % Execution halted at: RHO_PANEL 47
> C:\OO_import_v20.0mod\rho_panel.pro
> % COMPUTE_STAT2 50
> C:\OO_import_v20.0mod\compute_stat2.pro
> % XMANAGER_EVLOOP_STANDARD 478
> C:\RSI\IDL61\lib\xmanager.pro
> % XMANAGER 708
> C:\RSI\IDL61\lib\xmanager.pro
> % GUI_PRO 27
> C:\OO_import_v20.0mod\gui.pro
> % $MAIN$
>
>
> After the first time that Idl stops there code runs correctly.
>
> Regards, S.Cogliati
>

I do not think this is an ENVI problem. Try putting the command
COMPILE_OPT STRICTARR at the top of the procedure that is calling
ENVI_COMPUTE_SUN_ANGLES. I suspect IDL thinks it is a variable instead
of a function. If you are using parenthesis for array indices (shame on
you), try using FORWARD_FUNCTION ENVI_COMPUTE_SUN_ANGLES instead.

--
Robert Moss, PhD
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: SMOOTH function for 3D
Next Topic: image display with different pixel size in x & y

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

Current Time: Thu Oct 09 11:01:07 PDT 2025

Total time taken to generate the page: 0.95374 seconds