flipsac - Prepares SAC HRPT archive files for ingest

SYNOPSIS

flipsac [ inputfile outputfile ]
flipsac [ parameter=value ... ] [ inputfile pass-number ]

Parameters are: on_pass_disk, pass_year, abs_tape_file.

DESCRIPTION

flipsac prepares SAC HRPT archive files for ingest by avin or hrptin. flicsac converts the archive data to generic raw HRPT frame format, e.g., 22180-byte records, with each 10-bit HRPT word stored as two bytes. flicsac determines whether SAC HRPT archive files have been rotated 180 degrees; if so, flicsac un-rotates the archive files. flicsac can read from tape or disk; it can only write to disk, either a plain UNIX file or a raw TeraScan pass.

PARAMETERS

on_pass_disk

This parameter is used only if the outputfile is a number. Answer yes if the output is raw TeraScan pass, or no if the output is to a plain UNIX disk file.

Valid responses are [yes or no]. The default is yes.

pass_year

If on_pass_disk=yes, this is the year that the pass was collected.

The valid range is [>=1970]. The default is [current year].

abs_tape_file

One-relative number of the file on tape to read. If abs_tape_file=0, then no tape positioning is attempted. If abs_tape_file>0, then the input tape is rewound, and then abs_tape_file-1 files are skipped. The default is [0].

EXAMPLES

The following examples shows how flicsac should be used. avin or hrptin could be run more than once.

[1] % flipsac /dev/rmt/0n rawsac
abs_tape_file  : int       ? [0]
[2] % avin
output file(s) : char(255) ? [.]
on_pass_disk   : char(  3) ? [yes] no
tape_device    : char(255) ? [/dev/ncht0] rawsac
:
[3] % rm rawsac
[4] % flipsac on_pass_disk=yes pass_year=1999 /dev/rmt/0n 1
abs_tape_file  : int       ? [0]
[5] % avin
output file(s) : char(255) ? [.]
on_pass_disk   : char(  3) ? [yes] yes
pass_number    : int (255) ? [] 1
:

SEE ALSO

avin, hrptin

NOTES

SAC HRPT archive format consists of a single 800-byte ASCII header block, followed by some number of 64000-byte block. The number of 64000-byte blocks is always a multiple of 4. 22016-byte logical HRPT records are spread across these 64000-byte blocks, occasionally crossing block boundaries. The format of each 22016-byte logical record is as follows:

byte range # bytes # words Content
---------- ------- ------- -------
0- 1487 1488 744 First 750 HRPT words minus 6 sync words
1488- 3535 2048 1024 Channel 1 (first half line)
3536- 5583 2048 1024 Channel 2 (first half line)
5584- 7631 2048 1024 Channel 3 (first half line)
7632- 9679 2048 1024 Channel 4 (first half line)
9680-11727 2048 1024 Channel 5 (first half line)
11728-13775 2048 1024 Channel 1 (second half line)
13776-15823 2048 1024 Channel 2 (second half line)
15824-17871 2048 1024 Channel 3 (second half line)
17872-19919 2048 1024 Channel 4 (second half line)
19920-21967 2048 1024 Channel 5 (second half line)
21968-22015 48 24 Junk

The only part of the header block used by flicsac is the number of records.


Last modified $Date: 1999/09/03 12:31:56 $