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

Home » Public Forums » archive » IDL code running error in envi environment(ENVI + IDL)
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
IDL code running error in envi environment(ENVI + IDL) [message #88854] Thu, 26 June 2014 01:51 Go to next message
SUNIL CHOUDHURY is currently offline  SUNIL CHOUDHURY
Messages: 11
Registered: June 2014
Junior Member
Hello Everyone,

while running the code in ENVI + IDL , I am getting an error, and I am not able to under stand the reson why the code is not working properly.
Though I have written everything correctly.
Kindly help me.

I am attaching the code and the error which I am getting for reference.

CODE -

pro bstats
ENVI, /RESTORE_BASE_SAVE_FILES
ENVI_BATCH_INIT, LOG_FILE = 'batch.log'
ENVI_OPEN_FILE, 'C:\Users\Sachin\Desktop\atvshot.jpg',r_fid=fid
IF (fid EQ -1) THEN BEGIN
ENVI_BATCH_EXIT
RETURN
ENDIF
ENVI_FILE_QUERY, fid, NB = nb
pos = LINDGEN(nb)
ENVI_DOIT, 'envi_stats_doit', $
FID = fid, POS = pos, DIMS = dims, $
DMIN = dmin, DMAX = dmax, MEAN = mean, $
STDV = stdv, COMP_FLAG = 1
; make sure each one is defined on the return
PRINT, dmin, dmax, mean, stdv
; Exit ENVI
ENVI_BATCH_EXIT
END


Error which I am getting -

IDL>bstats
% Procedure was compiled while active: BSTATS. Returning.
% Compiled module: BSTATS.
% Can't continue from this point.
% Error occurred at: $MAIN$
% Execution halted at: $MAIN$
IDL>
Re: IDL code running error in envi environment(ENVI + IDL) [message #88858 is a reply to message #88854] Thu, 26 June 2014 21:58 Go to previous messageGo to next message
skymaxwell@gmail.com is currently offline  skymaxwell@gmail.com
Messages: 127
Registered: January 2007
Senior Member
Good day !

I didn't get the same error in your code on my ENVI+IDL.
Which version of ENVI and IDL do you use ?

But I catch another error - you missed DIMS keyword in ENVI_FILE_QUERY routine
You can fix it by ENVI_FILE_QUERY, fid, NB = nb, DIMS=dims

Now your code works fine.




четверг, 26 июня 2014 г., 12:51:56 UTC+4 пользователь SUNIL CHOUDHURY написал:
> Hello Everyone,
>
>
>
> while running the code in ENVI + IDL , I am getting an error, and I am not able to under stand the reson why the code is not working properly.
>
> Though I have written everything correctly.
>
> Kindly help me.
>
>
>
> I am attaching the code and the error which I am getting for reference.
>
>
>
> CODE -
>
>
>
> pro bstats
>
> ENVI, /RESTORE_BASE_SAVE_FILES
>
> ENVI_BATCH_INIT, LOG_FILE = 'batch.log'
>
> ENVI_OPEN_FILE, 'C:\Users\Sachin\Desktop\atvshot.jpg',r_fid=fid
>
> IF (fid EQ -1) THEN BEGIN
>
> ENVI_BATCH_EXIT
>
> RETURN
>
> ENDIF
>
> ENVI_FILE_QUERY, fid, NB = nb
>
> pos = LINDGEN(nb)
>
> ENVI_DOIT, 'envi_stats_doit', $
>
> FID = fid, POS = pos, DIMS = dims, $
>
> DMIN = dmin, DMAX = dmax, MEAN = mean, $
>
> STDV = stdv, COMP_FLAG = 1
>
> ; make sure each one is defined on the return
>
> PRINT, dmin, dmax, mean, stdv
>
> ; Exit ENVI
>
> ENVI_BATCH_EXIT
>
> END
>
>
>
>
>
> Error which I am getting -
>
>
>
> IDL>bstats
>
> % Procedure was compiled while active: BSTATS. Returning.
>
> % Compiled module: BSTATS.
>
> % Can't continue from this point.
>
> % Error occurred at: $MAIN$
>
> % Execution halted at: $MAIN$
>
> IDL>
Re: IDL code running error in envi environment(ENVI + IDL) [message #88865 is a reply to message #88858] Mon, 30 June 2014 02:22 Go to previous message
SUNIL CHOUDHURY is currently offline  SUNIL CHOUDHURY
Messages: 11
Registered: June 2014
Junior Member
On Friday, June 27, 2014 10:28:13 AM UTC+5:30, skymaxwell wrote:
> Good day !
>
>
>
> I didn't get the same error in your code on my ENVI+IDL.
>
> Which version of ENVI and IDL do you use ?
>
>
>
> But I catch another error - you missed DIMS keyword in ENVI_FILE_QUERY routine
>
> You can fix it by ENVI_FILE_QUERY, fid, NB = nb, DIMS=dims
>
>
>
> Now your code works fine.
>
>
>
>
>
>
>
>
>
> четверг, 26 июня 2014 г., 12:51:56 UTC+4 пользователь SUNIL CHOUDHURY написал:
>
>> Hello Everyone,
>
>>
>
>>
>
>>
>
>> while running the code in ENVI + IDL , I am getting an error, and I am not able to under stand the reson why the code is not working properly.
>
>>
>
>> Though I have written everything correctly.
>
>>
>
>> Kindly help me.
>
>>
>
>>
>
>>
>
>> I am attaching the code and the error which I am getting for reference.
>
>>
>
>>
>
>>
>
>> CODE -
>
>>
>
>>
>
>>
>
>> pro bstats
>
>>
>
>> ENVI, /RESTORE_BASE_SAVE_FILES
>
>>
>
>> ENVI_BATCH_INIT, LOG_FILE = 'batch.log'
>
>>
>
>> ENVI_OPEN_FILE, 'C:\Users\Sachin\Desktop\atvshot.jpg',r_fid=fid
>
>>
>
>> IF (fid EQ -1) THEN BEGIN
>
>>
>
>> ENVI_BATCH_EXIT
>
>>
>
>> RETURN
>
>>
>
>> ENDIF
>
>>
>
>> ENVI_FILE_QUERY, fid, NB = nb
>
>>
>
>> pos = LINDGEN(nb)
>
>>
>
>> ENVI_DOIT, 'envi_stats_doit', $
>
>>
>
>> FID = fid, POS = pos, DIMS = dims, $
>
>>
>
>> DMIN = dmin, DMAX = dmax, MEAN = mean, $
>
>>
>
>> STDV = stdv, COMP_FLAG = 1
>
>>
>
>> ; make sure each one is defined on the return
>
>>
>
>> PRINT, dmin, dmax, mean, stdv
>
>>
>
>> ; Exit ENVI
>
>>
>
>> ENVI_BATCH_EXIT
>
>>
>
>> END
>
>>
>
>>
>
>>
>
>>
>
>>
>
>> Error which I am getting -
>
>>
>
>>
>
>>
>
>> IDL>bstats
>
>>
>
>> % Procedure was compiled while active: BSTATS. Returning.
>
>>
>
>> % Compiled module: BSTATS.
>
>>
>
>> % Can't continue from this point.
>
>>
>
>> % Error occurred at: $MAIN$
>
>>
>
>> % Execution halted at: $MAIN$
>
>>
>
>> IDL>




i am using envi 4.8
and the error was fixed
thanks for your valuable suggestion
skymaxwell
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: esri shape file
Next Topic: Problem with SPAWN command in IDL code

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

Current Time: Wed Oct 08 11:45:46 PDT 2025

Total time taken to generate the page: 0.00474 seconds