.nr LT 6.5i
.lt 6.5i
.nr PO 0.875i
.po 0.875i
.TL
SPECtrum Processing Routines

Programmers Notes

for UNIX Systems


.AU
By

Roger Nelson Clark
Jeffrey A. Hoover
Rodney K. L. Kam



.AI
Planetary Geosciences Division Hawaii Institute of Geophysics
University of Hawaii



October 1982

.AE




.LP
.bp
.nr PO 0.875i
.po 0.875i

.ce
SPECPR Logic Unit Number Assignments

.IP 1
= GFIT restart file
.IP 2
= GFIT data transfer file for fitting
.IP 3
= Spectrum data file - device letter U
.IP 4
= Spectrum data file - device letter Y
.IP 5
= CRT Input
.IP 6
= CRT Output
.IP 7
= Spectrum data file - device letter D
.IP 8
= Spectrum data file - device letter V
.IP 9
= Spectrum data file - device letter W
.IP 10
= Addition Scratch file
.IP 11
= Wavelength file
.IP 12
= Spooler/list file
.IP 13
= Plot scratch file
.IP 14
= Wavelength header file
.IP 15
= Title storage file
.IP 16
= Save command file
.IP 17
= Starpack extinction file
.IP 18
= Restart Parameter file
.IP 19
= Copy mode output file

.bp
.ce
Random Access SPECPR Files


.TS
center,tab(!);
c c c c
c c c c
n n n l.
Logical Unit!Record Size!# Records!File Name
Number!(bytes)!!
1!768!1!GFIT .trans
2!1536!99!GFIT restart file
3!1536!2001!User Defined (u file)
4!1536!2001!User Defined (y file)
7!1536!2001!User Defined (d file)
8!1536!2001!User Defined (v file)
9!1536!2001!User Defined (w file)
10!1024!257!T{
System generated name
\&.speaddXXXXXX where XXXXXX is a unique
number generated by the system
T}
11!1024!99!.spwav
13!1536!101!T{
System generated name
\&.specplXXXXXX where XXXXXX is a unique
number generated by the system
T}
14!257!99!.wvhed
15!128!26!.spttl
16!80!100!.cmd
17!2048!101!User Defined (s file)
18!1024!5!User Defined (restart file)
.TE

.sp 5
.ce
Sequential Access SPECPR Files

.TS
center,tab(!);
c c
c c
n l.
Logical Unit!File Name
Number
5!/dev/tty? (terminal input)
 !or User Defined (redirected input)
6!/dev/tty? (output to terminal)
19!User Defined (Copy mode output file)
.TE
.bp
.TS
expand,tab(|);
c s s
c s s
c c c
c c c
cw(1.1i) lw(3.15i) nw(1.375i).
SPECtrum Processing Routines
Data Format
||length
variable|description|(16 bit words)
_
ititle(20)|T{
40 character title which describes the
data. Format: 20A2 (ASCII)
T}|20

icta(3)|T{
Civil or Universal time when data was
last processed. 3A2 Format (ASCII) HHMMSS
T}|3

ictb(3)|T{
Civil or Universal time at the start of
the spectral run 3A2 Format (ASCII) HHMMSS
T}|3

ista(3)|T{
Siderial time when data collection was
completed and written. 3A2 Format (ASCII)
HHMMSS
T}|3

istb(3)|T{
Siderial time when the spectral run started.
3A2 Format (ASCII) HHMMSS
T}|3

idatea(3)|T{
Date when data was last processed. 3A2
Format (ASCII) MMDDYY
T}|3

idateb(3)|T{
Date when the spectral run began. 3A2
Format (ASCII) MMDDYY
T}|3

irevs|T{
The number of independent spectral scans
which were added to make the spectrum
(integer number).
T}|1

irecno|T{
The record number within the file where the
data is located (integer number).
T}|1

ira(3)|T{
Right ascension coordinates of an astronomical
object, or longitude on a planetary surface
(integer numbers). (hours min sec)
T}|3

idec(3)|T{
Declination coordinates of an astronomical
object, or latitude on a planetary
surface (integer numbers) (deg min sec)
T}|3

irmas|T{
The equivalent atmospheric thickness through
which the observation was obtained
(=1.0 overhead). (integer times 1000)
T}|1
.TE
.TS
expand,tab(|);
cw(1.1i) lw(3.15i) nw(1.375i).
iband(2)|T{
The channel numbers which define the band
normalization (scaling to unity). (integers)
T}|2

ichan|T{
The number of spectral channels in the data
set (integer).
T}|1

irwav|T{
The record number within the file where the
wavelengths are found (integer).
T}|1

ifut(3)|T{
3 unused integer variables.
T}|3

itimch|T{
The time observed in the sample beam for
each half chop in milliseconds (for chopping
spectrometers only). (integer)
T}|1

ihist(30)|T{
The program automatic 60 character history
(30A2 Format). (ASCII)
T}|30

mhist(148)|T{
Manual history (4 lines of 74 characters
each, ASCII, 148A2 Format).  Program
automatic for large history requirements
T}|148

nruns|T{
The number of independent spectral runs
which were summed or averaged to make this
spectrum (integer).
T}|1

ieros|T{
Flag to indicate whether or not the data for
the error bar (1 sigma standard deviation of
the mean) is in the next record (integer).
=0: no errors, =1: errors in next record.
T}|1

iwtrns|T{
Weighted number of runs (the number of runs
of the spectrum with the minimum runs which
was used in processing this spectrum). integer
T}|1

xnrm|T{
The band normalization factor. For data scaled
to 1.0, multiply by this number to recover
photometric level. (32 bit real number)
T}|2

scatime|T{
The time it takes to make one scan of the
entire spectrum in seconds. (32 bit real #)
T}|2
.TE
.TS
expand,tab(|);
cw(1.1i) lw(3.15i) nw(1.375i).
timint|T{
Total integration time (=scatime * nruns)
(32 bit real number)
T}|2

xfut(7)|T{
Seven unused real variables for the future
T}|14

data(256)|T{
The spectral data (256 channels of 32 bit
real data numbers)
T}|512
_
|total (16 bit words):|768
.TE
