s4pcdbase takes a file of raw, binary serendip4 data and outputs serendip4
dbase records (type "A" records) to stdout. Two additional
files are also produced - a log file and a file containing engineering data.
See man s4data() for the dbase format specification.
.br
.br
NOTE: much of this man page and the code itself is specific to data
obtained at AO.
.SH OPTIONS
.TP
-s
swap byte order in the raw data. Raw data is written by an Intel
machine at the observatory and thus has little endian byte ordering. If s4pcdbase is running on an architecture
with big endian ordering, then this option must be specified. Always
specify -s when running on a SPARC (Sun) machine.
.TP
-lo1 FirstLo
Specify the frequency of the first of two local oscillators in MHz.
This is a required option.
.TP
-lo2 SecondLo
Specify the frequency of the second of two local oscillators in MHz.
This is a required option.
.TP
-id ScopeId
Indicate which receiver provided the RF. This is a required option.
Valid scope IDs are:
.br
ao430 : Arecibo, 430MHz line feed
.br
ao1420 : Arecibo, 1420MHz line feed
.br
aogreg1420 : Arecibo, 1420MHz gregorian feed
.SH NOTES
Raw data comes packaged into the following record types:
.TP
hits:
time tagged spectral data
.TP
telescope strings:
time tagged pointing data
.TP
engineering data:
time tagged instrument state data
.TP
throttle factor:
a factor that governs our use of network bandwidth during
realtime data transfer
.TP
system configuration:
a dump of the system start up files
All system configuration, error, throttle factor and comment data are written to
the ".log" file.
.SH TIMING AND POSITION ISSUES
.br
Time in the raw data is always Atlantic Standard Time (AST).
Day-of-year (DOY) always starts at 1.
Time and position come from the following sources:
.TP
1) The serial telescope string.
This string arrives in the s4
PC's serial port every 5 seconds and contains a time stamped
zenith angle and azimuth. The time in the string includes
year and DOY. Except as encapsulated in the data
file name, the scope string is the *only* source of date
information.
.TP
2) The IRIG interface.
The is the observatory heartbeat and
arrives every second. It is accurate to 1/10 of a second.
This is the time that gets stamped onto hit and engineering
records. No position information arrives on the IRIG interface.
.PP
The time and position that appear in dbase records are produced
as follows:
.PP
The IRIG time that arrives in the hit record header (1 hit record =
1 spectra) provides
the time stamp for all hits in that spectra. Since pointing information
only arrives
every 5 seconds (about every 3 spectra), position is
interprolated in a linear manner from one scope string to the next, using the
slope between the two known positions.
Thus, spectra can only be recorded if they are between scope strings
in time.
This can result in
the first few and/or the last few spectra in a file being thrown away. The string
prior to the hit in time is called the Aft string and the one forward
in time is called the Forward string.
The Aft string is taken as the source of
date info *except* when the string pair straddles midnight and the
spectra is taken after midnight. In this case the Forward string is used
to obtain the date. Scope strings appear in the data stream asynchronously
to spectral data. For this reason, s4pcdbase makes two passes through
the raw data file, once to build an array of scope strings and a second
time to extract spectral, engineering and log data.
.SH BUGS
It is dangerous to rely on the command line for LO values and the
receiver ID. If these are changed at AO without our knowledge,
bogus data will result. In the future, these values should and
Man(1) output converted with
man2html