Synopsis

The purpose of this page is to help you display and manipulate RADARSAT data from Gatineau via SAA. IDL functions and procedures are used to view the data. The data are in CEOS format, but we do not currently have the correct programs for reading data in the Gatineau version of CEOS.

1. Determine the file size: how many bytes per record (or bytes/line)?

Method 1: use the idl function 'gatineau1' as follows.

IDL> filename='NSS.R1.CA.D97044.T113808.P48N086.P42N077.A.D'

IDL> .run gatineau1

% Compiled module: GATINEAU1.

IDL> print,gatineau1(filename)

Number of bytes / line = 5776

Find the number of lines:

IDL> print,(28896252-16252)/5776

5000

(28896252=file size in bytes) (16252=header on all the RADARSAT image files)

Method 2: Use od (octal dump) to view the data file.

Find the bytes per record value in the appropriate position in the file as shown below.

tephra.geo(13)% od -c NSS.R1.CA.D97044.T113808.P48N086.P42N077.A.D | more

0000000 \0 \0 \0 001 ? 300 022 022 \0 \0 ? |

0000020 C E O S - S A R - C C T B B

000040 C E R S A R P . 2 0 2

0000060 R S A T - 1 - S A R - S C W

0000100 F S E Q 1 4

0000120 F T Y P 5 4

0000140 F L G T 9 4

0000160

*

0000260 5 0 0 8 (the number of bytes per record (line))

0000300

0000320 8 1

0000340 1 1

0000360 0 4 8 1 6

0000400 0 0 0 B S Q

0000420 1 1 1 8 0 4 8 1 6

0000440 0 1 3 4 P B

0000460 4 9 2 P B 4 5 4 P B

0000500 2 1 4 P B 2 9 4 P B

0000520

*

0000620 U N S I G N E D I N T E G E R

2. Use IDL function 'readavg' to create a reduced sized image to view.

Modify the following lines accordingly:

infile = 'NSS.R1.CA.D97044.T113808.P48N086.P42N077.A.D'

infile = '/usr/local/ice/saa_radar/D97044/'+ infile (change the path)

recsize = 5776; bytes per record (line) including leading CEOS bytes

records = 5000; number of records (lines)

avgsize = 4 ; NOTE: THIS MUST BE A FACTOR OF xsize AND records! (4 works for most scenes)

Invoke readavg as follows:

Drew's Home