Hello,
I am literally just getting started with IDL so forgive me for making any seriously obvious mistakes. I am just running a few batch examples from the ENVI Reference Guide. I've just copied and pasted the CROSS_TRACK_CORRECTION_DOIT example into the IDL DE, save it, compile it, and run it. It seems to compile successfully and run through the couple of print statements I threw in for understanding. But it doesn't create a logfile or an output image. I know this is probably something extremely fundamental, but I am not seeing the solution. Any thoughts? script below:
pro example_cross_track_correction_doit
;
; First restore all the base save files.
;
envi, /restore_base_save_files
;
; Initialize ENVI and send all errors
; and warnings to the file batch.txt
;
envi_batch_init, log_file='C:\Program Files\Exelis\ENVI50\classic\data\batch.txt'
;
; Open the input file
;
envi_open_file, 'C:\Program Files\Exelis\ENVI50\classic\data\bhtmref.img', r_fid=fid
if (fid eq -1) then begin
; envi_batch_exit
return
endif
; Set the keywords. We will perform the
; cross track correction on all samples
; and bands in the file. The correction will
; be in the samples direction, multiplicative,
; and with a 2nd order polynomial.
;
envi_file_query, fid, ns=ns, nl=nl, nb=nb
dims = [-1L, 0, ns-1, 0, nl-1]
pos = lindgen(nb)
out_name = 'C:\Program Files\Exelis\ENVI50\classic\data\bhtmref_xtrk.img'
range_dir = 0
method = 1
order = 2
;
; Perform the cross track correction
;
envi_doit, 'cross_track_correction_doit', fid=fid, pos=pos, dims=dims, range_dir=range_dir, out_name=out_name, method=method, order=order
print, 'out_name =', out_name
print, 'range_dir =', range_dir
print, 'dims =', dims
; Exit ENVI
;
; envi_batch_exit
end
|