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 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: lunch envi function in 'batch mode' [message #46310] Fri, 18 November 2005 09:25 Go to next message
MarioIncandenza is currently offline  MarioIncandenza
Messages: 231
Registered: February 2005
Senior Member
Hi,

Unless you really need ENVI functions that aren't implemented in IDL
(and there aren't that many), or are actually using the ENVI GUI, you
might want to use IDL routines, especially for simple things like solar
position. For instance, the ZENSUN routine does everything
ENVI_COMPUTE_SUN_ANGLES does:

http://www.mpimet.mpg.de/en/misc/software/idl/html/src/esrg/ zensun.pro

Cheers,

Edward Hyer.
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 next 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
Re: lunch envi function in 'batch mode' [message #46497 is a reply to message #46310] Tue, 22 November 2005 12:06 Go to previous message
S.Cogliati is currently offline  S.Cogliati
Messages: 3
Registered: August 2005
Junior Member
Mr. Hyer, I resolved my problem!!

thank you for the very usefull links.

regards S.Cogliati
  Switch to threaded view of this topic Create a new topic Submit Reply
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: Wed Oct 08 15:50:20 PDT 2025

Total time taken to generate the page: 0.00684 seconds