====== Processing with ROI_PAC ====== The following sections explain how to produce differential interferograms using ROI_PAC. ===== File Management ===== ROI_PAC assumes that the input data files will conform to a common naming structure. All data files should **begin** with IMAGERY and the leader file should **begin** with SARLEADER. Rename your files appropriately. It is also convenient to append the date to the end of each file name (i.e. IMAGERY19920715). SAR scenes of the same orbit and track, but adjacent frames can be differentiated if the the full time stamp is used in the file name, down to the millisecond (i.e. IMAGERY19920715184916). $ mv dat* IMAGERY19920715184916 $ mv lea* SARLEADER19920715184916 It's generally a good idea to have a working directory which is separate from where you archive SAR data, since you may in the future want to use the same SAR scene in a different interferogram. It is convenient to use the dates of the SAR scenes (YYYYMMDD) to name the appropriate files and directories. To prepare for processing an interferogram, create a working directory for the interferogram that you will be producing (e.g. run1/). Within this directory, create a folder for each SAR scene (e.g. run1/19970104/ and run1/19991220/). $ mkdir run1 run1/19970104 run1/19991220 Copy the IMAGERY* and SARLEADER* files from the archive for each scene into the appropriate processing folders. (VDF* files are not necessary but can be copied also if desired.) 8-) //Tip: Instead of copying the large data files from the archive to your workspace, use the ''ln'' command to make a symbolic link to the IMAGERY* file in order to save disk space.// $ cd 19920715 $ ln -s /path/to/archive/scene1/IMAGERY* IMAGERY19920715184916 $ ln -s /path/to/archive/scene1/SARLEADER* SARLEADER19920715184916 $ cd ../19970802 $ ln -s /path/to/archive/scene2/IMAGERY* IMAGERY19970802184917 $ ln -s /path/to/archive/scene2/SARLEADER* IMAGERY19970802184917 ===== make_raw.pl ===== The ''make_raw'' script will prepare the files for processing in ROI_PAC, performing an initial check of the file, reformatting the data, locating the appropriate orbit file, and performing a Doppler computation. Its usage is as follows: $ make_raw.pl ORBIT_TYPE SARLEADER_FILE DATE You can also run ''make_raw.pl'' with no arguments to see a detailed usage page. Move to the directory containing the master SAR scene and run the following command: $ cd run1/19970104 $ make_raw.pl ODR SARLEADER19970104 19970104 Repeat in the directory of the slave SAR scene, adjusting the date and filename appropriately. You are now ready to produce an interferogram. ===== Parameter File Setup ===== The parameters that ROI_PAC uses to create interferograms must be specified in a text file, which is then passed to the processing script. This file can have any name but by convention it is called ''param.txt''. Create ''param.txt'' in the directory which contains the directories for the master and slave SAR scenes (e.g. the run1/ directory created in the previous step). At the basic level, the ''param.txt'' file must list four parameters: the directories containing the master and slave SAR scenes, the main output directory (called ''INT'' by convention but may be named arbitrarily), and the location of the DEM file that will be used. Below is an example of the layout of a parameter file: SarDir1=19970104 SarDir2=19991220 IntDir=INT DEM=/path/to/dem/file.dem The ''SarDir1'', ''SarDir2'', ''IntDir'', and ''DEM'' parameters are always required. Additional optional parameters include the preferred spatial resolution, the type of spatial filter, and other specialized modifications. For a list of all the possible parameters, see [[parameter_details|Parameter File Details]]. ===== process_2pass.pl ===== The primary processing script is called ''process_2pass.pl''. It will run a long series of scripts that will eventually produce a differential interferogram. The script requires only the name of the parameter file as an argument: $ process_2pass.pl param.txt Processing a single interferogram takes on the order of half an hour to an hour. All output files and directories will be placed in the directory where ''param.txt'' resides. If the script terminates successfully, the final line of terminal output will be "That's all folks." ^_^ For details about how to start and stop the script at various points, see [[process2pass_details|process_2pass Details]]. Since ''process_2pass.pl'' performs several complicated tasks, it is not uncommon for the scripts to fail. Two log files (''log'' and ''log1'') are produced in the directory in which your data is stored. These files record the status of the programs, and are useful for diagnosing problems. If things go awry, visit the [[:trouble|troubleshooting page]] for solutions to some common problems. In order to resolve an uncommon problem, be prepared to delve into the source code. :-(