X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 28 Apr 2009 09:22 AM by  anon
stretch_doit ERROR
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
28 Apr 2009 09:22 AM
    I get the following error ENVI Error [Fri Apr 24 15:46:20 2009] : An error has occurred during processing Error: "STRLOWCASE: Variable is undefined: PROC_NAME." The result may be invalid. From the following code (errors out on stretch_doit) run from IDL PRO DEFAULTSTRETCHSAVE ;Striclty enforce new square brackets syntax for dereferencing variables COMPILE_OPT STRICTARR ; Restore the ENVI core files ENVI, /RESTORE_BASE_SAVE_FILES ; Initialize ENVI and send all errors to an error file. ENVI_BATCH_INIT, LOG_FILE = 'c:\Cumb_SPOT5\batch.log' newdir='C:\Cumb_SPOT5' ;newdir ='E:\Norah\cumberland peninsula 2007\spot5 2p5m pan' ;;--- get a string array of all files with html extension files=file_search(COUNT=nfiles,newdir,'*.tif') j=0 FOR j=0,nfiles-1 DO BEGIN ;;--- for each file get the file name, dir name and make new file name fullfilename=files[j] dirname= file_dirname(fullfilename) filename= file_basename(fullfilename) newdirname=dirname + '\MikeStretch' newfilename='ep_' + filename newfullfilename= newdirname + '\' + newfilename ;;--- open file ENVI_OPEN_DATA_FILE, fullfilename, /TIF, r_fid=fid IF (fid EQ -1) THEN BEGIN ENVI_BATCH_EXIT RETURN ENDIF ENVI_FILE_QUERY, fid, DIMS=dims, NB=nb pos = LINDGEN(nb) ;Stretch Image using ENVI 2% linear stretch default and write output to new file ENVI_DOIT,’stretch_doit’, DIMS=dims, FID=fid, I_MAX=98.0, I_MIN=2.0, POS=pos, $METHOD=1, R_FID=r_fid, OUT_MIN=0, OUT_MAX=255, RANGE_BY=0, OUT_DT=1, OUT_NAME="test" ;, IN_MEMORY=0, OUT_NAME=newfullfilename ;;--- close the files ENVI_FILE_MNG, ID=fid, /REMOVE ;ENVI_FILE_MNG, ID=r_fid, /REMOVE ;;---For future, measure the range of values in the histogram and if ;;---max >2* min then save file to a folder to be examined ENDFOR ;exit envi and batch mode ENVI_BATCH_EXIT END Any + all comments / suggestions welcome TX!

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    29 Apr 2009 12:00 PM
    I copied your code and it appears that it is not resolving the 'stretch_doit'.  In fact the single quotes around it look strange and slanted unlike the typical " ' ".  I was getting the exact same message but after I removed and entered the single quotes around the 'stretch_doit', it turned red and was resolved and I was able to run your code.
    You are not authorized to post a reply.