GAMMA DIFF/GEO Software: Reference Manual
SLC co-registration and resampling using a lookup table
(SLC_resamp_lt_all)
Perl script: SLC_resamp_lt_all
Description
This is a Quickstart guide on how to
use the script SLC_resamp_lt_all to resample a set of SLC
images to a common reference SLC scene using a lookup table. The
lookup table is derived using a DEM in the radar geometry.
The SLC_resamp_lt_all script helps guide you through the
different processing steps. As input data the following inputs
are required:
1. SLC image data with the ISP image parameter files
2. A table of the SLC images to be resampled and the reference
scene in the form of an SLC_tab. 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 is the SLC parameter file
name including the absolute or relative path to the SLC parameter
file
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
This can be created using the mk_tab script:
*** Copyright 2011, Gamma Remote Sensing, v1.1
13-Apr-2011 clw ***
*** Generate SLC_tab, MLI_tab, or RAW_list for processing
***
usage: mk_tab <dir> <ext-1> <ext-2>
<tab>
dir (input) directory including
paths that contain the data files
ext-1 (input) pattern to select data files
(examples: slc, raw...)
ext-2 (input) pattern to select parameter
files that match the data (examples: slc.par, raw_par,
raw.par)
tab (output) two column list of
data filenames and data parameter filenames (including paths)
(text)
NOTE: The current directory is denoted using
.
mk_tab slc slc slc.par SLC_tab
3. A multi-look intensity MLI image of the scene and the
associated ISP image parameter file
4. A DEM in range-Doppler coordinates with the same pixel spacing
as the MLI image
Either include $DIFF_HOME/scripts in the PATH environment
variable or Copy the SLC_resamp_lt_all script to the
directory above where the SLCs are located. The SLC images
should all be in one directory. Next, run the script without
arguments to see the command line arguments:
*** ./SLC_resamp_lt_all
*** Copyright 2011, Gamma Remote Sensing, v4.3 28-Apr-2011 clw
***
*** Resample a set of SLCs to a common reference SLC using a
lookup table and DEM ***
usage: ./SLC_resamp_lt_all <SLC_tab> <ref_SLC>
<ref_SLC_par> <ref_MLI_par> <DEM_rdc>
<MLI_dir> <RSLC_dir> <RSLC_tab> <mode>
[rflag] [rlks] [azlks] [rpos] [azpos]
SLC_tab (input)
two column list of SLC filenames and SLC parameter filenames
(including paths) (ascii)
ref_SLC (input)
reference SLC (including path)
ref_SLC_par (input) ISP image parameter
file of the reference SLC (including path)
ref_MLI_par (input) ISP image parameter
file of the reference MLI (including path)
DEM_rdc (input)
DEM in Range-Doppler Coordinates with width and height as
described in the MLI_par
MLI_dir (input)
directory containing MLI parameter files, same the same width and
height as DEM_rdc.
RSLC_dir directory to
contain the resampled SLCs, lookup tables, ISP image parameter
files, and log files
RSLC_tab (output)
RSLC_tab file for the resampled SLC files
mode processing
modes:
0: generate lookup table and resample MLI-1 image into the
geometry of MLI-2
1: refine lookup table based on measured offsets between MLI-1
resampled to the geometry of MLI-2
2: resample SLC-2 to the geometry of the reference SLC using
lookup table
3: create offset parameter files for SLC resampling refinement,
measure offsets, and calculate the SLC offset fit polynomials
4:
resample SLC images using lookup table offsets determined in mode
3 and generate RSLC_tab
rflag flag for
interative refinement of the resampled SLC:
0: resample and measure residual range and azimuth offsets
(no interation, default)
1: interatively improve range and
azimuth offset polynomials then measure residual offsets
rlks number of
range looks for initial offset estimation (enter - for
default: 1)
azlks number of azimuth
looks for initial offset estimation (enter - for default:
1)
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: image center)
The different modes represent steps in the processing
that must be performed sequentially.
Mode 0: generate lookup
table and resample MLI-1 image into the geometry of
MLI-2
In this
step a lookup table is generated that maps one SLC into the
reference SLCimage. The sample spacing of the lookup table is the
same as the MLI reference image. The table entries are
interpolated to resample the SLC data. The DIFF/GEO program
rdc_trans is used to
generate the lookup table and the ISP program SLC_resamp_lt is used to
perform the resampling .
SLC_resamp_lt_all
SLC_tab1 slc/19960421.slc slc/19960421.slc.par
mli_1_5/19960421.mli.par geo/lan_dem.rdc mli_1_5 rslc_lt
RSLC_lt_tab 0 0
generates the following commands:
rdc_trans mli_1_5/19960421.mli.par
geo/lan_dem.rdc mli_1_5/19960422.mli.par
rslc_lt/19960421_19960422.lt0
geocode
rslc_lt/19960421_19960422.lt0 mli_1_5//19960421.mli 2296
rslc_lt/19960421_lt0.mli 2296 1176 2 0 - - 4
raspwr
rslc_lt/19960421_lt0.mli 2296 1 0 1 1 0.6
0.4
The output lookup table has
dimensions of the reference MLI image determined from the MLI
parameter file of the reference scene, in this case 2296
samples
Mode 1: refine lookup
table based on measured offsets between MLI-1 resampled to the
geometry of MLI-2
In this step, the offsets between
MLI-2 the reference MLI resampled into the geometry of MLI-2.
Range and azimuth offset polynomials derived
from these offsets are used to correct the entries of the lookup
table for orbit and timing errors.
Example:
SLC_resamp_lt_all
SLC_tab1 slc/19960421.slc slc/19960421.slc.par
mli_1_5/19960421.mli.par geo/lan_dem.rdc mli_1_5 rslc_lt
RSLC_lt_tab 1 0
This generates the following commands to measure the MLI offsets,
calculate the polynomials, and correct the lookup table
create_diff_par
mli_1_5/19960422.mli.par - rslc_lt/19960421_19960422_lt0.diff_par
1 < .in
init_offsetm rslc_lt/19960421_lt0.mli mli_1_5/19960422.mli
rslc_lt/19960421_19960422_lt0.diff_par 1 1 1148 588
offset_pwrm rslc_lt/19960421_lt0.mli mli_1_5/19960422.mli
rslc_lt/19960421_19960422_lt0.diff_par
rslc_lt/19960421_19960422_lt0.offs
rslc_lt/19960421_19960422_lt0.snr
offset_fitm rslc_lt/19960421_19960422_lt0.offs
rslc_lt/19960421_19960422_lt0.snr
rslc_lt/19960421_19960422_lt0.diff_par
rslc_lt/19960421_19960422_lt0.coffs - 3
gc_map_fine rslc_lt/19960421_19960422.lt0 2296
rslc_lt/19960421_19960422_lt0.diff_par
rslc_lt/19960421_19960422.lt1
The inputs to
create_diff_par are
determined from the image dimensions and the range and azimuth
patch size (256x256).
Mode 2: resample SLC-2
to the geometry of the reference SLC using lookup table including
the initial refinement
This step resamples SLC-2
into the geometry of the reference SLC.
(SLC-1).
Example:
SLC_resamp_lt_all SLC_tab1
slc/19960421.slc slc/19960421.slc.par mli_1_5/19960421.mli.par
geo/lan_dem.rdc mli_1_5 rslc_lt RSLC_lt_tab 2 0
This results in the following command:
SLC_interp_lt
slc/19960422.slc slc/19960421.slc.par slc/19960422.slc.par
rslc_lt/19960421_19960422.lt1 mli_1_5/19960421.mli.par
mli_1_5/19960422.mli.par - rslc_lt/19960422.rslc
rslc_lt/19960422.rslc.par
Mode 3: create offset
parameter files for SLC resampling refinement, measure offsets,
and calculate the SLC offset fit polynomials
In this
step, the offsets between the SLC reference and initial resampled
SLC are measured over a grid of points.
The values of these offsets are then used to estimate offset
polynomial that is used as a correction for the offset estimation
using the lookup table.
Example:
SLC_resamp_lt_all SLC_tab1
slc/19960421.slc slc/19960421.slc.par mli_1_5/19960421.mli.par
geo/lan_dem.rdc mli_1_5 rslc_lt RSLC_lt_tab 3 0
This results in the following commands:
create_offset
rslc_lt/19960421.rslc.par rslc_lt/19960422.rslc.par
rslc_lt/19960421_19960422.off < create_offset.in
offset_pwr rslc_lt/19960421.rslc rslc_lt/19960422.rslc
rslc_lt/19960421.rslc.par rslc_lt/19960422.rslc.par
rslc_lt/19960421_19960422.off rslc_lt/19960421_19960422.offs
rslc_lt/19960421_19960422.snr
offset_fit rslc_lt/19960421_19960422.offs
rslc_lt/19960421_19960422.snr rslc_lt/19960421_19960422.off
rslc_lt/19960421_19960422.coffs - - 3
Mode 4: resample SLC
using offset polynomials from SLC refinement, repeat SLC offset
polynomial estimation, resample SLC and measure residual
offsets
The SLC is resampled to the reference and
the range and azimuth offsets of the SLC to the reference scene
is measured. If the rflag command line parameter is set
to 1 (offset refinement) the residual polymials are added to the
offset polynomials and the SLC is resampled using the updated
offset polynomial correction. The offsets of the resampled SLC
with respect to the reference SLC are measured again and
range and azimuth offset polynomials from these new offsets are
determined. Iteration of the offset model reduces the
residual offsets
Example:
Resampling
using the SLC offset correction polynomials.
SLC_resamp_lt_all SLC_tab1
slc/19960421.slc slc/19960421.slc.par mli_1_5/19960421.mli.par
geo/lan_dem.rdc mli_1_5 rslc_lt RSLC_lt_tab 4
0
This results in the following commands, first
to resample the SLC using the offset polynomial
corrections:
SLC_interp_lt
slc/19960422.slc rslc_lt/19960421.rslc.par slc/19960422.slc.par
rslc_lt/19960421_19960422.lt1 mli_1_5/19960421.mli.par
mli_1_5/19960422.mli.par rslc_lt/19960421_19960422.off
rslc_lt/19960422.rslc rslc_lt/19960422.rslc.par
Then measure the residual offsets of the
resampled SLC
offset_pwr rslc_lt/19960421.rslc rslc_lt/19960422.rslc
rslc_lt/19960421.rslc.par rslc_lt/19960422.rslc.par
rslc_lt/19960421_19960422_2.off rslc_lt/19960421_19960422_2.offs
rslc_lt/19960421_19960422_2.snr
offset_fit rslc_lt/19960421_19960422_2.offs
rslc_lt/19960421_19960422_2.snr rslc_lt/19960421_19960422_2.off
rslc_lt/19960421_19960422_2.coffs - - 3
range_offset_polynomial: 0.00259 -3.0636e-06 1.2147e-07
0.0000e+00 0.0000e+00 0.0000e+00
azimuth_offset_polynomial: -0.00852 3.9308e-06 -9.8217e-08
0.0000e+00 0.0000e+00 0.0000e+00
In the case where rflag =
0, the script ends at this point. In the case where
rflag = 1 these
polynomial models of the residual offsets are added to the
original SLC offset polyomials for range and azimuth and then
replaced in the offset parameter file rslc_lt/19960421_19960422_2.off:
set_value rslc_lt/19960421_19960422.off
rslc_lt/19960421_19960422.off "range_offset_polynomial"
"0.02641 -2.90396e-05 9.12520e-07 0.00000e+00
0.00000e+00 0.00000e+00"
set_value rslc_lt/19960421_19960422.off
rslc_lt/19960421_19960422.off "azimuth_offset_polynomial"
"-0.23748 1.09871e-04 6.01638e-06
0.00000e+00 0.00000e+00
0.00000e+00"
Followed by the
final resampling of the SLC data and measurement of the residual
offsets:
SLC_interp_lt
slc/19960422.slc slc/19960421.slc.par slc/19960422.slc.par
rslc_lt/19960421_19960422.lt1 mli_1_5/19960421.mli.par
mli_1_5/19960422.mli.par rslc_lt/19960421_19960422.off
rslc_lt/19960422.rslc rslc_lt/19960422.rslc.par
offset_pwr rslc_lt/19960421.rslc rslc_lt/19960422.rslc
rslc_lt/19960421.rslc.par rslc_lt/19960422.rslc.par
rslc_lt/19960421_19960422_2.off rslc_lt/19960421_19960422_2.offs
rslc_lt/19960421_19960422_2.snr
offset_fit rslc_lt/19960421_19960422_2.offs
rslc_lt/19960421_19960422_2.snr rslc_lt/19960421_19960422_2.off
rslc_lt/19960421_19960422_2.coffs - - 3
These are the final residual polynomials for the range and
azimuth offsets:
range_offset_polynomial: 0.00031
-3.8896e-07 2.2640e-08 0.0000e+00 0.0000e+00 0.0000e+00
azimuth_offset_polynomial: -0.00061 2.8074e-07 -2.0560e-08
0.0000e+00 0.0000e+00 0.0000e+00
Offset Error Estimation:
It is essential to have
estimates of the residual error in the resampling for each of the
SLCs. A log file is created for each SLC pair and stored in the
resampled SLC directory. The commands and complete output
of each of the programs is recorded in the log file. In
this particular example there is only one log file since only a
single pair has been co-registered. In this example the SLC data
were resampled 3 times and the residual offsets measured.
The values of the standard deviation of the measurements relative
to the model can be extracted from the log file using the
Linux/Unix grep utility as follows:
grep "final model fit std.
dev." rslc_lt/19960421_19960422_resamp_lt.log
final model fit std. dev. (samples) range:
0.0419 azimuth: 0.0088 #MLI image offset
estimation
final model fit std. dev. (samples) range:
0.0046 azimuth: 0.0074
final model fit std. dev. (samples) range:
0.0044 azimuth: 0.0066
final model fit std. dev. (samples) range:
0.0044 azimuth:
0.0066
This indicates that the standard deviation of the offsets in
range and azimuth were improved after the second resampling. The
values of the offset polynomials in range and azimuth can
also be extracted using grep :
grep "final range
offset poly. coeff.:"
rslc_lt/19960421_19960422_resamp_lt.log
final range offset poly.
coeff.:
-0.45454 3.96654e-05 2.84578e-05
-2.60329e-08 #MLI offset from offset_fitm
final range offset poly.
coeff.:
0.02382 -2.59757e-05 7.91047e-07
#SLC range offset polynomials
final range offset poly.
coeff.:
0.00259 -3.06361e-06 1.21473e-07
final range offset poly.
coeff.:
0.00031 -3.88958e-07
2.26396e-08
$ grep
"final azimuth offset poly. coeff.:"
rslc_lt/19960421_19960422_resamp_lt.log
final azimuth offset poly.
coeff.:
-0.01594 -1.32865e-05 1.18202e-06
-1.43720e-09 #MLI offset from offset_fitm
final azimuth offset poly.
coeff.:
-0.22896 1.05937e-04 6.11460e-06
#SLC azimuth offset polynomials
final azimuth offset poly.
coeff.:
-0.00852 3.93078e-06 -9.82174e-08
final azimuth offset poly.
coeff.:
-0.00061 2.80742e-07
-2.05605e-08
© Copyrights for Documentation, Users Guide and Reference Manual by Gamma Remote Sensing, 2011.
CW, UW, TS last change 7-Jun-2011.