|
<< Click to Display Table of Contents >> IDL Scripting Examples - Interferometry Using .sav |
![]() ![]()
|
Purpose
It allows to execute one or more processing steps by preparing an IDL script, which actually calls specific SARscape routines.
The SARscapeBatch object has to be used to call any SARscape functionality by means of an IDL script. This object is loaded starting from a .sav file that was previously stored. This can be done using the "store batch" functionality found in each SARscape panel.
Note: The geocoding example contains all the steps in order to know all the possible indications that can be performed to work with IDL scripts. We strongly suggest to try the geocoding example with all the functionality before starting with this example.
Technical Note
The use of this functionality foresees the knowledge of the IDL programming language. The SARscape IDL scripting technology is also exploited in the batch processing.
The IDL script must be structured as shown in the sarscape_script_from_sav_batch52.pro example file
(found in the following zip folder: "C:\Program Files\SARMAP SA\SARscape\examples\example_sarscape_script_from_sav_batch52.zip", which is relevant to the execution of interferometry and filtering process.
To start this example, please perform the following steps:
•Run IDL or IDL + ENVI
•Open the IDLscript_example_geocoding.pro in IDL and click the compile button
•To Run the script you need to write the following command in the IDL console: SARscape_script_from_sav_batch52,'runIDL_example_batch_steps_file_52.sav'
The content of the IDL example script is synthetically described here below:
| 1) | SARscape batch initialization and temporary directory setting (preparatory step) |
The SARscape extension file is restored from the original repository folder. The folder path, where the default processing values are copied, is defined. It has to be noted that all the alternative default settings (General, VHR, HR, MR, etc.) are stored within this folder, but the one which is used is always the "SARscape_default_values_dataset_General.txt".
It is convenient to set a different directory than the one selected in the ENVI "File>Preferences>Directories>Temporary Directory", in order to avoid overwriting the standard SARscape default settings.
In this step, the batch file (.sav file) is loaded.
restore, FILENAME = aBatchName ;;;restore the batch
An object called alist is created. It contains the list of the (batch) steps that have to be executed.
| 3) | Load number of step |
| The number of steps is loaded |
| aSize = N_ELEMENTS(aList) ;;;Total Number of steps |
| 4) | SARscape object check |
For the alist object created in step 2, the following checks are performed:
•the object has to be valid
FOR step=0, aSize-1 DO BEGIN
OB = aList[step] ;;;Load STEP
IF (~OBJ_VALID(OB)) THEN BEGIN ; check Object
k = getNoInitObjectError('STEP INCONSISTENCY')
continue
ENDIF
•The object has to be a SARscape batch object
| IF (~obj_isa(OB,'SARSCAPEBATCH')) THEN continue ; check if the object is a SARscape object |
| 5) | Interferogram Generation input data and parameters (Input data and parameter definition - step A in the .pro file) |
The input/output data and parameters are entered. In our example they consist of: two input SAR images (*_slc); an input Digital Elevation Model (*_dem); one output root name (*interf*); the parameters relevant to both the azimuth looks (5) and range looks (1).
6) Fill the parameters (Input and output files and processing parameters are set)
| 7) | Adaptive Filter and Coherence Generation input data and parameters (Input data and parameter definition - step B in the .pro file) |
The input/output data and parameters are entered. In our example they consist of: three input images (*_interf_Reference_pwr, *_interf_Secondary_pwr, *_interf_dint); one output root name (*newtestInterf*); the parameters relevant to filtering method (GOLDSTEIN) and the Goldstein Win Size (32).
8) Fill the parameters (Input and output files and processing parameters are set)
9) Verify the parameters (All previous settings are checked, optional but important)
All details relevant to the specific process, which is going to be executed, are reported; in case the instruction is modified using "silent=0" (instead of "silent=1") the details are not shown. In any case, if all previous steps have been properly done, this function provides the code 1 (i.e. ok message); if any mandatory field was missing, this function provides the code 0 (i.e. failure message).
10) Process execution (The process is executed)
If the previous setting was properly done this function provides the code 1 (i.e. ok message) and the processing is successfully executed; otherwise the function provides the code 0 (i.e. failure message).
Section Content
Input Parameter(s)
Refer to the Technical Note.
General Functions
Refer to the IDL help documentation.
Specific Function(s)
Refer to the IDL help documentation.
References
None.