Re: IDL code running error in envi environment(ENVI + IDL) [message #88865 is a reply to message #88858] |
Mon, 30 June 2014 02:22  |
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
|
|
|