GAMMA DIFF/GEO Software: Reference Manual

Concatenation of SLC pairs (SLC_cat_all)

Perl script:  SLC_cat_all

Description

This is  a  guide on how to use the script SLC_cat_all to concatenate pairs of SLC images.  This script is used to concatenate a stack of acquisitions. Each acquisition consists of two sequential frames that must be concatenated to form a single larger image.  It is usually the case that the range lines in the overlap region do not precisely match one another, but have some azimuth or range offset due to differences in the processing parameters between the frames. This script estimates the offsets and generates a polynomial model used to resample the SLC data in the later frame to be precisely matched to the data in the first frame. The concatenation and resampling is determined using range and azimuth offset polynomials that are stored in the ISP offset/interferogram parameter file (OFF_par).  As input data the following inputs are required:

1. A set of pairs of SLC images that are to be concatenated. The first (earlier) SLC of each pair should be contained in one directory and the second (later) SLC of each pair should be located in a second directory

2. Tables of the SLC images and parameter files for each of the input directories containing the SLCs. The SLC tab has two columns, one line per SLC. In the first column is the SLC file name including the absolute or relative path to the SLC. In the second column contains the SLC parameter file name including the absolute or relative path to the SLC parameter file. These tables are called SLC_tab files and can be generated using the mk_tab script.

An example SLC_tab is shown below for 2 SLC images with relative paths:

slc/19990915.slc    slc/19990915.slc.par
slc/19991020.slc    slc/19991020.slc.par

Either include $DIFF_HOME/scripts in the PATH environment variable. Run the script without arguments to see the command line arguments:

$ SLC_cat_all
*** ./SLC_cat_all
*** Copyright 2012, Gamma Remote Sensing, v3.7 18-Aug-2012 clw ***
*** Resample a set of SLCs to a common reference SLC using a polynomial offset model ***

usage: ./SLC_cat_all <SLC_tab1> <SLC_tab2> <cslc_dir> <CSLC_tab> <mode> [rpos] [azpos] [npoly]

    SLC_tab1  (input) two column list of SLCs and SLC parameter files for the early frame
    SLC_tab2  (input) two column list of SLCs and SLC parameter files of the frames to concatenate to the frames in SLC_tab1
    cslc_dir  directory to receive the concatenated SLCs and ISP image parameter files
    CSLC_tab  (output) RCSLC_tab file for the concatenated SLC files
    mode      processing mode:
                0: create offset parameter files
                1: estimate initial range and azimuth offsets using orbit state vectors
                2: measure initial range and azimuth offsets using SLC images (optional)
                3: estimate range and azimuth offset models using correlation of image intensities (optional)
                4: concatenateSLC images using offset models
    phflg     phase offset correction flag:
                0: no phase offset correction for SLC-2 (default)
                1: apply phase offset correction to SLC-2
    rpos      center of patch in range (samples) (enter - for default: image center)
    azpos     center of patch in azimuth (lines) (enter - for default: 1024 lines before end of SLC-1)
    npoly     number of terms in the polynomial fit (1,3,4,6 default: 3)


The different modes represent steps in the processing that must be performed sequentially.  The input files are the SLC_tab file for the earlier frame, and the SLC_tab file for the later frame.  Since only a single SLC pair are concatenated in this example, SLC_tab1 and SLC_tab2 have only a single line.  

SLC_tab1:
slc/20110324T123632.slc  slc/20110324T123632.slc.par

SLC_tab2:
slc/20110324T123637.slc  slc/20110324T123637.slc.par

The number of lines in SLC_tab1 must match the number of entries in SLC_tab2.  There are a series of processing steps that are performed for all entries in SLC_tab1 and SLC_tab2, beginning with creation of the offset parameter file to contain information on the offset measurements and offset polynomials.

Mode 0: create offset parameter files for estimation of the offsets

The first step in the concatenation and resampling process is creating an offset parameter file.  The offset parameter files contain the parameters specifies the locations where offsets are measured and the range and azimuth offset polynomials for resampling the SLC.

Example:
SLC_cat_all SLC_tab1 SLC_tab2 cat_slc CAT_SLC_tab 0

The output directory for the concatenated SLCs is cat_slc This generates the following call to the program create_offset:

create_offset slc/20110324T123632.slc.par slc/20110324T123637.slc.par cat_slc/20110324T123632_20110324T123637.off < create_offset.in

The inputs to create_offset are derived from the SLC are the default values as shown below. Here is an example of the offset and interferogram parameter file after all processing steps have been completed:

Gamma Interferometric SAR Processor (ISP)
Interferogram and Image Offset Parameter File

title:     offset parameters
initial_range_offset:                    0
initial_azimuth_offset:             -16077
slc1_starting_range_pixel:               0
number_of_slc_range_pixels:          16692
offset_estimation_starting_range:       48
offset_estimation_ending_range:      16644
offset_estimation_range_samples:        32
offset_estimation_range_spacing:       535
offset_estimation_starting_azimuth:     48
offset_estimation_ending_azimuth:    28302
offset_estimation_azimuth_samples:      32
offset_estimation_azimuth_spacing:     911
offset_estimation_window_width:         64
offset_estimation_window_height:       128
offset_estimation_threshhold:         7.00
range_offset_polynomial:         0.00033  -9.0131e-09  -6.7599e-09   0.0000e+00   0.0000e+00   0.0000e+00
azimuth_offset_polynomial:  -16077.08145   5.2973e-09   2.0647e-07   0.0000e+00   0.0000e+00   0.0000e+00
slc1_starting_azimuth_line:               0
interferogram_azimuth_lines:          28350
interferogram_width:                  16692
first_nonzero_range_pixel:                0
number_of_nonzero_range_pixels:       16692
interferogram_range_looks:                1
interferogram_azimuth_looks:              1
interferogram_range_pixel_spacing:       1.364105   m
interferogram_azimuth_pixel_spacing:     2.000404   m
resampled_range_pixel_spacing:           0.000000   m
resampled_azimuth_pixel_spacing:         0.000000   m
resampled_starting_ground_range:         0.00000   m
resampled_pixels_per_line:               0
resampled_number_of_lines:               0

Mode 1: measure initial range and azimuth offsets using orbit information

The most robust way to estimate the initial offsets between the images is to use the orbit state vector and SLC timing information. The ISP program init_offset_orbit determines the time of closest approach of the two tracks to determine an estimate of the range and azimuth offsets between the images

Example:
SLC_cat_all SLC_tab1 SLC_tab2 cat_slc CAT_SLC_tab 1

This results in the following command being run:

init_offset_orbit slc/20110324T123632.slc.par slc/20110324T123637.slc.par cat_slc/20110324T123632_20110324T123637.off 8346 24806.25

with the result:
initial range offset: 0.0000   initial azimuth offset: -16077.0871

Mode 2: measure initial range and azimuth offsets using the images (optional)

Instead of or in addition to using the orbits, the initial offset of the images can be determined using the ISP program init_offset. This step measures the initial offset between the reference SLC and SLC-2 using an image patch specified by the user.. The location  for the initial estimate is nominally in the image center. If another location with more topography is desired, the location can be specified on the command line using the  following parameters that can be entered on the SLC_resamp_all command line:

    rpos      center of patch for initial offset estimation in range (samples) (enter - for default: image center)
    azpos     center of patch for initial offset estimation in azimuth (lines) (enter - for default: last eighth of image)

Example:
SLC_cat_all SLC_tab1 SLC_tab2 cat_slc CAT_SLC_tab 2

This results in the following command being run:

init_offset slc/20110324T123632.slc slc/20110324T123637.slc slc/20110324T123632.slc.par slc/20110324T123637.slc.par cat_slc/20110324T123632_20110324T123637.off 1 1 8346 24806.25 - - 7 512 512 1

with the result:

offset estimate range:     -0.00194   azimuth: -16077.07295
correlation SNR:   1401.461
output ISP offset parameter file: cat_slc/20110324T123632_20110324T123637.off

Mode 3: estimate range and azimuth offset models using correlation of image intensities

In this step, the offsets between the two SLC frames are measured over a grid of points taking into account the initial offset deterimined in the previous steps.
The values of these offsets are then used to estimate range and azimuth offset polynomials to resample SLC-2.

Example:

SLC_cat_all SLC_tab1 SLC_tab2 cat_slc CAT_SLC_tab 3

This results in the following commands and result:

offset_pwr slc/20110324T123632.slc slc/20110324T123637.slc slc/20110324T123632.slc.par slc/20110324T123637.slc.par cat_slc/20110324T123632_20110324T123637.off cat_slc/20110324T123632_20110324T123637.offs cat_slc/20110324T123632_20110324T123637.snr

In the output log file  cat_slc/20110324T123632_20110324T123637_resamp.log is listed the output from offset_pwr

number of offsets above SNR threshold: 415 of 1024

The range and azimuth offsets as well as the signal to noise values for the offsets (SNR values) are then used as inputs to the offset_fit program:
offset_fit cat_slc/20110324T123632_20110324T123637.offs cat_slc/20110324T123632_20110324T123637.snr cat_slc/20110324T123632_20110324T123637.off cat_slc/20110324T123632_20110324T123637.coffs - - 3

with output:

final range offset poly. coeff.:              0.00033  -9.01314e-09  -6.75986e-09
final range offset poly. coeff. errors:   9.13611e-06   2.75036e-10   4.01921e-10

final azimuth offset poly. coeff.:         -16077.08145   5.29725e-09   2.06473e-07
final azimuth offset poly. coeff. errors:   1.31867e-05   3.96975e-10   5.80115e-10

final model fit std. dev. (samples) range:   0.0013  azimuth:   0.0019

Mode 4: concatenate SLC images using offset polynomials determined in mode 3 and generate CSLC_tab

The offset parameter file now contains the range and azimuth offset polynomials. See the documentation on offset_fit to understand the different terms in the polynomials.  If the rflag command line parameter is set to 1 (offset confirmation) the residual offsets from this second resampling are measured and a further correction to the offset model is determined. 

Example:
SLC_cat_all SLC_tab1 SLC_tab2 cat_slc CAT_SLC_tab 4

generates the following command:


SLC_cat slc/20110324T123632.slc slc/20110324T123637.slc slc/20110324T123632.slc.par slc/20110324T123637.slc.par cat_slc/20110324T123632_20110324T123637.off cat_slc/20110324T123632.slc cat_slc/20110324T123632.slc.par

This call to SLC_cat is repeated for each of the SLC frame pairs in SLC_tab1 and SLC_tab2. An SLC_tab file is created for the output concatenated SLC data sets. In this case the file is call CAT_SLC_tab and contains a single line:

cat_slc/20110324T123632.slc  cat_slc/20110324T123632.slc.par

OPTIONS:
There are several options for the script. Most important is the phflg option. If this option is set to 1, then any phase trend detected between SLC-1 and SLC-2 in the region of overlap is removed from SLC-2. An interferogram is created between SLC-1 and SLC-2 in the overlap region and the phase in this region is estimated as a function of slant range across the swath.  Whe phflg is set to 0, then the phase function is not applied.  The trend is estimated independent of the phflg option value.

The position of the 512x512 patch used to estimate the initial offset can be changed by setting the value of rpos and azpos.  The default position azpos is 1024 lines before the end of SLC-1 in the center of the swath.

Finally, the number of parameters in the offset polynomials that model the pixel offset between SLC-1 and SLC-2 can be changed from the default value by setting the npoly parameter. The npoly parameter is by default 3. This allows a linear offset function in range and azimuth for both the range and azimuth offset polynomials. 

The script examines the value of the range offset as a function of range and azimuth. If the value of the range offset is very close to zero, the offset polynomial terms are all set to identically 0.  




© Copyrights for Documentation, Users Guide and Reference Manual by Gamma Remote Sensing, 2012.
CW last change 14-Nov-2012.