X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 17 Mar 2015 01:13 AM by  anon
ENVI_QUAC_DOIT
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
17 Mar 2015 01:13 AM
    Hi, I am using "ENVI_QUAC_DOIT" IDL Code obtained from ENVI help but it gave an error - Please help me to run this code. Regards, Bilal (Hong Kong PolyU) Error: % Restored file: ENVI_SPC. % Procedure was compiled while active: ENVI_QUAC. Returning. % Compiled module: ENVI_QUAC. % Can't continue from this point. % Execution halted at: $MAIN$ QUAC_CODE: PRO ENVI_QUAC COMPILE_OPT idl2 ; print, 'Starting batch process.' print, systime() input_location = 'F:\input\' output_location = 'F:output\' MOD02_rad= File_Search(input_location + '*.img',COUNT=count_in) ;FOR k=0, 0 DO BEGIN FOR k=0, count_in-1 DO BEGIN Print, 'Processing File =', k +1 Print, 'Total Files=', Count_in ; Open the input file ; envi_open_file, MOD02_rad[k], r_fid=fid_MOD02 if (fid_MOD02 eq -1) then return ; ; Set the keywords. Perform the ; QUick Atmospheric Correction on all ; pixels and all bands in the file. ; ENVI_FILE_QUERY, fid_MOD02, dims=dims, nb=nb pos = lindgen(nb) File_name = STRJOIN(STRSPLIT(STRMID(FILE_BASENAME(MOD02_rad[k], '.hdf'), 0, 26), '.', /EXTRACT), '_') Print, 'out_name=', File_name ; ; Run the DOIT ; envi_doit, 'envi_quac_doit', $ fid=fid_MOD02, pos=pos, dims=dims, $ quac_sensor='MODIS', $ out_name=output_location + File_name + '_QUAC.img', r_fid=r_fid ENDFOR print, 'Finished batch process.' print, systime() Print, '~ Job Completed ~' END

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    23 Mar 2015 08:39 AM
    I could not reproduce the same error as you show with the code you sent. However, if you are running this from IDL only, you will first need to initialize ENVI batch mode using ENVI_BATCH_INIT so that IDL is aware of the ENVI routines. Also, I would suggest renaming the program something like 'envi_quac_example' since 'envi_quac' might conflict with internal routines.
    You are not authorized to post a reply.