Project SIR-C
SIR-C / AIRSAR DATA CONVERSION GUIDE
Bruce Chapman
chapman@radar-email.jpl.nasa.gov
JPL D-11836
Revision 1.0
June 1994
National Aeronautics and Space Administration
Jet Propulsion Laboratory
California Institute of Technology
Pasadena, California
Copyright (c)1994, California Institute of Technology. U. S. Government Sponsorship under NASA Contract NAS7-918 is acknowledged.
This software is provided to you 'as is' and without warranty of any kind, expressed or implied, including but not limited to, warranties of performance, merchantability, or fitness for a particular purpose. User bears all risk as to the quality and performance of the software.
Table of Contents
The Spaceborne Imaging Radar - C (SIR-C) has successfully imaged areas at many sites around the world. Scientific investigations are proceeding quickly, and there is a demand for a fast turnaround of results.
Many investigators have experience using data from the airborne prototype of SIR-C, called AIRSAR, which is a NASA/JPL quad-pol multi-frequency radar flown aboard a DC-8 aircraft. AIRSAR has imaged many of the SIR-C supersites. Some investigators have written software for analyzing AIRSAR data, or use programs such as Macsigma0 which were written for AIRSAR data.
This users guide describes FORTRAN77 software that converts AIRSAR data to SIR-C format, or converts SIR-C data to AIRSAR format. It also describes how to read headers from both AIRSAR and SIR-C data. For a complete description of the AIRSAR system, see [1]. For a complete description of the SIR-C headers and data formats, see [2,3].
A separate CEOS reader software package is provided for reading the CEOS headers and decompressing SIR-C data. See [4] for details. The software described here is not a substitute for image display, analysis, or calibration software such as RAVEN, or POLCAL.
There are many differences between AIRSAR format data and SIR-C format data, even though the data itself is very similar.
1. AIRSAR and SIR-C store header information differently. AIRSAR header information is found in the first three lines of the data files. SIR-C header and data are stored according to CEOS conventions. SIR-C headers are stored in separate files, in addition to the data file.
2. AIRSAR and SIR-C save different but related data quantities. Both data formats are compressed. AIRSAR stores the Stokes Matrix, while SIR-C stores the cross-products of the scattering matrix that make up the Stokes Matrix.
3. AIRSAR has a scale factor for the whole image, while SIR-C does not. This scale factor is used to calibrate AIRSAR data to sigma0 values.
4. AIRSAR data is usually quad pol data, while SIR-C may be quad pol, dual pol, or single pol data.
5. AIRSAR data is usually in the "slant range" projection, while SIR-C data may be in either the slant range projection or the "ground range" projection.
6. AIRSAR data (except synoptic) and SIR-C data are stored in the data files such that the cross track direction and along track directions are rotated 90 degrees from one another.
See [3] for a description of the CEOS headers. The software described in this manual assume that the first 12 bytes of each line of the input image file that have CEOS prefix information have been stripped off. If this is not the case, the software described here will yield erroneous results.
WARNING: Software provided to the members of the SIR-C science team to transfer data from tape to disk, called CEOS_READER, is required before running the software for converting SIR-C data to AIRSAR format. The CEOS_READER software strips off the CEOS prefix bytes from the SIR-C data and writes the results to disk. If the CEOS prefix bytes are not stripped off, incorrect values will result.
Makefiles for unix computers are included for compiling and linking the software. For VAX/VMS computers, .com files are included for compilation and linking. All of the software may be compiled and linked by using a single 'make' command on a UNIX OS, which will use the included Makefile. On a VAX/VMS computer, @all.com will compile and link the software.
Please contact the author if you need any assistance.
AIRSAR data :
AIRSAR data comes in three different data formats : CM (compressed Stokes), CC or CS (compressed complex/compressed scattering matrix), and SY (synoptic). The file name will begin with the two letter combination indicating the data type. In general, CM data and compressed scattering matrix data have 1024 samples, unless modified by users and either 750 or 1279 lines. SY data has 1280 samples, unless modified by users, and 5088 lines.
AIRSAR CM data is the most common AIRSAR format. CM data is the compressed Stokes Matrix format, in which multilooked, quad-pol AIRSAR data is stored. See Appendix B for a detailed description of the data compression of AIRSAR data. The file structure is shown in figure 1. During the history of AIRSAR, the header has changed slightly. Until 1990, there were only two header lines of data, and the data was multilooked by a factor of 4 (processor version less than 3.0). Since then, there have been three header lines, the data is multilooked by 16, and the number of lines increased from 750 to 1279 (processor version greater than 3.5). In all cases, the number of samples has been 1024, and each compressed Stokes Matrix pixel is 10 bytes. AIRSAR CM data may be converted to SIR-C MLC format (compression scale factor is applied to data).
Figure 1. AIRSAR CM data file structure
The format of the AIRSAR headers is described in [1]. The first header line is known as the 'new header', and contains quantities such as the number of lines and number of samples. The second line is known as the "oldheader", and contains miscellaneous quantities, the most important of which is the general (or compression) scale factor. This number is an overall scaling factor used to scale (i.e. calibrate) the data. The third line, which exists for data processed after 1990, is called the "parameter header", and contains many labeled processing and calibration parameters.
AIRSAR scattering matrix data is also an available AIRSAR format. Scattering matrix data contains the compressed quad pol complex scattering matrix elements. See Appendix B for a detailed description of the data compression of AIRSAR data. The file structure is shown in figure 2. Scattering matrix data has not been multilooked. This data may be converted to SIR-C SLC data, or it may be multilooked and converted to MLC format with the included software.
Figure 2. AIRSAR scattering matrix data file structure
AIRSAR synoptic data is another available AIRSAR format. Synoptic data contains the uncompressed single pol amplitude for each pixel. The file structure is shown in figure 3. Synoptic data,unlike the CM and scattering matrix data, is not compressed, and there is no scale factor in the header. This data may be converted to SIR-C MLD format.
Figure 3. AIRSAR synoptic data file structure
Airsar synoptic data is written on a VAX computer in unformatted floating point format. If this program is not run on a VAX computer, the synoptic data must first be converted to the unformatted floating point format of the computer that this software is running on. A program to do this conversion was separately developed [8].
SIR-C data:
The SIR-C data format has more flexibility than AIRSAR data. It may have any number of lines or samples. It may be in the ground range or slant range projection. It may be single pol, dual pol, or quad pol.
Figure 4. SIR-C data format
A detailed description of SIR-C MLC data may be found in Appendix A. More generally, the SIR-C MLC data is "multilook complex data", which means that it has been multilooked by some factor, and contains the cross-products of the scattering matrix in a compressed format. The Stokes matrix may be determined from the cross-products. This data may be dual pol, or quad pol. If it is quad pol, then the data may be converted to AIRSAR CM format. If the data is dual pol, the software described here can not currently convert the data to AIRSAR format.
MLC data is generally resampled to the ground range projection, but this is not a requirement of the data format. For instance, SIR-C SLC data may be multilooked and stored as MLC data, or AIRSAR data may be stored as MLC data, but both are generally not in the ground range projection.
Every SIR-C data take will consist of three files : the leader file, the image file, and the trailer file. The CEOS reader software [4] reads these files and creates several output files, including ascii header files, and an image file with the 12 CEOS prefix bytes removed. THIS IS THE IMAGE FILE THAT THE SOFTWARE DESCRIBED HERE REQUIRES AS INPUT. If the original CEOS files from the SIR-C tape are used, the software will not correctly decode the data. This image file is just data, with no header lines.
SIR-C SLC data is "Single Look Complex" data that has not been multilooked, or resampled to a ground range projection. It is similar to the AIRSAR scattering matrix data format. Like the MLC data, it is stored with the CEOS conventions. See appendix A for a detailed description of the data compression format. This data may be single pol, dual pol, or quad pol. If the data is quad pol, it may be converted to AIRSAR scattering matrix format. It may also be converted to AIRSAR CM format, by multilooking the data. If the data is single pol or dual pol data, the software described here can not currently convert the data to AIRSAR format.
SIR-C MLD data is "Multilook Detected" data that has been multilooked, and is single pol. It is normally in the ground range projection. It is similar to the AIRSAR synoptic format, except that it is compressed to 2 bytes per pixel. See appendix A for a detailed description. This data format may be converted only to the AIRSAR synoptic format.
Before using this software, if SIR-C data is going to be converted to AIRSAR format, the data must be copied from the CEOS tape by the tape reader software as described in [4]. The user should make sure that the ASCII CEOS headers are saved to disk along with the image file.
The software described in this guide is a menu driven program that allows the user to choose which options are desired. See Appendix E for a description of how to compile and link the FORTRAN77 code. The program is called CVERT, and it performs the following functions:
1. Reads SIR-C ASCII headers
- Two files may be created by CVERT. One file is the common block header file that every module requires. The other file is not required, but summarizes important quantities from the CEOS headers, gives some guidelines for multiloooking,and contains header information required by AIRSAR header. See appendix C for a description of the common block header file.
2. Reads AIRSAR headers
- reads AIRSAR headers to create common block header file required for conversions. See appendix C for a description of the common block header file.
3. Manually input header values
- Manually input values to create common block header file. See appendix C for a description of the common block header file.
4. Convert AIRSAR CM data to SIR-C MLC data format
- No CEOS header files are created. However, the resulting file may be manipulated by the DCOMP software described in [4].
5. Convert AIRSAR scattering matrix data to SIR-C SLC data format
- No CEOS header files are created. However, the resulting file may be manipulated by the DCOMP software described in [4].
6. Convert AIRSAR synoptic data to SIR-C MLD data format
- No CEOS header files are created. However, the resulting file may be manipulated by the DCOMP software described in [4]. The synoptic file is written on a VAX computer in real floating point format, and must be converted to the floating point format of the computer that this program is running on, if it is not a VAX [8].
7. Convert SIR-C MLC data to AIRSAR CM data format
- Convert SIR-C MLC data to AIRSAR CM format with a "minimum" header that is created from input values. Only the AIRSAR "newheader" and "oldheader" are created.
8. Convert SIR-C SLC data to AIRSAR scattering matrix data format
(NOT CURRENTLY IMPLEMENTED)
9. Convert SIR-C SLC data to AIRSAR CM data format
- No multilooking is performed. The cross products are determined from the scattering matrix values, and the Stokes matrix is stored to the AIRSAR CM format.
10. Convert SIR-C MLD data to AIRSAR synoptic data format
(NOT CURRENTLY IMPLEMENTED)
11. Multilook SIR-C or AIRSAR data
- multilook either SIR-C or AIRSAR data. Result is always SIR-C MLC format.
When converting SIR-C data to AIRSAR format, the AIRSAR headers must be created. In order to simplify, only the minimum number of entries are saved in the AIRSAR headers. It is not guaranteed that the AIRSAR header will agree exactly with the standard AIRSAR header. For instance, the altitude is significantly greater for SIR-C, so all values are stored in kilometers rather than meters, including the pixel spacing. This, unfortunately, is required by the AIRSAR header format.
The inputs to the CVERT program are the following:
1. The common block header file : This file is required for all conversion routines. This file contains the characteristics of the data type and the image dimensions, and is described in more detail in appendix C. This file may be created in three ways : 1) reading the ASCII SIR-C CEOS files and creating file. 2) reading the AIRSAR headers and creating file. 3) manual input.
2. The data file to be converted : This file should not have the 12 byte CEOS prefix. If the data is AIRSAR synoptic, it should be in the floating point format for that computer.
3. When converting from SIR-C to AIRSAR format, parameters such as the pixel spacing and altitude must be entered. These values may be found in the SIR-C ASCII header files, or from the .info file that may be created by this program (see above).
The outputs of the CVERT program are the following:
1. Common block header file : When converting data types, CVERT will calculate and write out the common block header file corresponding to the converted data file. If further conversion is required, this common block header file should be used.
2. Informational file : This file may be created from the ASCII SIR-C CEOS files that are created by the CEOS_READER program [4]. It is not required for file conversion, but it does contain values that should be written to the AIRSAR headers. When converting SIR-C data to AIRSAR format, the user will be prompted for values. These values may be found in this file. The next version of this software will do this automatically.
3. The converted data file. This file will be structured according to the description found in appendices A and B. There is no required name convention for the input or output files.
4.1 SIR-C to AIRSAR conversions
If the data conversion is from SIR-C to AIRSAR, then the ASCII CEOS headers should be read to determine quantities for both the common block header file, and the .info file that contains items that must be entered into the AIRSAR header. The ASCII headers are created from the CEOS files by the CEOS_READER program [4].
After the common block header file and .info file have been created then the user has options depending on input data format, and the desired output.
If the input data is SLC quad pol data, then the user may:
1. Multilook the data to SIR-C MLC format
3. Convert the data directly to AIRSAR CM format (multilooking of 1).
4. Convert the data directly to AIRSAR scattering matrix format. (THIS OPTION IS NOT YET IMPLEMENTED) .
If the input data is MLC quad pol, then the user may:
1. Multilook the data to the same SIR-C MLC format.
3. Convert the data AIRSAR CM format.
For example, the following will show the user reading the ASCII headers, multilooking the SLC data to approximately ground range projection, and then converting the resulting MLC data to AIRSAR CM format.
(inputs are in bold, explanatory comments in italics, program execution in normal type)
>cvert
******************************************************
* Copyright (c) 1994, California Institute of
* Technology. U.S Government Sponsorship under
* NASA Contract NAS7-918 is acknowledged.
* This software is provided to you "as is" and
* without warranty of any kind, expressed or
* implied, including but not limited to,
* warranties of performance, merchantability, or
* fitness for a particular purpose. User bears
* all risk as to the quality and performance of
* the software.
*
* cvert - this program converts between the
* airsar and SIR-C data formats
*
* B. Chapman, JPL
******************************************************
Main Menu:
1. Read/create headers
2. Convert from AIRSAR CM to SIR-C MLC
3. Convert from AIRSAR Scattering matrix to SIR-C SLC
4. Convert from AIRSAR Synoptic to SIR-C MLD
5. Convert from SIR-C MLC to AIRSAR CM
6. Convert from SIR-C SLC to AIRSAR scattering matrix
7. Convert from SIR-C SLC to AIRSAR CM
8. Convert from SIR-C MLD to AIRSAR synoptic
9. Multilook SIR-C or AIRSAR data
10. Exit
enter choice -->
1
read/create headers
1. Read SIR-C ASCII headers for common block header file
2. Read SIR-C ASCII headers for information about scene
3. Read AIRSAR header for common block header file
4. Manually input common block header file values
5. Return to main Menu
enter choice -->
1
enter the processing run number :
10159
processing id : 10159
The ASCII version of the CEOS imagery options file is:
pr10159_img_ceos_ascii
This file is created by the CEOS tape reader software.
See section 6 of the CEOS tape reader user guide
on how to make this file if you dont have it
already.
The output file will be called :
pr10159.cbh
ASCII file exists and has been opened successfully.
ouput file has been created and opened successfully.
enter type of computer that you are working on :
(0) non-DEC computer
(1) DEC computer
enter number :
1
This file will now be read to obtain quantities
necessary to decompress the data...
----------------Imagery Options ASCII file-------------
SAR Data Record Count: 12516
**(DEC computer, record length is bytes divided by 4)
SAR Record Length (WORDS): 4330
Samples/Pixels/Data Groups per Line: 1732
SAR Format Indicator: COMPRESSED SCATTERIN 4
Polarization HH HV VV VH 0
-------------------------------------------------------
This is the Common Block Header file
File created:
pr10159.cbh
4 0 4330 1732 12516 10
Main Menu:
1. Read/create headers
2. Convert from AIRSAR CM to SIR-C MLC
3. Convert from AIRSAR Scattering matrix to SIR-C SLC
4. Convert from AIRSAR Synoptic to SIR-C MLD
5. Convert from SIR-C MLC to AIRSAR CM
6. Convert from SIR-C SLC to AIRSAR scattering matrix
7. Convert from SIR-C SLC to AIRSAR CM
8. Convert from SIR-C MLD to AIRSAR synoptic
9. Multilook SIR-C or AIRSAR data
10. Exit
enter choice -->
1
read/create headers
1. Read SIR-C ASCII headers for common block header file
2. Read SIR-C ASCII headers for information about scene
3. Read AIRSAR header for common block header file
4. Manually input common block header file values
5. Return to main Menu
enter choice -->
2
Now, the ASCII CEOS header files will be read.
enter processing run number :
10159
processing id : 10159
The ASCII version of the CEOS leader file is:
pr10159_ldr_ceos_ascii
This file is created by the CEOS tape reader software.
See section 6 of the CEOS tape reader user guide
on how to make this file if you dont have it
already.
The output file will be called :
pr10159.info
ASCII file exists and has been opened successfully.
ouput file has been created and opened successfully.
pr10159.info
This file will now be read to obtain useful
information about the data...
for now, noise will be set to a small value
----------------SAR leader ASCII file-------------
---------------Data Set Summary Record------------
Site ID: HS2
Site Name: Chickasha, Oklahoma
Geodetic Latitude at Image Center (deg): 35.0034790
Geodetic Longitude at Image Center (deg): -98.0728302
Track Angle at Image Center (deg): 138.7740021
Image Center Line Number: 6258.0000000
Image Center Pixel Number: 866.0000000
Image Length (km): 67.5977631
Image Width (km): 23.0655136
Number of SAR Polarization Channels: 4
SAR Band: C
Resolution (HI = 20 MHz, LO = 10 MHz): HI
Data Acquisition Mode (0 - 23): 16
Transmit Polarization: HV
Receive Polarization: HV
Datatake ID: 103.31
Clock Angle (Left: -90, Right: +90) (deg): 90.000
Incidence Angle at Image Center (deg): 42.404
Radar Wavelength (m): 0.0565216
Hardware Version: 1.0
Software Version: 1.1
Product Type: SINGLE-LOOK COMPLEX
Total Number of Looks: 0.0000000
Nominal Range Resolution (m): 23.6947002
Nominal Azimuth Resolution (m): 8.4707785
Line Spacing (m): 5.4013391
Pixel Spacing (m): 13.3249636
Orbit Direction: DESCENDING
-------------------------------------------------------
----------------SAR leader ASCII file-------------
---------------Map Projection Data Record------------
Platform Distance at Image Center (km): 6590.1660156
Geodetic Altitude of Platform (km): 219.4152069
-------------------------------------------------------
----------------SAR leader ASCII file-------------
-----------Detailed Processing Parameter Record--------
Near Slant Range (km): 280.5914612
Average Roll Angle Estimates (deg): 26.0000000
Near Range Incidence Angle (deg): 39.2951164
Far Range Incidence Angle (deg): 44.4550629
-------------------------------------------------------
----------------SAR leader ASCII file-------------
---------------Calibration Data Record------------
Absolute Calibration Coefficient (dB): 0.0000000
Imbalance Between HH and VV (dB): 0.0000000
Phase Error Between HH and VV (deg): 0.0000000
SINGLE-LOOK COMPLEX
Data in slant range projection
error: setting number of looks to 1
ground range pixel size is approximately:
19.75960 m in range direction
5.401339 m in azimuth direction
swath size:
34.20387 Km in range direction
67.59776 Km in azimuth direction
1731 pixels in range direction
12515 pixels in azimuth direction
optimum multilook for square ground pixels
(range, azimuth) is 2, 7
These multilook options will approximately convert the data to square ground pixels.
Potential multilook options:
looks ground pixel size (m) swath(pixels)
range azimuth range azimuth range azimuth No. of looks
2 7 39.52 37.81 865 1787 14.0
1 3 19.76 16.20 1731 4171 3.0
4 14 79.04 75.62 432 893 56.0
File created:
pr10159.info
Main Menu:
1. Read/create headers
2. Convert from AIRSAR CM to SIR-C MLC
3. Convert from AIRSAR Scattering matrix to SIR-C SLC
4. Convert from AIRSAR Synoptic to SIR-C MLD
5. Convert from SIR-C MLC to AIRSAR CM
6. Convert from SIR-C SLC to AIRSAR scattering matrix
7. Convert from SIR-C SLC to AIRSAR CM
8. Convert from SIR-C MLD to AIRSAR synoptic
9. Multilook SIR-C or AIRSAR data
10. Exit
enter choice -->
9
Multilook the data to approximately square ground pixels
multilook AIRSAR or SIR-C data
output will be SIR-C MLC or SIR-C MLD format
enter common block header file name :
pr10159.cbh
file type : 4
file mode : 0
input record length : 4330
number of samples : 1732
number of lines : 12516
number of bytes per sample : 10
enter corresponding image data file :
cr10159.image
enter output multilooked file name :
cr10159.mlc
Enter the amount of multilooking desired in the
azimuth direction (corresponding to lines of data).
If you want to make a multilooked file less than
1024 lines then the amount of multilooking is 13
this will result in 962 lines of data
enter amount of multilooking in azimuth direction:
3
Enter the amount of multilooking desired in the
range direction (corresponding to samples of data).
If you want to make a ML file less than 1024 samples,
then the amount of multilooking is 2
this will result in 866 samples of data
enter amount of multilooking in range direction:
1
output record length : 4330
output number of bytes per line : 17320
This program creates a common block file corresponding
to this MLC or MLD file about to be created.
enter the file name of this common block file
(i.e. prxxxxxml.cbh):
cr10159.mlc.cbh
This SLC quad pol data will become
MLC quad pol data after multilooking
beginning to multilook...
These are the line numbers printed out as it is executing
1
301
601
.
.
.
11701
12001
12301
the amount of multilooking in azimuth is : 3
the amount of multilooking in range is : 1
record length is : 4330
the number of samples per line is : 1732
number of bytes per line is : 17320
number of lines is : 4172
number of bytes per sample is : 10
The output multilook file is:
cr10159.mlc
the output common block file is :
cr10159.mlc.cbh
Main Menu:
1. Read/create headers
2. Convert from AIRSAR CM to SIR-C MLC
3. Convert from AIRSAR Scattering matrix to SIR-C SLC
4. Convert from AIRSAR Synoptic to SIR-C MLD
5. Convert from SIR-C MLC to AIRSAR CM
6. Convert from SIR-C SLC to AIRSAR scattering matrix
7. Convert from SIR-C SLC to AIRSAR CM
8. Convert from SIR-C MLD to AIRSAR synoptic
9. Multilook SIR-C or AIRSAR data
10. Exit
enter choice -->
5
Convert the above MLC file to AIRSAR CM format...
Convert SIR-C MLC quad pol to AIRSAR CM
enter the common block header file name
cr10159.mlc.cbh
file type : 2
file mode : 0
input record length : 4330
number of samples : 1732
number of lines : 4172
number of bytes per sample : 10
Enter Sir-C data file name :
cr10159.mlc
AIRSAR data must be written with 1024 azimuth samples.
SIR-C format data cornerturned with respect to AIRSAR
you MUST convert a subset of the data
enter first SIR-C azimuth line to select
1000
(Number of SIR-C azimuth lines MUST=1024)
enter first SIR-C range sample to select
300
enter number of SIR-C range samples :
1280
input image upper left (x,y) : 300, 1000
lower right (x,y) : 1580, 2024
output image: 1024 samples
1280 lines
Need to enter header info
enter the following information for the input file
(ONLY A MINIMUM HEADER WILL BE CREATED)
(The following information may be found in the .info file
that may be created by option 1.2 -
read headers,SIR-C information about scene)
enter projection (SLANT, GROUND) :
slant
enter input range pixel spacing (m) :
13.325
enter input azimuth pixel spacing (m) :
16.20
enter near slant range (meters) :
280591
enter altitude (meters) :
219415
enter target elevation (feet) :
0
enter drift angle (deg) :
0
enter track angle (deg) :
138
enter roll :
0
enter frequency band (C, L, P) :
C
enter a cm label :
10159C
Enter new output data file name
(will be in AIRSAR format) :
cm10159c.dat
opening output file :
cm10159c.dat
record length : 2560
writing new header to output file...
NEW HEADER
1 RECORD LENGTH IN BYTES = 10240
2 NUMBER OF HEADER RECORDS = 2
3 NUMBER OF SAMPLES PER RECORD = 1024
4 NUMBER OF LINES IN IMAGE = 1280
5 NUMBER OF BYTES PER SAMPLE = 10
6 SAR PROCESSOR VERSION = 3.500
7 DATA TYPE = SIR-C COMPRESSED
8 RANGE PROJECTION = SLANT
9 RANGE PIXEL SPACING (KMETERS)= 0.0133
10 AZIMUTH PIXEL SPACING (KMETERS)= 0.0162
11 BYTE OFFSET OF OLD HEADER = 10240
12 BYTE OFFSET OF USER HEADER = 0
13 BYTE OFFSET OF FIRST DATA RECORD = 20480
14 BYTE OFFSET OF PARAMETER RECORD = 0
15 LINE FORMAT OF DATA = AZIMUTH
16
17
18
19
20
OLD HEADER (Only those quantities used by POLCAL)
1
2 NEAR RANGE KMETERS): 280.6
3 SLANT RANGE PIXEL KM.): 0.0133
4 AZIMUTH PIXEL KM.): 0.0162
5
6 MULTIPOLARIZATION C-BAND
7
8
9
10
11
12
13
14
15 DRIFT ANGLE 0.000
16
17
18
19
20 TRACK ANGLE 138.00
21
22
23
24
25
26 0
27
28
29 AIRCRAFT ROLL 0.000
30
31
32
33
34
35
36
37
38 TARGET ELEVATION 0 FEET
39
40
41
.
.
.
62
63
64 CCT ID : 10159C
65
66
67
.
.
.
126
127
128 PROC_VERSION NO.: 3.50
129
130 ESTIMATED YAW (DEG): 0.00000
131 NEAR SLANT RANGE KM): 280.6
132 ALTITUDE KM): 219.4
133 COMP SCALE FACTOR: 0.1000000E+01
134
135
.
.
.
183
184
185
enter the new airsar common block header file name
cm10159c.cbh
file type : 7
file mode : 0
input record length : 2560
number of samples : 1024
number of lines : 1280
number of bytes per sample : 10
cornerturn...
reading: 1
reading: 65
reading: 129
reading: 193
reading: 257
reading: 321
reading: 385
reading: 449
reading: 513
reading: 577
reading: 641
reading: 705
reading: 769
reading: 833
reading: 897
reading: 961
writing: 100
writing: 200
writing: 300
writing: 400
writing: 500
writing: 600
writing: 700
writing: 800
writing: 900
writing: 1000
writing: 1100
writing: 1200
recompress to AIRSAR compressed format...
100 4.8178867E-02
200 4.6910845E-02
300 4.9393125E-02
400 4.8962757E-02
500 6.0794644E-02
600 5.6310825E-02
700 5.5402029E-02
800 7.0460021E-02
900 5.3427253E-02
1000 8.1270896E-02
1100 6.5735191E-02
1200 5.2776549E-02
AIRSAR format data saved to :
cm10159c.dat
The AIRSAR image is stored in the above file name.
Now, convert the original SLC image directly to AIRSAR CM format.
Main Menu:
1. Read/create headers
2. Convert from AIRSAR CM to SIR-C MLC
3. Convert from AIRSAR Scattering matrix to SIR-C SLC
4. Convert from AIRSAR Synoptic to SIR-C MLD
5. Convert from SIR-C MLC to AIRSAR CM
6. Convert from SIR-C SLC to AIRSAR scattering matrix
7. Convert from SIR-C SLC to AIRSAR CM
8. Convert from SIR-C MLD to AIRSAR synoptic
9. Multilook SIR-C or AIRSAR data
10. Exit
enter choice -->
7
Convert SIR-C SLC quad pol to AIRSAR CM
with no Multilooking
enter the common block header file name
pr10159.cbh
file type : 4
file mode : 0
input record length : 4330
number of samples : 1732
number of lines : 12516
number of bytes per sample : 10
Enter Sir-C data file name :
cr10159.image
AIRSAR data must be written with 1024 azimuth samples.
SIR-C format data cornerturned with respect to AIRSAR
you MUST convert a subset of the data
enter first SIR-C azimuth line to select
5000
(Number of SIR-C azimuth lines MUST=1024)
enter first SIR-C range sample to select
200
enter number of SIR-C range samples :
1280
input image upper left (x,y) : 200, 5000
lower right (x,y) : 1480, 6024
output image: 1024 samples
1280 lines
enter the following information for the input file
(ONLY A MINIMUM HEADER WILL BE CREATED)
(The following information may be found in the .info file
that may be created by option 1.2 -
read headers,SIR-C information about scene)
enter projection (SLANT, GROUND) :
slant
enter input range pixel spacing (m) :
13.325
enter input azimuth pixel spacing (m) :
5.40
enter near slant range (meters) :
280591
enter altitude (meters) :
219415
enter target elevation (feet) :
0
enter drift angle (deg) :
0
enter track angle (deg) :
138
enter roll :
0
enter frequency band (C, L, P) :
C
enter a cm label :
10159c
Enter new output data file name
(will be in AIRSAR format) :
cm10159c.slc
opening output file :
cm10159c.slc
record length : 2560
writing new header to output file...
NEW HEADER
1 RECORD LENGTH IN BYTES = 10240
2 NUMBER OF HEADER RECORDS = 2
3 NUMBER OF SAMPLES PER RECORD = 1024
4 NUMBER OF LINES IN IMAGE = 1280
5 NUMBER OF BYTES PER SAMPLE = 10
6 SAR PROCESSOR VERSION = 3.500
7 DATA TYPE = SIR-C COMPRESSED
8 RANGE PROJECTION = SLANT
9 RANGE PIXEL SPACING (KMETERS)= 0.0000133
10 AZIMUTH PIXEL SPACING (KMETERS)= 0.0000054
11 BYTE OFFSET OF OLD HEADER = 10240
12 BYTE OFFSET OF USER HEADER = 0
13 BYTE OFFSET OF FIRST DATA RECORD = 20480
14 BYTE OFFSET OF PARAMETER RECORD = 0
15 LINE FORMAT OF DATA = AZIMUTH
16
17
18
19
20
OLD HEADER (Only those quantities used by POLCAL)
1
2 NEAR RANGE KMETERS): 280.6
3 SLANT RANGE PIXEL KM.): 0.0133
4 AZIMUTH PIXEL KM.): 0.0054
5
6 MULTIPOLARIZATION C-BAND
7
8
9
10
11
12
13
14
15 DRIFT ANGLE 0.000
16
17
18
19
20 TRACK ANGLE 138.00
21
22
23
24
25
26 0
27
28
29 AIRCRAFT ROLL 0.000
30
31
32
33
34
35
36
37
38 TARGET ELEVATION 0 FEET
39
40
41
.
.
.
61
62
63
64 CCT ID : 10159c
65
66
67
.
.
.
127
128 PROC_VERSION NO.: 3.50
129
130 ESTIMATED YAW (DEG): 0.00000
131 NEAR SLANT RANGE KM): 280.6
132 ALTITUDE KM): 219.4
133 COMP SCALE FACTOR: 0.1000000E+01
134
135
.
.
.
184
185
enter the new airsar common block header file name
cm10159c.slc.cbh
file type : 7
file mode : 0
input record length : 2560
number of samples : 1024
number of lines : 1280
number of bytes per sample : 10
cornerturn...
reading: 1
reading: 65
reading: 129
reading: 193
reading: 257
reading: 321
reading: 385
reading: 449
reading: 513
reading: 577
reading: 641
reading: 705
reading: 769
reading: 833
reading: 897
reading: 961
writing: 100
writing: 200
writing: 300
writing: 400
writing: 500
writing: 600
writing: 700
writing: 800
writing: 900
writing: 1000
writing: 1100
writing: 1200
recompress to AIRSAR compressed format...
100 6.0434334E-02
200 4.9281433E-02
300 4.4484973E-02
400 5.5530615E-02
500 5.5024594E-02
600 5.7797991E-02
700 4.5333162E-02
800 4.7839310E-02
900 8.6806208E-02
1000 5.2917507E-02
1100 0.1039183
1200 5.2525137E-02
AIRSAR format data saved to :
cm10159c.slc
The AIRSAR CM file is stored in the above file name. No multilooking was performed.
Main Menu:
1. Read/create headers
2. Convert from AIRSAR CM to SIR-C MLC
3. Convert from AIRSAR Scattering matrix to SIR-C SLC
4. Convert from AIRSAR Synoptic to SIR-C MLD
5. Convert from SIR-C MLC to AIRSAR CM
6. Convert from SIR-C SLC to AIRSAR scattering matrix
7. Convert from SIR-C SLC to AIRSAR CM
8. Convert from SIR-C MLD to AIRSAR synoptic
9. Multilook SIR-C or AIRSAR data
10. Exit
enter choice -->
10
>
4.2 AIRSAR to SIR-C Conversions
If the conversion is from AIRSAR to SIR-C, the AIRSAR header should be read in order to make the common block header file. This conversion software will NOT create the CEOS headers, or add the 12 byte prefix characteristic of CEOS format data. The following options may be performed on AIRSAR data :
1. Convert AIRSAR CM data to SIR-C MLC
2. Convert AIRSAR scattering matrix to SIR-C SLC
3. Convert AIRSAR synoptic to SIR-C MLD
(NOT YET IMPLEMENTED)
4. Multilook AIRSAR CM to SIR-C MLC
5. Multilook AIRSAR scattering matrix to SIR-C MLC
In the following example, an AIRSAR CM file will be converted to SIR-C MLC format. The other options are similar.
> cvert
******************************************************
*
*
* Copyright (c) 1994, California Institute of
* Technology. U.S Government Sponsorship under
* NASA Contract NAS7-918 is acknowledged.
* This software is provided to you "as is" and
* without warranty of any kind, expressed or
* implied, including but not limited to,
* warranties of performance, merchantability, or
* fitness for a particular purpose. User bears
* all risk as to the quality and performance of
* the software.
*
* cvert - this program converts between the
* airsar and SIR-C data formats
*
* B. Chapman, JPL
******************************************************
Main Menu:
1. Read/create headers
2. Convert from AIRSAR CM to SIR-C MLC
3. Convert from AIRSAR Scattering matrix to SIR-C SLC
4. Convert from AIRSAR Synoptic to SIR-C MLD
5. Convert from SIR-C MLC to AIRSAR CM
6. Convert from SIR-C SLC to AIRSAR scattering matrix
7. Convert from SIR-C SLC to AIRSAR CM
8. Convert from SIR-C MLD to AIRSAR synoptic
9. Multilook SIR-C or AIRSAR data
10. Exit
enter choice -->
1
read/create headers
1. Read SIR-C ASCII headers for common block header file
2. Read SIR-C ASCII headers for information about scene
3. Read AIRSAR header for common block header file
4. Manually input common block header file values
5. Return to main Menu
enter choice -->
3
Here, the AIRSAR header will be read, and the common block header file created for this AIRSAR data file.
enter AIRSAR image file name:
cm10159c.dat
enter output common block file name:
cm10159c.cbh
The input AIRSAR image file name is :
cm10159c.dat
The output file will be called :
cm10159c.cbh
enter type of computer that you are working on :
(0) non-DEC computer
(1) DEC computer
enter number :
1
image file exists and has been opened successfully.
output file has been created and opened successfully.
This file will now be read to obtain quantities
necessary to decompress the data...
** is this data file :
1. CM file (compressed stokes)
2. compressed scattering matrix
3. synoptic floating point data
4. Return to main menu
enter number :
1
File created:
cm10159c.cbh
7 0 2560 1024 1280 10
Main Menu:
1. Read/create headers
2. Convert from AIRSAR CM to SIR-C MLC
3. Convert from AIRSAR Scattering matrix to SIR-C SLC
4. Convert from AIRSAR Synoptic to SIR-C MLD
5. Convert from SIR-C MLC to AIRSAR CM
6. Convert from SIR-C SLC to AIRSAR scattering matrix
7. Convert from SIR-C SLC to AIRSAR CM
8. Convert from SIR-C MLD to AIRSAR synoptic
9. Multilook SIR-C or AIRSAR data
10. Exit
enter choice -->
2
Now, the AIRSAR CM data will be converted to SIR-C MLC format. No corresponding CEOS headers are created.
convert AIRSAR CM data format to SIR-C MLC format
enter common block header file name :
cm10159c.cbh
file type : 7
file mode : 0
input record length : 2560
number of samples : 1024
number of lines : 1280
number of bytes per sample : 10
enter corresponding image data file :
cm10159c.dat
Input data is AIRSAR data
reading general scale factor from header...
COMP SCALE FACTOR: 0.1000000E+01
AIRSAR general scale factor is : 1.000000
general scale factor : 1.000000
For AIRSAR data, will automatically skip first
three lines of header in file.
enter output SIR-C MLC file name :
cm10159c.mlc
Error in record length : must be a multiple of 4
on a DEC computer.
In order to get around this problem:
Output record length evenly divisible by 5.
modified output record length is : 3190
modified output number of samples is : 1276
modified input number of lines : 1276
The above message is not an abnormal message on a DEC computer. It is correctly reducing the number of output samples.
output record length : 3190
output number of bytes per line : 12760
This program creates a common block file corresponding
to this MLC file about to be created.
enter this file name
cm10159c.mlc.cbh
This AIRSAR cm quad pol data will become
MLC quad pol data
cornerturning...
reading: 1
reading: 65
reading: 129
reading: 193
reading: 257
reading: 321
reading: 385
reading: 449
reading: 513
reading: 577
reading: 641
reading: 705
reading: 769
reading: 833
reading: 897
reading: 961
reading: 1025
reading: 1089
reading: 1153
reading: 1217
writing: 100
writing: 200
writing: 300
writing: 400
writing: 500
writing: 600
writing: 700
writing: 800
writing: 900
writing: 1000
converting to MLC...
1
101
201
301
401
501
601
701
801
901
1001
error in read 1025
error in read 1026
error in read 1027
The above error is OK.
record length is : 3190
the number of samples per line is : 1276
number of bytes per line is : 12760
number of lines is : 1024
number of bytes per sample is : 10
The output multilook file is:
cm10159c.mlc
the output common block file is :
cm10159c.mlc.cbh
Main Menu:
1. Read/create headers
2. Convert from AIRSAR CM to SIR-C MLC
3. Convert from AIRSAR Scattering matrix to SIR-C SLC
4. Convert from AIRSAR Synoptic to SIR-C MLD
5. Convert from SIR-C MLC to AIRSAR CM
6. Convert from SIR-C SLC to AIRSAR scattering matrix
7. Convert from SIR-C SLC to AIRSAR CM
8. Convert from SIR-C MLD to AIRSAR synoptic
9. Multilook SIR-C or AIRSAR data
10. Exit
enter choice -->
10
>
Appendix A: SIR-C Data Compression Formats
For SIR-C there are three possible data formats:
1) compressed cross-products data (MLC) (Multilook data)
quad-pol, 10 bytes per pixel
dual-pol 5 bytes per pixel
2) compressed detected data (MLD) (Multilook data)
single-pol, 2 bytes per pixel
3) compressed scattering matrix data (SLC) (Singlelook data)
quad-pol, 10 bytes per pixel
dual-pol, 6 bytes per pixel
single-pol, 4 bytes per pixel
In the following descriptions:
sign( ) will return the sign of the argument ( +/- 1)
nint( ) will indicate that the nearest integer value is calculated of its argument.
int( ) will indicate that the truncation of the floating point value to integer is calculated of its argument, and that, if the floating point value is less than zero, subtraction by 1.0 is additionally required. Note that this is not the same as FORTRAN int( ).
There are three data products for complex scattering matrix data, depending of polarization mode.
SIR-C "SLC" quad-pol data - 10 bytes per pixel. Consists of one file for each scene, per frequency. Each line of the file consists of TBD range samples, in which range increases with sample number. There are a TBD number of lines per file, in which each line corresponds to different azimuth or along track locations. There are no header lines after the file has been stripped for the header by the CEOS reader. The standard output product by the GDPS will not have 12 bytes of file information at the beginning of each line. There will be separate header files. This data will be single look complex scattering matrix data. This is the only format that is supported by the SIR-C calibration processor during phase 1. There is no symmetrization of the data. There is no general scale factor.
deg. 10 bytes per pixel - quad-pol data, with:
deg. Byte(1) : int{log2 (SHHSHH* + SHVSHV* + SVHSVH*+ SVVSVV*)}
deg. Byte(2) : nint{254[Mantissa - 1.5]}
Mantissa = (SHHSHH* + SHVSHV* + SVHSVH*+ SVVSVV*) / 2Byte(1)
qsca = sqrt{ [ (Byte(2) / 254 ) + 1.5] 2Byte(1) }
deg. Byte(3) : nint{127 Re(SHH)/qsca}
deg. Byte(4) : nint{127 Im(SHH)/qsca}
deg. Byte(5) : nint{127 Re(SHV)/qsca}
deg. Byte(6) : nint{127 Im(SHV)/qsca}
deg. Byte(7) : nint{127 Re(SVH)/qsca}
deg. Byte(8) : nint{127 Im(SVH)/qsca}
deg. Byte(9) : nint{127 Re(SVV)/qsca}
deg. Byte(10) : nint{127 Im(SVV)/qsca}
The total power (when decompressing) is :
TP = 0.25 ( byte(2) / 254 + 1.5) 2Byte(1))
and the remaining terms are given by :
ysca = sqrt{ [ (Byte(2) / 254 ) + 1.5] 2Byte(1) }
Re(SHH) = byte(3) ysca/127
Im(SHH) = byte(4) ysca/127
Re(SHV) = byte(5) ysca/127
Im(SHV) = byte(6) ysca/127
Re(SVH) = byte(7) ysca/127
Im(SVH) = byte(8) ysca/127
Re(SVV) = byte(9) ysca/127
Im(SVV) = byte(10) ysca/127
SIR-C "SLC" dual-pol data - 6 bytes per pixel. Consists of one file for each scene, per frequency. Each line of the file consists of TBD range samples, in which range increases with sample number. There are a TBD number of lines per file, in which each line corresponds to different azimuth or along track locations. There are no header lines after the file has been stripped for the header by the CEOS reader. The standard output product by the GDPS will not have 12 bytes of file information at the beginning of each line. There will be separate header files. This data will be single look complex scattering matrix data. The compression format is the same as for the quad-pol data format, except that not all 10 bytes are present. The bytes present depend on the polarization mode.
HH and VV polarizations : bytes 1,2,3,4,9,10
HH and HV polarizations : bytes 1,2,3,4,5,6
VH and VV polarizations : bytes 1,2,7,8,9,10
SIR-C "SLC" single-pol data - 4 bytes per pixel. Consists of one file for each scene, per frequency. Each line of the file consists of TBD range samples, in which range increases with sample number. There are a TBD number of lines per file, in which each line corresponds to different azimuth or along track locations. There are no header lines after the file has been stripped for the header by the CEOS reader. The standard output product by the GDPS will have 12 bytes of file information at the beginning of each line. There will be separate header files. This data will be single look complex scattering matrix data. The compression format is the same as for the quad-pol data format, except that not all 10 bytes are present. The bytes present depend on the polarization mode.
HH polarization : bytes 1,2,3,4
VV polarization : bytes 1,2,9,10
There are two possible data formats for Cross-products data, depending on polarization mode.
SIR-C "MLC" quad-pol data - 10 bytes per pixel. Consists of one file for each scene, per frequency. Each line of the file consists of TBD range samples, in which range increases with sample number. There are a TBD number of lines per file, in which each line corresponds to different azimuth or along track locations. There are no header lines after the file has been stripped for the header by the CEOS reader. The standard output product by the GDPS will not have 12 bytes of file information at the beginning of each line. There will be separate header files. This data will be multi look complex cross-product data. The bytes present depend on the polarization mode. The data has been symmetrized such that SHV = 0.5 (SHV +SVH).
deg. 10 bytes per pixel - quad-pol data, with:
deg. Byte(1) : int{log2(SHHSHH* + 2SHVSHV* + SVVSVV*)}
deg. Byte(2) : nint{254[Mantissa - 1.5]}
Mantissa = (SHHSHH* + 2SHVSHV* + SVVSVV*) / 2Byte(1))
qsca = [ (Byte(2) / 254 ) + 1.5] 2Byte(1)
deg. Byte(3) : nint{255 sqrt(SHVSHV* / qsca)} - 127
deg. Byte(4) : nint{255 (SVVSVV* / qsca)} - 127
deg. Byte(5) : nint{sign[Re(SHHSHV*)]
127sqrt(2|Re(SHHSHV*) | / qsca)}
deg. Byte(6) : nint{sign[Im(SHHSHV*)]
127sqrt(2|Im(SHHSHV*) | / qsca)}
deg. Byte(7) : nint{127 (2Re(SHHSVV* ) / qsca)}
deg. Byte(8) : nint{127 (2Im(SHHSVV* ) / qsca)}
deg. Byte(9) : nint{sign[Re(SHVSVV*)]
127sqrt(2|Re(SHVSVV*) | / qsca)}
deg. Byte(10) : nint{sign[Im(SHVSVV*)]
127sqrt(2|Im(SHVSVV*) | / qsca)}
The total power is :
TP = 0.25 ( byte(2) / 254 + 1.5) 2Byte(1))
The remaining terms are given by :
SHVSHV* = qsca[ (byte(3) + 127)/255]2
SVVSVV* = qsca[ (byte(4) + 127)/255]
SHHSHH* = qsca - SVVSVV* - 2 SHVSHV*
Re(SHHSHV*) = 0.5 qsca {sign(byte(5)) [byte(5)/127]2}
Im(SHHSHV*) = 0.5 qsca {sign(byte(6)) [byte(6)/127]2}
Re(SHHSVV*) = qsca [byte(7)/254]
Im(SHHSVV*) = qsca [byte(8)/254]
Re(SHVSVV*) = 0.5 qsca {sign(byte(9)) [byte(9)/127]2}
Im(SHVSVV*) = 0.5 qsca {sign(byte(10)) [byte(10)/127]2}
SIR-C "MLC" dual-pol data - 5 bytes per pixel. Consists of one file for each scene, per frequency. Each line of the file consists of TBD range samples, in which range increases with sample number. There are a TBD number of lines per file, in which each line corresponds to different azimuth or along track locations. There are no header lines after the file has been stripped for the header by the CEOS reader. The standard output product by the GDPS will have 12 bytes of file information at the beginning of each line. There will be separate header files. This data will be multi look complex cross-product data. The compression format is the same as for the quad-pol data format, except that not all 10 bytes are present. The bytes present depend on the polarization mode.
HH and VV polarizations : bytes 1,2,4,7,8
HH and HV polarizations : bytes 1,2,3,5,6
VH and VV polarizations : bytes 1,2,3,9,10
There is one Multilook detected data product :
SIR-C "MLD" single pol data - 2 bytes per pixel. Consists of one file for each scene, per frequency. Each line of the file consists of TBD range samples, in which range increases with sample number. There are a TBD number of lines per file, in which each line corresponds to different azimuth or along track locations. There are no header lines after the file has been stripped for the header by the CEOS reader. The standard output product by the GDPS will not have 12 bytes of file information at the beginning of each line. There will be separate header files. This data will be multi look detected power values. The polarization will be either HH , HV, VH, or VV, depending on mode.
deg. 2 bytes per pixel - single-pol data, with:
deg. Byte(1) : int{log2(SXYSXY*)}
deg. Byte(2) : nint{254[SXYSXY*/2Byte(1) - 1.5]}
To decompress the power,
TP = ( byte(2) / 254 + 1.5) 2Byte(1))
Appendix B: AIRSAR Data Compression Formats
For AIRSAR data, there are four possible formats :
1) compressed stokes matrix data
(multilook,quad-pol, low-res, 10 bytes/pixel)
2) compressed scattering matrix (730 processor) data
(single look,quad-pol,10 bytes/pixel)
3) compressed scattering matrix (3.5 processor) data
(single look,quad-pol, low-res, 10 bytes/pixel)
4) uncompressed synoptic amplitude data
(vax real*4, single pol, low-res, 4 bytes/pixel)
In the following descriptions:
sign( ) will return the sign of the argument ( +/- 1)
nint( ) will indicate that the nearest integer value is calculated of its argument.
int( ) will indicate that the truncation of the floating point value to integer is calculated of its argument, and that, if the floating point value is less than zero, subtraction by 1.0 is additionally required. Note that this is not the same as FORTRAN int( ).
gen_fac is the AIRSAR general scale factor whose value is recorded in the header of the oldheader, field 133.
B.1 Complex scattering matrix data
AIRSAR 730 processor "hi-res" quad-pol data - 10 bytes per pixel. Consists of four files for each scene, per frequency. Each line of each file consists of 1024 azimuth samples. There are 750 lines, each corresponding to progressively greater range from the radar. The azimuth pixel spacing is 3.33 meters. The range pixel spacing is 6.66 meters (assumes 20 MHz data). The four files are exactly adjacent to each other in azimuth. Generally, the first two lines of the file are header lines. There is no symmetrization of the data.
deg. 10 bytes per pixel - quad-pol data, with:
deg. Byte(1) : int{log2(0.25 (SHHMHH* + SHVSHV* + SVHSVH*+ SVVSVV*))}
deg. Byte(2) : nint{254[Mantissa - 1.5]}
Mantissa = 0.25 (SHHSHH* + SHVSHV* + SVHSVH*+ SVVSVV*) / 2Byte(1)
qsca = 2 sqrt{ gen_fac [ (Byte(2) / 254 ) + 1.5] 2Byte(1) }
deg. Byte(3) : nint{127 Re(SHH)/qsca}
deg. Byte(4) : nint{127 Im(SHH)/qsca}
deg. Byte(5) : nint{127 Re(SHV)/qsca}
deg. Byte(6) : nint{127 Im(SHV)/qsca}
deg. Byte(7) : nint{127 Re(SVH)/qsca}
deg. Byte(8) : nint{127 Im(SVH)/qsca}
deg. Byte(9) : nint{127 Re(SVV)/qsca}
deg. Byte(10) : nint{127 Im(SVV)/qsca}
The total power (when decompressing) is :
TP = gen_fac ( byte(2) / 254 + 1.5) 2Byte(1))
and the remaining terms are given by :
ysca = 2 sqrt{ gen_fac [ (Byte(2) / 254 ) + 1.5] 2Byte(1) }
Re(SHH) = byte(3) ysca/127
Im(SHH) = byte(4) ysca/127
Re(SHV) = byte(5) ysca/127
Im(SHV) = byte(6) ysca/127
Re(SVH) = byte(7) ysca/127
Im(SVH) = byte(8) ysca/127
Re(SVV) = byte(9) ysca/127
Im(SVV) = byte(10) ysca/127
AIRSAR 3.5 processor "complex" quad-pol data - 10 bytes per pixel. Consists of four files for each scene, per frequency. Each line of each file consists of 1024 azimuth samples. There are 1282 lines, each corresponding to progressively greater range from the radar. For 20 MHz bandwidth data, the azimuth pixel spacing is 12.2 meters (1993 and after, the prf was increased, such that the azimuth pixel spacing was decreased to 8 meters). The range pixel spacing is 6.66 meters (again assuming 20 MHz data). The first 2 lines of each file are header lines. The four files correspond to the center four looks of 16 processed looks. There is no symmetrization of the data. The compression is identical to the AIRSAR 730 processor "hi-res" quad-pol data.
The differences between AIRSAR and SIR-C data, is that the first two bytes are defined differently, and that the scale factor is defined differently. The value stored in the first two bytes by AIRSAR is the total power, while the value stored in the first two bytes by SIR-C is four times the total power. The scale factor for AIRSAR is two times larger than the scale factor used by SIR-C. In addition, there is no general scale factor for SIR-C.
Because of round off errors for some of the cross-product terms that are small, AIRSAR data converted to the SIR-C format, and then compared with the original AIRSAR compressed scattering matrix data, or with the AIRSAR Stokes data derived from the scattering matrix data, might not be in exact agreement.
AIRSAR compressed Stokes matrix "CM" quad-pol data - 10 bytes per pixel. Consists of one file for each scene, per frequency. Each line of each file consists of 1024 azimuth samples. There are 750 or 1282 lines depending on the processor, each corresponding to progressively greater range from the radar. The azimuth pixel spacing is 12.1 meters for the pre-1993 prf, and 8 meters for the 1993 and later prf. The range pixel spacing is 6.66 meters (assumes 20 MHz data). The first two or three lines in the file are header lines. The data has been symmetrized such that SHV = 0.5 (SHV +SVH), and is usually calibrated. For the "730 processor", the data has been multilooked by 4, while for the "3.5 processor", the data has been multilooked by 16.
deg. 10 bytes per pixel - quad-pol data, with:
deg. Byte(1) : int{log2(M11)}
deg. Byte(2) : nint{254[Mantissa - 1.5]}
Mantissa = (M11) / 2Byte(1))
qsca = gen_fac [ (Byte(2) / 254 ) + 1.5] 2Byte(1)
deg. Byte(3) : nint{127 M12/qsca}
deg. Byte(4) : nint{127 sign(M13/qsca) sqrt(M13/qsca)}
deg. Byte(5) : nint{127 sign(M14/qsca) sqrt(M14/qsca)}
deg. Byte(6) : nint{127 sign(M23/qsca) sqrt(M23/qsca)}
deg. Byte(7) : nint{127 sign(M24/qsca) sqrt(M24/qsca)}
deg. Byte(8) : nint{127 M33/qsca}
deg. Byte(9) : nint{127 M34/qsca}
deg. Byte(10) : nint{127 M44/qsca}
The total power is :
TP = M11 = gen_fac ( byte(2) / 254 + 1.5) 2Byte(1))
The remaining terms are given by :
M12 = M11 byte(3) /127
M13 = sign(byte(4)) M11 (byte(4) /127)**2
M14 = sign(byte(5)) M11 (byte(5) /127)**2
M23 = sign(byte(6)) M11 (byte(6) /127)**2
M24 = sign(byte(7)) M11 (byte(7) /127)**2
M33 = M11 byte(8) /127
M34 = M11 byte(9) /127
M44 = M11 byte(10) /127
M22 = M11 - M33 - M44
The difference between the AIRSAR 'CM' data and SIR-C MLC data is chiefly that, for AIRSAR, the elements of the Stokes Matrix are stored directly to each compressed byte; while for SIR-C, the cross-products (that when combined appropriately comprise the Stokes matrix) are stored. In addition, the AIRSAR data employs a general scale factor, while SIR-C does not. And finally, the value stored in the first two bytes by AIRSAR is the total power divided by the general scale factor, while the value stored in the first two bytes by SIR-C is four times the total power.
AIRSAR synoptic amplitude data - 4 bytes per pixel. This data is not compressed. Consists of one file for each scene, per channel processed (usually three). Each line of the file consists of 1279 range samples, in which range increases with sample number. There are 5090 lines per file, in which each line corresponds to different azimuth or along track locations. The azimuth pixel spacing is 12.1 meters for the pre-1993 prf, and 8 meters for the 1993 and later prf. The range pixel spacing is 6.66 meters (assumes 20 MHz data). The first two lines in the file are header lines. The data has been multilooked by 16, and the pixels are amplitude rather than power values. The format is that each pixel is a four byte DEC VAX floating point number. There is no general scale factor that is used.
Appendix C: Common Block Header File Definition
The following defined parameters may be determined and written to a file either manually or by reading the SIR-C ASCII headers or the AIRSAR headers. This appendix describes how they are defined. Input parameters may be determined from the CEOS headers. In the SAR Leader File, Data Set Summary Record, field 86 is the data type (MLC,SLC, or MLD), while field 8 of the same record is the frequency and polarization (i.e. CHH and CVV , or Lquad). From these you may determine the numerical representation of datatype and datamode by the following:
datatype field 86 Field 8
1 MLD single pol
2 MLC quad pol
3 MLC dual pol
4 SLC quad pol
5 SLC dual pol
6 SLC single pol
7 AIRSAR CM quad pol
8 AIRSAR scattering matrix quad pol
9 AIRSAR synoptic single pol
datamode field 8
0 Lquad,Cquad
1 LHH and LVV, or CHH and CVV
2 LHH and LHV, or CHH and CHV
3 LVH and LVV, or CVH and CVV
4 LHH or CHH
5 LVV or CVV
6 other single pol data (i.e. MLD HV)
The number of bytes per sample may be found in the Imagery Options File, file descriptor record, field 34. The number of samples nsamp is in the Imagery Options File, file descriptor record, field 39, while the number of lines is in the Imagery Options File, file descriptor record, field 29.
The record length in the Imagery Options File, file descriptor record, field 30. If this software is running on a DEC computer, the record length from the above field might have to be divided by 4. Check your FORTRAN reference guide.
Since the AIRSAR CM format data and the AIRSAR scattering matrix format data are only available as quad pol, the record length is always 10240 bytes, the number of samples is always 1024, the number of bytes per sample is always 10 , and the number of lines is usually either 750 or 1280.
The data type for AIRSAR CM data is '7', while the data type for AIRSAR scattering matrix data is '8'.
For AIRSAR CM data, the ASCII file will be :
7,0,10240(non-DEC computer) or 2560(DEC), 1024,750 or 1280, 10
For AIRSAR scattering matrix data, the ASCII file will be:
8,0,10240(non-DEC computer) or 2560(DEC), 1024,750 or 1280, 10
Appendix D: The Stokes matrix and Cross-Products
The symmetrized Stokes matrix may be formed from the cross-products of the scattering matrix that are stored by SIR-C in the MLC format as follows:
m(1,1) = (ShhShh* + SvvSvv* + 2ShvShv*) / 4.0
m(1,2) = (ShhShh* - SvvSvv*) / 4.0
m(1,3) = (Re(ShhShv*) + Re(ShvSvv*) ) / 2.0
m(1,4) = (-Im(ShhShv*) - Im(ShvSvv*) ) / 2.0
m(2,1) = m(1,2)
m(2,2) = (ShhShh* +SvvSvv* - 2ShvShv* ) / 4.0
m(2,3) = ( Re(ShhShv*) - Re(ShvSvv*) ) / 2.0
m(2,4) = (-Im(ShhShv*) + Im(ShvSvv*) )/ 2.0
m(3,1) = m(1,3)
m(3,2) = m(2,3)
m(3,3) = (ShvShv* + Re(ShhSvv*) / 2.0
m(3,4) = -Im(ShhSvv*) / 2.0
m(4,1) = m(1,4)
m(4,2) = m(2,4)
m(4,3) = m(3,4)
m(4,4) = (ShvShv* - Re(ShhSvv*) )/ 2.0
The cross-products in terms of the symmetrized Stokes matrix elements are :
ShhShh* = 2m(1,2) + 2m(1,1) - m(3,3) - m(4,4)
ShvShv* = m(3,3) + m(4,4)
SvvSvv* = 2m(1,1) - 2m(1,2) - m(3,3) - m(4,4)
ShhShv* = complex( m(1,3) + m(2,3), -m(1,4) - m(2, 4) )
ShhSvv* = complex( m(3,3) - m(4,4), -2m(3,4) )
ShvSvv* = complex( m(1,3) - m(2,3), -m(1,4) + m(2,4) )
For SLC data, the Stokes matrix will not be symmetrized. The unsymmetrized Stokes Matrix is given by:
m(1,1) = (ShhShh* + ShvShv* + SvhSvh* + SvvSvv*) / 4.0
m(1,2) = (ShhShh* - ShvShv* + SvhSvh* - SvvSvv*) / 4.0
m(1,3) = (Re(ShhShv*) + Re(SvhSvv*) ) / 2.0
m(1,4) = (-Im(ShhShv*) - Im(SvhSvv*) ) / 2.0
m(2,1) = (ShhShh* + ShvShv* - SvhSvh* - SvvSvv*) / 4.0
m(2,2) = (ShhShh* + SvvSvv* - ShvShv* - SvhSvh*) / 4.0
m(2,3) = ( Re(ShhShv*) - Re(SvhSvv*) ) / 2.0
m(2,4) = (-Im(ShhShv*) + Im(SvhSvv*) )/ 2.0
m(3,1) = (Re(ShhSvh*) + Re(ShvSvv*) ) / 2.0
m(3,2) = ( Re(ShhSvh*) - Re(ShvSvv*) ) / 2.0
m(3,3) = (ShvShv* + Re(ShhSvv*) / 2.0
m(3,4) = (-Im(ShhSvv*+Im(ShvSvh*) / 2.0
m(4,1) = (-Im(ShhSvh*) - Im(ShvSvv*) ) / 2.0
m(4,2) = (-Im(ShhSvh*) + Im(ShvSvv*) )/ 2.0
m(4,3) = (-Im(ShhSvv* - Im(ShvSvh*) / 2.0
m(4,4) = (Re(ShvSvh*) - Re(ShhSvv*) )/ 2.0
Appendix E: Compiling and linking
In order to use the software described in this manual, each program has to be compiled and linked on the computer that it will be executed on. If this software is copied and modified for more in-depth data analysis, that software will also have to be compiled and linked. A description of how to compile and link this software package follows.
Each file must first be compiled. Each of these FORTRAN files is believed to be standard FORTRAN 77, and should compile flawlessly on any computer. However, this is not guaranteed, as compilers are frequently not standard FORTRAN77. If it does not compile successfully, examine the error that is generated, and the FORTRAN manual for this computer.
On most unix computers, the FORTRAN compiler is called 'f77'. On some other computers (i.e. VAX computers) it is called 'fortran'. No options should be necessary to compile the software described here, other than the file names that follow these commands.
To link the main programs and generate the executable file, on unix computers the 'f77' command performs this function also. On some computers such as VAX computers, the command is 'link'.
A makefile is included with this software for compiling and linking the software on a unix computer, and is called Makefile. If this make file is in the same directory as the software, the following command should be made at this directory:
unix> make
The user will then see the compilation of the cvert program. The result will be an executable file called cvert.
If the user is on a VAX/VMS computer, then a command file is also included to compile and link the software. This command file is called all.com; to execute,
vms> @all.com
The user will then see the compilation of the cvert program. The result will be an executable program called "cvert.exe" .
Appendix F. Example Output Files
This program requires enough disk space to hold the data files, both input and output, and enough memory to run the program, which is estimated to be 16 Mbytes, but is not known exactly. The memory required is largely due to the memory required for cornerturning. This program should run on any Unix or VAX/VMS system, but is not guaranteed to run on any system. If the program will not compile, there is probably not enough memory, or the libraries are not standard.
Some common errors that may come up:
1) On a VAX computer, CVERT will be unable to read the header of a synoptic AIRSAR image, because the record length is only 5120 bytes, rather than the standard 10240 AIRSAR record length.
solution : enter the following numbers manually for this synoptic file
datatype is 9) AIRSAR synoptic
polarization is presumably known by the user, either HH, VV , or unknown
number of samples is 1280
number of lines of data is 5088
DEC computer
This will produce the following common block header file:
9 4 1280 1280 5088 4
2) error message on VMS computer when linking or runing: exceeded quota
Page file quota must be made larger.
[1] AIRSAR Reference Manual, J.J. vanZyl, editor, 1991
[2] SIR-C document
[3] Barrett, P., "CEOS data file definitions as adapted for SIR-C", JPL document #D-10870
[4] Chapman B., Vuu C., Wong C., and Barrett, P., CEOS tape reader software and SIR-C Data Compression Software User Guide Version 1.0, JPL D-11427, Feb. 1994.
[5] Dubois, P, Norikane, L., vanZyl, J., and Zebker, H., "Data volume reduction for Imaging Radar Polarimetry", 1989 IEEE Antenna Propogation Symposium, San Jose, IEEE Catalog No. CH-2654-2/89
[6] VanZyl, J., and Burnette, C., "Data volume reduction for single look polarimetric imaging radar data", IEEE Transactions Geoscience and Remote Sensing, 1990.
[7] vanZyl, J., Zebker, H., and Elachi, C., "Imaging radar polarization signatures: theory and observation", Radio Science, 22, July-August 1987, page 529-543.