Sounds like you want to start up a batch session of ENVI. Here's how (from the ENVI docs under ENVI Programmer's Guide > Working in Batch Mode > Initiating Batch Mode):
Initiating ENVI batch mode requires you to restore several ENVI save files (.sav) and call the ENVI routine ENVI_BATCH_INIT. The combined process is referred to as initiating batch mode. The save files are binary format files that contain the ENVI library routines and internal variables required to run ENVI.
Do not attempt to initialize ENVI in batch mode from an IDL session that is currently running an interactive ENVI session. Instead, start a new IDL session to initialize ENVI in batch mode.
Start ENVI.
From the ENVI main menu bar, select File ? Preferences.
Click Miscellaneous and ensure that the Exit IDL on Exit from ENVI option is set to No.
Exit ENVI and, if required, exit IDL.
Start a new IDL session and enter the following command at the IDL command line:
ENVI, /RESTORE_BASE_SAVE_FILES
If you forget to use the keyword RESTORE_BASE_SAVE_FILES, you will start a normal ENVI session. If you have multiple versions of IDL installed on your computer, be sure that the IDL executable you are using to start a new IDL session is the same one associated with your ENVI installation (where the main ENVI directory is installed). In a standard UNIX installation, the ENVI executable file is in the following location:/usr/local/itt/idlxx/products/envixx/bin/envi.run
The path to the IDL executable in the same installation is in the following location:/usr/local/itt/idlxx/bin
This IDL installation includes an extra file (envi.sav) in the idlxx/lib/hook directory. If you try initiating batch mode from a separate installation of IDL (if you are not using ENVI + IDL), you will receive the error "Attempt to call undefined procedure/function: ENVI."
Next, call the ENVI__BATCH_INIT procedure from the IDL command line:
ENVI_BATCH_INIT
Calling ENVI_BATCH_INIT is nearly identical to starting a new ENVI session, except there is no GUI. After batch mode has been established, all subsequent calls to ENVI_BATCH_INIT are ignored.
The following is example code for initiating batch mode:
; *******************************************************
; This batch example shows how to initialize ENVI
; in batch mode.
;
; For more information see the ENVI Programmer's Guide.
; *******************************************************
; Copyright (c) 2000-2001, ITT Visual Information Solutions.
; *******************************************************
pro bt_init
envi, /restore_base_save_files
envi_batch_init, log_file='batch.log'
; Batch processing would go here
envi_batch_exit
end
|