ANSI-C program: ASAR_AP_proc.c
NAME
ASAR_AP_proc - Generates MSP sensor parameter and processing
parameter files from Level 0 ASAR Alternating Polarization
(AP) Mode data. This program also reformats the raw SAR signal
data for the two channels to be compatible with the MSP.
The entire level 0 AP data set is converted to 8-bit I/Q
unsigned binary complex samples in two files corresponding to the
two polarization channels.
SYNOPSISASAR_AP_proc
<L0> <INS> <SAR_par1>
<SAR_par2>
<PROC_par1>
<PROC_par2>
<raw1>
<raw2>
<ant_gain1>
<ant_gain2>
[loff] [nl] [roff]
[nr]
<L0> | (input) Level 0 Image Mode ASAR data file
(ASA_IM_0P) |
<INS> | (input) ASAR instrument characterization file (ASA_INS_AX) |
<SAR_par1> | (output) MSP SAR sensor parameter file 1 |
<SAR_par2> | (output) MSP SAR sensor parameter file 2 |
<PROC_par1> |
(output) MSP processing
parameter file 1 (example
p<20071121>.slc.par) |
<PROC_par2> | (output) MSP processing parameter file 1 (example p<20071121>.slc.par) |
<raw1> | (output) byte aligned 8-bit I/Q raw data 1 |
<raw2> | (output) byte aligned 8-bit I/Q raw data 1 |
<ant_gain1> |
(input) antenna pattern
file 1 (derived using program ASAR_XCA) |
<ant_gain2> | (input) antenna pattern file 2 (derived using program ASAR_XCA) |
[loff] |
offset to first line to
process (default = 0, enter - for default) |
[nl] | number of lines to
process(default = to end of input, enter - for
default) |
[roff] | offset to first range sample to process (default = 0, enter - for default) |
[nr] | number of range samples to
process (default = to end of line, enter - for
default) |
EXAMPLE
ASAR_AP_proc
ASA_APH_0CNPDE20050131_211902_000000362034_00200_15284_1759.N1
ASA_INS_AXVIEC20041215_180208_20030211_000000_20051231_000000
ASAR_20050131_HH.par ASAR_20050131_HV.parp20050131_HH.slc.par
p20050131_HV.slc.par20050131_HH.raw
20050131_HV.raw ASAR_IS4_HH_antenna.gain
ASAR_IS4_HV_antenna.gain
DESCRIPTION
ASAR_AP_proc reads the AP
mode ASAR Level 0 data files and generates the MSP processing
parameter (p*.slc.par) and sensor parameter files along with
reformatting the raw data. Level 0 AP files have names that begin
with (ASA_APC_0...,
ASA_APH_0..., ASA_APV_0...). These files contain both raw
data and meta data describing when the data were acquired and the
imaging mode (IS1 - IS7). Alternating Polarization data is
a dual polarization acquisition mode where alternate echo bursts
comprising of approximately 200 echoes are recorded. After
recording in one polarization mode for approximately 200 echoes
(e.g.HH), the polarization mode is changed to HV for the next
burst.. Detailed information on the AP Level 0 format
is contaned in the ASAR Product Handbook available on-line at
http://envisat.esa.int. in
Section 2.5.
The ASAR AP mode data are stored as records in the raw data
files with each record corresponding to an echo. Each echo
consists of a header consisting of timing and error information
and radar parameters followed by a set of 64-byte packets
containing the echo samples. These echo samples are stored using
block floating point quantization (FBAQ) that effectively
increases the dynamic range of the data to 8 bits from the 4 bits
used to encode the data in the Level 0 data. Each packet
consists of 63 complex samples (4-bit I/4-bit Q) and a single
byte that is an index into a set of lookup tables. These lookup
tables map the 4-bit values to the corresponding 8-bit
values.
The output of ASAR_AP_proc is two sets of raw data, one for each of the two polarization modes. Blank lines are inserted in one raw data file, when the other polarization mode is active. This way the timing is preserved. The data set comprised of SAR_par1, PROC_par1, raw1 and ant_gain1 correspond to the first of the two polarizations in the polarization mode specification ( i.e. HH in APH H/HVmode, VV in APV V/VH mode, and HH for APC HH/VV mode). Processing proceeds for the two raw data sets as for a normal SAR images with the exception that autofocus may not work with this type of data and may not be required..
The set of 256 look up tables needed to generate decompressed
samples and other ASAR calibration and system parameters are
stored in the Instrument Characterization File (ASA_INS_AXVIEC...). These files
must be downloaded from ESA and the correct file selected for the
date that the data were aquired. The ESA website to
download both the INS files and the external characterization
file (ASA_XCA...) is
http://envisat.esa.int/services/auxiliary_data/asar
.
The external characterization file is required to extract the
antenna pattern as measured on the ground and is used to
compensate for the antenna gain across the swath in the SAR
processing. The program in the ISP called ASAR_XCA and is used to extract the
appropriate antenna pattern (the ant_gain1 and ant_gain2 files on the command
line).
The ASAR instrument shifts the echo digitization window
approximately every 15 seconds along-track. ASAR_AP_proc initially scans the
entire data set to determine the maximum shift from start to
finish. and shifts the data in the output such that the starting
time for all echoes is the same for the entire raw data set.. No
samples are lost in this process because the data are extended to
accomodate the range of the shift. Every echo is decompressed and
written to the appropriate raw file specified .
The remain optional parameters on the command line specify
what portion of the raw data file that will be processed by the
MSP. If these are omitted, then the entire raw data set is
processed. Default values for the number of lines
nl corresponds to all
remaining echoes in the file beginning at loff lines. Similarly, the default
number of samples nr, is
all samples to the end of the line beginning at roff samples.
SEE ALSO
Users Guide, typedef_MSP.h, SAR Sensor Parameter File, MSP Processing Parameter File, SAR raw data
(<YYYYMMDD>.raw).
© Copyrights for Documentation, Users Guide and Reference Manual by Gamma Remote Sensing, 2007.
UW, CW, last change 3-Dec-2007.