Axial - Conversion of raw data into ah format files

Description of raw data
While operational, OBS data was recorded as raw bytes into memory blocks of size 28. Four channels of data were recorded at a rate of 128 samples/second/channel. The 16-bit data required two bytes of memory. Thus each 1/128th of a second required 8 bytes of memory. WHAT IS THE ORDER OF THE TWO BYTES?]

In addition to the data bytes there is a 16 byte time code placed in each memory block. This leaves room for 65520 bytes of data (8190 samples or 63.9844 seconds) per block. The time code consists of 8 16-bit words (the ascii info is usually the instrument name plus perhaps the experiment name:
[rec no lsw] [ rec no msw ] [ time byte lsw ] [ time byte msw ]
[ buf no, disk no ] [ ascii info ] [ ascii info] [ascii info ]

3 blocks of data (63.9844 seconds per block)
|-16-||----------6520 bytes-----------|
time
mark
4 multiplexed data channels
(hydrophone, Sz, Sy, Sx)
|-16-||----------6520 bytes-----------|
time
mark
4 multiplexed data channels
(hydrophone, Sz, Sy, Sx)
|-16-||----------6520 bytes-----------|
time
mark
4 multiplexed data channels
(hydrophone, Sz, Sy, Sx)

Each block of data and time code is placed in a buffer. ~3.69 megabytes of data is accumulated in the buffer during one hour. At the end of an hour the contents of the buffer are dumped to a hard drive for permanent storage. This one hour section of data is a record. Each record is accompanied by a record header which is 32000 bytes in length. All record headers are indentical in content for a given instrument. Different instruments however, have different record headers.

1 record of data (1 hour of data)
|-32000-|
header
|------------------------------ ~3.69 megabytes ---------------------|
block1 block2 block3 block.. block.. block55 block56

Time marks are controlled by memory block size while records are dumped to disk every hour. Since the two processes are independent of each other, records do not begin or end with full blocks. There are 55-56 whole blocks in every complete record and a partial block at the beginning and end.

Conversion of raw data to ah format
To convert raw data into an easily manipulated seismic format such as ah, the record headers and time marks must be removed. This removed information must then be incorporated into the seismic trace headers.