Project SIR-C

SIR-C DB-BYTE USER GUIDE

Bruce Chapman

bruce.chapman@jpl.nasa.gov

JPL D-13602

Revision 1.0

May 1996

National Aeronautics and Space Administration

Jet Propulsion Laboratory

California Institute of Technology

Pasadena, California

Copyright (c)1996 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

1. Introduction 1. Introduction

The JPL/NASA Spaceborne Imaging Radar - C (SIR-C) flew on two missions of the Space Shuttle Endeavour during 1994 - STS-59 in April 1994, and STS-68 in Sept-Oct 1994. These two successful missions resulted in a large number of images of the surface of the Earth. These images are what the surface of the Earth looks like at two radio frequencies ("L-band" and "C-Band").

Each frequency of the SIR-C radar consisted of a fully polarimetric radar. This means that the SIR-C radar obtained between one and four "channels" of data (where the actual number of channels obtained for a given datatake depend on the commands to the radar during the missions)- these different channels of data are sensitive to the scattering mechanisms that occur when the radio waves are reflected back to the radar.

A third frequency ("X-band") was provided by the XSAR radar - the data from this radar is not compressed, and this software should not be used on it. Information about the XSAR data can be found at http://www.dfd.dlr.de/xsar/Welcome.html . Together, SIR-C and XSAR comprised the Shuttle Radar Laboratory 1 and 2 (SRL-1, SRL-2) on STS-59 and STS-68, respectively.

The SIR-C data from these missions were processed on the ground from the raw signal data and were saved to CEOS format compressed data files (CEOS is an internationally recognized format for remote sensing data). One file per frequency was generated. The compression is necessary to save the different polarization channels in the smallest possible number of bytes of disk space. Even with this compression, these data files are typically hundreds of megabytes of digital data; thousands of square kilometers of Earth at pixel spacings as little as 5 meters are saved in this unique data structure, designed specifically for polarimetric SAR data.

Many users of SIR-C data are not radar "experts" and just want to see what the image looks like (even radar experts want to do that!). Many users do not want to worry about the file compression or how to decompress the data. (For users that are interested in more sophisticated analysis of the data, JPL and others have developed additional software tools - information about some of these products may be found at http://southport.jpl.nasa.gov/software.html).

The SIR-C project defined a new data product called db-byte files to satisfy the above concerns. These files are now created along with the CEOS compressed image files (as of February 2, 1996). The software described in this manual is meant to create these db-byte files from CEOS data products, especially for those datatakes processed prior to February 2, 1996.

The db_byte_cr program will read in a compressed image file and some ascii header files and create a db-byte image for each polarimetric channel present. These "db-byte" files do not contain all the polarimetric information that the compressed files have, and because they are 8 bit images, information has been lost, but they are smaller (tens of megabytes, typically), and many software packages can display and analyze them.

The db_byte_cr program assumes that the CEOS leader and image file have been decoded and written to your computers hard disk by another JPL computer program called ceos_reader (more information about this program can be found at http://southport.jpl.nasa.gov/software.html). Instructions on how to do this pre-processing step are provided in this manual.

The db_byte_cr program will create a separate byte (sometimes called "raw") image file for each polarization channel present. Each file will start with a VICAR label. VICAR stands for Video Image Communication and Retrieval - more information about this header format can be found at http://www-mipl.jpl.nasa.gov/vicar.html . The SIR-C db-byte vicar label will be described in this manual. This ASCII header to the file may be used to determine how to display it.

The db-byte file created yields more than just a pretty picture. Each Data Number (DN) , i.e. byte pixel value, corresponds to a "sigma0" value. These DN's ranges from 0 to 255 or -127 to 128 , depending on whether or not it is interpreted with a sign bit or not . These DN's are mapped to sigma0 values between -40.2 dB to +10.8 dB (most natural targets will fall within this range). Sigma0 is a measure of the radar brightness of the target. Therefore, the db-byte images can be used for limited scientific analysis. However, each increment in DN will correspond to a 0.2 db increment in Sigma0, so users should be cautious of the quantization noise when doing any quantitative analysis. The db-byte software assumes that the data is calibrated. If the data is not calibrated, then an uncalibrated byte image of the amplitude will be created instead. This will be indicated during program execution and also within the vicar header of the file.

Because dB is a logarithmic scale, the db-byte images will be stretched in a log fashion. Some image processing programs can help stretch the data in other ways if desired (the log stretch is not optimum for display!). In order to convert the dB values to linear power ratio values, simply raise 10 to the power of one tenth the dB value.

If the radar was "right looking" the data will appear to be a mirror image of the ground in the CEOS compressed data files. Therefore, to avoid this problem, if the radar is right-looking, the image is flipped left/right for the db-byte files (except for geocoded data products which are already flipped).

A simple program to read the db-byte files and convert individual pixel coordinates to db values is included with this package. This program is called db_byte_read.

The db_byte_cr and the db_byte_read programs are written in standard FORTRAN 77, and should work on any computer, though I have only tried it on UNIX operating systems. If you have the source code rather than an executable for your computer, a makefile has been included with the software for compilation ease.

At the Imaging Radar Home Page (http://southport.jpl.nasa.gov/), more information can be obtained about how to get SIR-C data, software updates and information, educational materials, and a technical bulletin board in which you may ask the radar community questions about SAR data.

Please contact the author if you need any assistance.

2. How to Get Data 2. How to get data

Obviously, before this software is of much use, you will have to obtain or already have SIR-C data. There are several types of data available - information about how to obtain SIR-C is available at the imaging radar home page http://southport.jpl.nasa.gov/scienceapps/data.html .

Survey data : This data is available over the web, and may be accessed from http://sun1.cr.usgs.gov/landdaac/sir-c/sir-c.html . This data comes on CD-ROM, and are byte images with no header. This data is lower resolution, and only one frequency. All the data from the two SIR-C missions is available in this format.

Precision data : This data may be ordered over the web from the EROS data center as well (http://sun1.cr.usgs.gov/landdaac/sir-c/precision/), but the files are two large for file transfer over the internet - the data will be sent on 8mm tape (the only format available). This is the data that the db_byte_cr software assumes that you have (in the CEOS format). The precision data consists of compressed radar data. Not all the SIR-C data has been processed to this level.

db-byte data : db-byte data is a new data product. The db_byte_read software will read pixel values from these files as well. They are very similar to the output from the db_byte_cr program, but the vicar headers are slightly different. This data product is now available from the Eros Data Center (URL TBD as I write this - check the imaging radar home page at http://southport.jpl.nasa.gov/scienceapps/data.html).

3. Pre-processing by the CEOS_READER Software 3. Pre-processing by the CEOS_READER Software

Before converting the SIR-C CEOS compressed image files to the db-byte format, the user will have to run the ceos_reader program. This program reads the SIR-C CEOS format tape, decodes the headers, writes the data to disk, and strips the image file of its header and its 12 byte CEOS prefix. These decoded files are the ones required by the db_byte_cr software. The ceos_reader program is available by license from JPL - please take a look at the imaging radar home page http://southport.jpl.nasa.gov/software.html for more information about getting a license for this software.

First, make sure that you have SIR-C compressed image files on a CEOS tape - If you have a CD-ROM, then it is NOT a CEOS tape, and you do not need to use the ceos_reader or db_byte_cr. The CEOS tapes are on 8mm tapes (2 or 5 Gbyte format), and say that they are ceos tapes on the label. Another type of tape is an "archive tape" - this type of tape is a UNIX tar tape and needs a different version of the software - the person who gave you this tape should be able to tell you what software you will need.

So, now we know that you have a ceos tape, an 8 mm tape drive, a UNIX computer, and plenty of disk space. Now, you should run the ceos_reader software :

read data from tape and create ASCII CEOS header files

1. run ceos_reader software to copy a data set to disk

a. make a directory on a disk with plenty of disk space for the data

b. run ceos_reader

> ceos_reader tape=/dev/nrmt0h

1 - continue

1 - product menu

3 - copy

return

return

return

0

c. this command copies the ceos header files and the image file to disk

d. if there is more than one ceos data set on the tape, run the ceos_reader again without rewinding.

e. /dev/nrmt0h is the tape device.

2. run ceos_reader create ASCII header files

a. run ceos_reader

> ceos_reader disk=pr10542_img_ceos

1 - continue

2 - file

3 - decode/save

return

return

return

0

b. similarly execute (and proceed as before)

> ceos_reader disk=pr10542_ldr_ceos

> ceos_reader disk=pr10542_tlr_ceos

c. this creates the ASCII CEOS header files

d. It is also possible to do this directly from the tape files - see the manual for the ceos_reader software.

4. db_byte_cr Program Execution 4. db_byte_cr Program Execution

Each SIR-C datatake has a "processing run number" associated with it. This number is a five digit number, usually beginning with a 1 or a 4, where 1 denotes data from SRL-1, and 4 denotes data from SRL-2.

Before running the db_byte_cr program, first do a directory listing, and make sure the following files are present :

prXXXXX_img_ceos_image

prXXXXX_img_ceos_ascii

prXXXXX_ldr_ceos_ascii

prXXXXX_radioplot_ZXY (Z=wavelength band, XY = polarization)

where XXXXX is the processing run number. (if the CEOS image files have been geocoded, the filenames will have ceos replaced with geos). These files were created by the ceos_reader software. The first file is the actual compressed image file and should be very large (hundreds of megabytes in most cases), while the other two are ascii header files - you can display them with the UNIX more command. There will be one radioplot file per available polarization (HH, HV, VH, or VV) and band (L or C). Other files should be present as well, but these files are the only ones that db_byte_cr needs. If all three are not present, then the db_byte_cr program will not work.

Create the db-byte files from the decoded CEOS files

1. run db_byte_cr

>db_byte_cr

10542 (processing run number)

0 (a UNIX computer other than DEC or SGI)

The db_byte_cr program will now calculate and create the available db-byte files - if you have single pol data, you will get one output db-byte file, if you have dual pol data, you will get two output db-byte files, and if you have quad-pol data, you will get three db-byte files (a db-byte file will NOT be made for the vh channel since it is very similar to the hv channel.)

The names of the output files will be :

prXXXXX_vicar_byte_xy

where x and y are the transmit and receive polarization's (either h or v).

5. VICAR Header Description

5. VICAR Header Description

The vicar header will be at the start of every db-byte file. VICAR stands for Video Image Communication and Retrieval - more information about this header format can be found at http://www-mipl.jpl.nasa.gov/vicar.html .

Most of the contents of the vicar label that are specific to the db-byte files are self-explanatory. The first dozen or so elements are required by the vicar definition and define the size of the file, for instance the number of samples (NS) and the number of lines (NL). Here is an example vicar label to a db-byte file:

LBLSIZE=3580 FORMAT='BYTE' TYPE='IMAGE' BUFSIZE=3580 DIM=3 EOL=0 RECSIZE=3580 ORG='BSQ' NL=19268 NS=3580 NB=1 N1=3580 N2=19268 N3=1 N4=0 NBB=0 NLB=0 HOST=' UNKN ' INTFMT='HIGH' REALFMT='IEEE' BHOST='UNKN ' BINTFMT='HIGH' BREALFMT='IEEE' BLTYPE='' TASK='' USER='UNKN ' DAT_TIM='UNKN ' SENSOR='SIR-C' MISSION='SRL-2' DATATAKE_ID=38.20 FREQ='L-Band 1.254 GHz' POL=HH RADAR_ACQ_MODE=11 PULSE_BANDWIDTH=10 MHz PRF=1395. Hz QUANT=(8,4)BFPQ ORBIT_DIR='DESCENDING' ANTENNA_DIR='Right (South) looking' TRACK_ANGLE=118.8 Deg E of North INC_ANGLE=55.8 deg BEAM_SPOIL=0 PROD_TYPE='Db Byte Image' PROC_RUN_NO=41876 BYTE_UNITS='dB' SCALING='-40dB (DN is 1) to +10.8dB (DN is 255), step is 0.2dB, 0 DN means no data' SITE='Altona, Manitoba Canada ' SCENE='UNKN ' CTR_LAT='49.07265 deg ' CTR_LONG='-97.50185 deg 'GMT_IMG_CTR='1994/10/02 18:27:25.577' MET_IMG_CTR='02 07:11:25.602' PROC_DATE='UNKN ' SW_VERS='1.3.0 ' IMG_SZ_RANGE=47.69 km IMG_SZ_AZIM=99.99 kmDIG_IMG_DIM=3580 pixels X 19268 lines PIX_SP_DIG_PROD=rng 13.3 m / az 5.19 m NOM_RES_DIG_PROD=rng 19.3 m / az 8.13 m RADIOMETRIC_REPRESENT='Backscatter coeff in scaled dB units' GEO_REPRESENT='SLANT RANGE ' DOPP_CENTR=336. Hz CALIBR?='YES'

The vicar header is an ascii header. It is included so that users can get a brief description of the file. In addition, the semi-public domain program XV (versions 2.21 and 3.10 but NOT v3.00) can display these files as is. In addition, if you use the UNIX more command, you will be able to read the vicar label.

If you want to display the db-byte files with programs other than XV (described in the previous chapter), typically you just need to get an image processing program that accepts raw, byte images - Many commercial packages have this option. The "width" of the image is the number of samples (NS in the vicar label), and the "height" of the image is the number of lines (NL in the vicar label).

The vicar label is allocated to take up to 1400 bytes of the file. In addition, if the vicar label is shorter than the length of the line, then it will be padded with spaces to fill the line. If each line is less than 1400 bytes, the remainder will be written to the following lines, with the last line padded with spaces to fill the line.

When processing the SIR-C data to the compressed image format, sometimes these db-byte files were created along with the compressed image files. However, due to technical reasons, the vicar label created by db_byte_cr has slightly differents contents. The number of lines and samples is the same.

If the data is NOT calibrated, this will be indicated within the vicar label under several categories.

6. Explanation of DN Values 6. Explanation of DN Values

The DN values follow the vicar label in the file. The definition of the file is meant to satisfy users quantitative as well as qualitative needs : The DN values are coded to the db value of the radar backscattered cross section (sigma0), so that some limited quantitative analysis can be performed; as well as being image values that can be displayed and printed.

Each DN is an 8 bit number that ranges from 0 to 255 (or, if interpreted as having a sign bit, -127 to 128). If you interpreted as having a sign bit, you should first translate it to unsigned (0 to 255).

A DN of 0 corresponds to a db value of -40.2 db. Each unit change in DN corresponds to a change of 0.2 db. A DN of 255 therefore corresponds to +10.8 db. Therefore, values can be converted from DN to db by the following formula :

db-value=-40.2 + 0.2 * DN

These db values are a power ratio and were obtained by measuring the ratio of the backscattered energy to that of an isotropic scatterer.

The db-byte software assumes that the data is calibrated. If the data is not calibrated, then an uncalibrated byte image of the amplitude will be created instead. This will be indicated during program execution and also within the vicar header of the file. There is no formula to convert these uncalibrated byte values to db. If the data is uncalibrated, the byte files generated should not be used for quantitative analysis, but for display purposes only. Some data from the SIR-C data is NOT calibrated, so be sure that you know whether or not the data is calibrated before attempting to analyze the data.

In db-byte files created by the SIR-C processor, a DN of 0 indicates filler data (or sigma0's less than -40db). However, from the precision data products filler data can not be distinguished from sigma0's less than -40db.

Values below -40db and above 10.8 db will be saturated.

7. db_byte_read - A Simple Utility Program 7. db_byte_read - A Simple Utility Program

A simple utility program has been provided that will return the db value of a pixel of a db-byte file. This program converts the DN value for one pixel to db units.

READ the db-byte files at a specified pixel

1. run db_byte_read

>db_byte_read

pr10542_vicar_byte_hh (db-byte file name)

3580 (number of pixels (bytes) per line)

1 (using a DEC computer)

100,100 (x,y pixel coordinates)

***returns DN and db value***

0 (No more pixels)

Appendix A. Data Formats Appendix A. Data Compression Formats

This appendix will describe the 5 most common data formats for SIR-C data. It does not describe the CEOS format or the CEOS header definitions. For that, users should refer to the CEOS data file definitions [3]. For SIR-C there are three possible compressed data formats and two 8 bit formats:

Appendix A.1 compressed cross-products data (MLC) (Multilook data) CEOS format

quad-pol, 10 bytes per pixel

dual-pol 5 bytes per pixel

Appendix A.2 compressed detected data (MLD) (Multilook data) CEOS format

single-pol, 2 bytes per pixel

Appendix A.3 compressed scattering matrix data (SLC) (Singlelook data) CEOS format

quad-pol, 10 bytes per pixel

dual-pol, 6 bytes per pixel

single-pol, 4 bytes per pixel

Appendix A.4 db-byte data

quad, dual, and single pol - 1 byte per pixel (coded to db)

Appendix A.5 survey data

One polarization onle - 1 byte 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( ).

Appendix A.1 Single Look Complex data Appendix A.1 Single Look Complex data

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. There will be separate header files. This data will be single look complex scattering matrix data. 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. 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 polarization's : bytes 1,2,3,4,9,10

HH and HV polarization's : bytes 1,2,3,4,5,6

VH and VV polarization's : 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.. 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

Appendix A.2 Multi Look Complex data Appendix A.2 Multi Look Complex data

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. 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. 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 polarization's : bytes 1,2,4,7,8

HH and HV polarization's : bytes 1,2,3,5,6

VH and VV polarization's : bytes 1,2,3,9,10

Appendix A.3 Multi Look Detected data Appendix A.3 Multi Look Detected data

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. 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 A. 4 db-byte Format Appendix A. 4 db-byte Format

The db-byte format is an 8 bit representation of each available channel of data (hh, hv, vh, or vv - though if quad pol only hv and not vh is created) per frequency. Each file will start with a VICAR label. VICAR stands for Video Image Communication and Retrieval - more information about this header format can be found at http://www-mipl.jpl.nasa.gov/vicar.html .

The names of the db-byte files will be :

prXXXXX_vicar_byte_xy

where x and y are the transmit and receive polarization's (either h or v).

Each Data Number (DN) value corresponds to a "sigma0" value. These DN's ranges from 0 to 255 or -127 to 128 , depending of whether or not it is interpreted with a sign bit or not . These DN's are mapped to sigma0 values between -40.2 dB to +10.8 dB (most natural targets will fall within this range). Sigma0 is a measure of the brightness of the target. Therefore, the db-byte images can be used for limited scientific analysis. However, each increment in DN will correspond to a 0.2 db increment in Sigma0, so users should be cautious of the quantization noise when doing any quantitative analysis.

The db-byte software assumes that the data is calibrated. If the data is uncalibrated, this is indicated in the vicar label "uncalibrated byte image of Amplitude (not Power)". In that case, the DN's will not correspond to db values, and quantitative analysis of the data is not recommended.

The number of samples (bytes) per line may be found in the vicar label (NS), as well as the number of lines (NL) - the number of lines includes the vicar header, as the vicar header overwrites the first line or so of the data. The file will then be structured as :

-------------

header (1400 bytes + fill to NS bytes)

data line -> NS bytes

.

.

.

NL - number of vicar lines of data

-------------

The header may take more than one line. In any case, the end of the header will filled to the end of the line (NS bytes).

To convert from DN to sigma0 (db) :

db-value=-40.2 + 0.2 * DN

In db-byte files created by the SIR-C processor, a DN of 0 indicates filler data (or sigma0's less than -40db). However, from the precision data products filler data can not be distinguished from sigma0's less than -40db. Values below -40db and above 10.8 db will be saturated.

If the radar was "right looking" the data will appear to be a mirror image of the ground in the CEOS compressed data files. Therefore, to avoid this problem, if the radar is right-looking, the image is flipped left/right for the db-byte files.

Most of the contents of the vicar label that are specific to the db-byte files are self-explanatory. The first dozen or so elements are required by the vicar definition and define the size of the file, for instance the number of samples (NS) and the number of lines (NL). Here is an example vicar label to a db-byte file:

LBLSIZE=3580 FORMAT='BYTE' TYPE='IMAGE' BUFSIZE=3580 DIM=3 EOL=0 RECSIZE=3580 ORG='BSQ' NL=19268 NS=3580 NB=1 N1=3580 N2=19268 N3=1 N4=0 NBB=0 NLB=0 HOST=' UNKN ' INTFMT='HIGH' REALFMT='IEEE' BHOST='UNKN ' BINTFMT='HIGH' BREALFMT='IEEE' BLTYPE='' TASK='' USER='UNKN ' DAT_TIM='UNKN ' SENSOR='SIR-C' MISSION='SRL-2' DATATAKE_ID=38.20 FREQ='L-Band 1.254 GHz' POL=HH RADAR_ACQ_MODE=11 PULSE_BANDWIDTH=10 MHz PRF=1395. Hz QUANT=(8,4)BFPQ ORBIT_DIR='DESCENDING' ANTENNA_DIR='Right (South) looking' TRACK_ANGLE=118.8 Deg E of North INC_ANGLE=55.8 deg BEAM_SPOIL=0 PROD_TYPE='Db Byte Image' PROC_RUN_NO=41876 BYTE_UNITS='dB' SCALING='-40dB (DN is 1) to +10.8dB (DN is 255), step is 0.2dB, 0 DN means no data' SITE='Altona, Manitoba Canada ' SCENE='UNKN ' CTR_LAT='49.07265 deg ' CTR_LONG='-97.50185 deg 'GMT_IMG_CTR='1994/10/02 18:27:25.577' MET_IMG_CTR='02 07:11:25.602' PROC_DATE='UNKN ' SW_VERS='1.3.0 ' IMG_SZ_RANGE=47.69 km IMG_SZ_AZIM=99.99 kmDIG_IMG_DIM=3580 pixels X 19268 lines PIX_SP_DIG_PROD=rng 13.3 m / az 5.19 m NOM_RES_DIG_PROD=rng 19.3 m / az 8.13 m RADIOMETRIC_REPRESENT='Backscatter coeff in scaled dB units' GEO_REPRESENT='SLANT RANGE ' DOPP_CENTR=336. Hz CALIBR?='YES'

It is an ASCII header, and may be displayed with the unix more command. The SIR-C processor sometimes created these db-byte files were created along with precision data products. However, due to technical reasons, the vicar label created by db_byte_cr has slightly differents contents than the one created by the SIR-C processor. The number of lines and samples is the same.

Appendix A. 5 Survey Format Appendix A. 5 Survey Format

The survey data product is simply one channel of data (one polarization channel of one frequency, usually L-band HH pol), low resolution (50 m pixel spacing), in an unsigned 8 bit data format. This data format is not calibrated - the byte values can not be converted to sigma0 (db).

Each line is 2000 bytes long (ie. width is 2000 bytes). The number of lines (ie. height) is variable. Each byte value represents the brightness, with 0 the lowest, and 255 the highest. This is often called a "raw" data format.

Along with image data, this data format includes annotation. This annotation is self-explanatory.

This data is available on cd-rom or over the World Wide Web at http://sun1.cr.usgs.gov/landdaac/sir-c/survey.html .

Appendix B: Using Archive Tapes Appendix B: Using Archive Tapes

When using SIR-C archive tapes, the ceos_reader software will not function. Therefore, the program ceos_rd must be used. Information on obtaining this software is at http://southport.jpl.nasa.gov/software.html .

The archive tapes are not available for general distribution. These archive tapes are used for generating the CEOS tape which are used for general distribution. However, there may be some users that will find themselves with an archive tape. The tar tapes consist of the CEOS format files, but they are not CEOS format tapes.

The archive tapes are unix tar format tapes. Therefore, the first thing to do is tar the three CEOS files per processing run number to your computer hard disk.

Then, you should run the ceos_rd program. This program should be executed as follows :

>ceos_rd XXXXX

where XXXXX is the processing run number. The output will be several new files, some of which will be :

prXXXXX_img_ceos_image

prXXXXX_img_ceos_ascii

prXXXXX_ldr_ceos_ascii

prXXXXX_radioplot_ZXY (Z=wavelength band, XY = polarization - one for each possible combination)

Then, run the db_byte_cr program as described earlier in this manual.

If the data has been geocoded, then CEOS files are created for both the geocoded and non-geocoded data. By defaul t, the ceos_rd program only decodes the geocoded data, if both are on the disk. the db-byte software in turn first looks for non-geocoded data files decoded by the ceos_rd program, then for geocoded products. File names required for geocoded data products are:

prXXXXX_img_geos_image

prXXXXX_img_geos_ascii

prXXXXX_ldr_geos_ascii

prXXXXX_radioplot_ZXY (Z=wavelength band, XY = polarization- one for each possible combination)

Follow the procedure below for creating db-byte files for geocoded data products :

Procedure for Geocoded data products

1) db-byte files for geocoded data only

- tar geos files to disk (OK if ceos files also on disk)

- run ceos_rd as above

- run db_byte_cr as above

*** geos db-byte files created

2) db-byte files for non-geocoded data only

- tar ceos files to disk (geos files must not be present!)

- run ceos_rd as above

- run db_byte_cr as above

*** ceos db-byte files created

3) db-byte files for both geocoded and non-geocoded data

- tar ceos and geos files to disk

- run ceos_rd program as above

- run db_byte program as above

*** geos db-byte files created

- delete all geos files

- run ceos_rd program as above

- run db_byte software as above

*** ceos db-byte files created

Appendix C: The Stokes matrix and Cross-Products Appendix C: 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 D: Compiling and linking Appendix D: Compiling and linking

If you have received source code rather than an executable for your computer, then the software must be compiled. This software is written in standard FORTRAN77.

On most UNIX computers, the FORTRAN compiler is called 'F77'. 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.

A makefile has been provided to compile the code. In order to execute the makefile, simply type make in the directory with the makefile and the source code. An executable will be created.

References References

[1] Dubois, P, Norikane, L., vanZyl, J., and Zebker, H., "Data volume reduction for Imaging Radar Polarimetry", 1989 IEEE Antenna Propagation Symposium, San Jose, IEEE Catalog No. CH-2654-2/89

[2] VanZyl, J., and Burnette, C., "Data volume reduction for single look polarimetric imaging radar data", IEEE Transactions Geoscience and Remote Sensing, 1990.

[3] Barrett, P., "CEOS data file definitions as adapted for SIR-C", JPL document #D-10870

[4] vanZyl, J., Zebker, H., and Elachi, C., "Imaging radar polarization signatures: theory and observation", Radio Science, 22, July-August 1987, page 529-543.

[5] Chapman, B., "SIR-C Data Compression Software Users Guide", June 1994, JPL Document #D-11427

[6]Chapman, B., "SIR-C/AIRSAR Data Conversion Guide", June 1994, JPL Document #D-11836

[7] Vuu, C., Wong, C., and Barrett, P., "SIR-C CEOS Tape Reader", June 1994, JPL Document #D-11427