NJPL1I00PDS100000000 = SFDU_LABEL RECORD_TYPE = STREAM OBJECT = TEXT NOTE = "IRTM CDROM File Structure and Terminology." END_OBJECT END IRTMDATA.TXT: Viking IRTM CDROM (XG Database) File Structure and Terminology R. Mehlman, H. Kieffer, 22aug89 The structure of the XG database has been modifed for the CD-ROM version in order to maximize the efficiency of data access from the optical disk. Each file on the CD-ROM corresponds to an XG "chunk". There are 102 chunks in the IRTM dataset, 66 for Viking Orbiter 1, 36 for Viking Orbiter 2. The chunk files are named TSijjj where i is the Viking Orbiter (1 or 2) and jjj is a sequence number. A separate file, the Chunk Directory, contains pointers to the various chunks as functions of orbiter and orbit. The logical record of the XG database remains at 240 bytes (120 words). The minimum size of a CD-ROM read or write is 2048 bytes; this is called a CD-ROM physical record. The (physical) block size of the database is defined as 20,480 bytes, or 10 CD-ROM physical records. A block contains 83 XG logical records followed by 560 unused bytes (2.73% of the total). A block will be the minimum amount of data actually read by an XG I/O request. The structure of a chunk file is as follows, each component consisting of an integral number of logical records: File Header } Orbit Index } Binary Orbit Directory } Label Sequence Directory } Data The File Header contains the Viking Orbiter ID and the range of orbits with data in the chunk, plus pointers to the other Binary Label components, and to the data. It is contained in one logical record. The Orbit Index contains a pointer to the Orbit Record for each orbit in the range of orbits covered by the chunk. Orbits with no data have zero pointers. The Index is contained in one or more logical records. The Orbit Directory contains Orbit Records, 1 per orbit, each contained in one logical record. An Orbit Record contains pointers to the first and last Sequence Record for that orbit, plus other information about the orbit. The Sequence Directory contains Sequence Records, 1 per sequence, each contained in 1 logical record. A Sequence Record contains pointers to the first and last data observations in the sequence, plus other information about the sequence. The Data portion of the file is in the form of a Partially Transposed Table. This is best understood by considering the logical form of the data in an IRTM chunk to be a table of rows (or data records; which are orthogonal to logical records ), each row containing one observation. Each observation consists of 83 16-bit variables: ICK (observation count from the start of an observation sequence), quality, geometry, measured items and quantities derived from them. This (hypothetical) table has been partially transposed; i.e. every 120 observations have been transposed, so that the Data portion of the file begins with a logical record containing 120 ICKs, another of 120 quality words, etc. Every 83 such logical records thus contain 120 complete observations, and these form a transposed sub-table within the chunk. (In Fortran notation: INTEGER*2 ARRAY(120,83).) Each sub-table is stored in one CD-ROM block. More such sub-tables follow in succession, until the data in the table (chunk) is exhausted. The very last sub-table will usually contain data for less than 120 observations, with the remaining space in each logical record unused. The form of the pointers in a Sequence Record can now be described: they consist of the sub-table number and the observation number within it for the first and last observations in the sequence. The data for all ICKs in the chunk (file) are stored in a contiguous fashion, with no gaps. This means that only the first sequence is guaranteed to start on a block boundary. Also, ICKs which did not contain Planet data (e.g., the Space or Reference or Housekeeping ICKs for the IRTM, or Planet data --including moon data -- which was more than 1.5 degrees off the limb of the planet) are absent. Likewise absent are data in which the investigators, for various reasons, had no confidence whatsoever. All remaining data are flagged with a quality indicator. In addition to the chunk files, the XG database includes two "cumulative directory" files, one for each Viking Orbiter. They are named TS1000.DAT and TS2000.DAT. Each consists solely of "header" material: index, orbit table entries and sequence table entries. It is constructed as if it were a chunk containing all data for the orbiter, but the data is left out. It is useful for rapid searches of the directory information.