CCSD3ZF0000100000001NJPL3IF0PDS200000001 = SFDU_LABEL RECORD_TYPE = FIXED_LENGTH RECORD_BYTES = 80 SPACECRAFT_NAME = MAGELLAN TARGET_NAME = VENUS OBJECT = TEXT PUBLICATION_DATE = 1991-12-31 BYTES = 80 NOTE = "MIT-MGN-GxDR v 2.3 Software Interface Specification" END_OBJECT = TEXT END M.I.T. Center for Space Research PROJECT MAGELLAN Software Interface Specification MIT-MGN-GxDR ALTIMETRIC AND RADIOMETRIC GLOBAL DATA RECORDS prepared by Peter G. Ford Center for Space Research Massachusetts Institute of Technology Cambridge, Mass. 02139 Tel (617) 253-6485 Version 2.3 December 31, 1991 ________________________________________________________________________ 1. General Description 1.1. Overview This Software Interface Specification (SIS) contains the description of the Altimetry and Radiometry Global Data Record product tapes for the Magellan Project. 1.2. Scope The format and content specifications in this SIS apply to all phases of the project for which this product is required. 1.3. Applicable Documents [1] ANSI X3.27-1978, American National Standards Institute, Magnetic Tape Labels for Information Exchange, Appendix X, Label and Volume Organization, April 18, 1977. [2] JJPL-0006-00-01, JPL SFDU Description and Usage. Issue 5, March 7 1988. [3] MIT-MGN-SDMP, Magellan Altimetry & Radiometry Data Processing Software and Data Management Plan, MIT Center for Space Research, Revision 5, September 20, 1989. [4] MIT-MGN-SDD, Magellan Altimetry & Radiometry Software Design Document, MIT Center for Space Research, Version 2.0, September 20, 1989. [5] MIT-MGN-ARCDR, Magellan Altimetry & Radiometry Composite Data Record, Software Interface Specification, MIT Center for Space Research, Version 2.3, September 12, 1991. [6] JPL D-4311, VICAR Run-Time Reference Manual--VICAR image file and label format definition, JPL Multi-mission Image Processing Laboratory, B. Deen and Dan Stanfill, Version 13H, November 28, 1988, with preliminary section entitled "the VICAR File Format", 12 January 1990. [7] JPL D-4186, VICAR User's Guide--VICAR Image File and Label Format Definitions, JPL Multi-mission Image Processing Laboratory, Issue 1, May 15, 1987. [8] Map Projections used by the Geological Survey--the Sinusoidal Map Projection. Geological Survey Bulletin 1532, Second Edition. John Snyder. 1983, pp. 219-222. [9] MGN 630-79, Rev. D, Magellan Planetary Constants and Models, D.T. Lyons, Magellan Mission Design, JPL, January 9, 1991. [10] Standards for the Preparation and Interchange of Data Sets, T.Z. Martin et al., D-4683, JPL Planetary Data System, Version 1.1, October 3, 1988. 1.4. System Siting 1.4.1. Interface Location and Medium Global A&R tapes are created by the MIT A&R data processing system, consisting of Sun/4 work stations and Fujitsu 2444AC tape drives. 1.4.2. Data Sources, Destinations, and Transfer Methods Global A&R tapes contain files created by the MIT A&R data processing system. They are written in ANSI standard format on computer compatible tape (CCT). Product tapes are provided to the MGN Data Management and Archive Team (DMAT), which forwards the tapes to users. 1.4.3. Generation Method and Frequency Global tapes are generated from the ARCDR product described in Applicable Document [5]. In order to correct for systematic errors in orbit determination, partially processed A&R data is "staged" until 360 orbits have accumulated. An orbit correction algorithm is then applied, and the resulting data written to ARCDR tapes. Each ARCDR tape contains data from up to 60 sequential Magellan orbits. All data that are written to ARCDR are also resampled in a sinusoidal projection and accumulated in global data arrays (as described in applicable document [4]). These arrays represent the four primary A&R data types--radius, slope, reflectivity, and emissivity. Twice during the nominal mission, these arrays are written to tape in the form of global A&R data products. The first time will occur approximately 160 days after the In-Orbit Checkout Phase (IOC), and the second approximately 120 days later. 1.5. Assumptions and Constraints 1.5.1. Usage Constraints Global A&R tapes shall be provided, through the DMAT, to project- designated teams and investigators. 1.5.2. Priority Phasing Constraints Global A&R tapes will be generated at MIT from 160 days after end of the In-Orbit Checkout phase, through the end of the mission. 1.5.3. Explicit and Derived Constraints None. 1.5.4. Documentation Conventions 1.5.4.1. Data Format Descriptions The reference data unit is the byte. In Global A&R products, data is stored in fields with various sizes and formats--one- and two-byte unsigned binary integers, and character strings. The detailed formats of the numeric fields of the product tapes sent to DMAT are defined in appendix A. If a field is described as containing n bytes of ASCII character string data, this implies that the leftmost (lowest numbered) byte contains the first character byte, the next lowest byte contains the next character, and so forth. Character strings are written to tape with lower numbered bytes preceding higher numbered bytes. Image frames and sub-frames can be thought of as pictures or as an nxm dimensional array of binary numbers (pixels) A(x,y). When written to tape, pixel A(0,0), representing the top left corner of the picture, is written first, followed by A(1,0), and so forth. Pixel A(n-1,0) occupies the top right corner, A(0,m-1) the bottom left corner, and A(n-1,m-1) the bottom right. 1.5.4.2. Time Standards The Global A&R products shall adopt the January 1.5, 2000 epoch as the standard time for SCET. All times will be reported in Spacecraft Event Time which is measured in Ephemeris Time (TDB). 1.5.4.3. Coordinate Systems The A&R Global products shall adopt the J2000 coordinate system for all inertial values, i.e. those that define the motion of the spacecraft relative to celestial objects. Locations on the Venus surface shall be expressed in the VBF85 coordinate system. See Applicable Document [9] for further details. 1.5.4.4. Limits of This Document This document defines the format for Global A&R product tapes. It specifies ANSI and SFDU labeling at the volume and file levels, and extends to the logical record level for altimetry and radiometry data files. ________________________________________________________________________ 2. Interface Characteristics 2.1. Hardware Characteristics and Limitations 2.1.1. Special Equipment and Device Interfaces The primary input data to the MIT A&R data processing system shall be ALT-EDR tapes supplied by the MGN DMAT. These will be read from high-density (6250 bpi) tape drives by the MGMLOG, MGMSAR, and MGMCTL programs running on Sun/4 (SPARC) hardware. The output from each ALT-EDR shall consist of up to 7 separate altimeter and radiometer files in ARCDR format, as described in applicable document [4]. Altimetry and radiometry files are stored on magnetic disks until approximately 360 orbits have accumulated, at which time the orbit correction program MGMORB is run to compute a set of orbit element corrections. Finally, the program MGMGEN reads up to 60 orbits of altimetry, radiometry, and ephemeris (S-kernel), applies the corrections, and saves the four primary data types--radius, slope, reflectivity, and emissivity--in a set of two-dimensional arrays. Twice during the nominal Magellan mission, these arrays are reprocessed by the MGMMAP phase to yield Global A&R product tapes. 2.1.2. Special Setup Requirements The MGMMAP program is able to run during an unattended work shift. Two high-density tape drives must be available at this time. 2.2. Volume and Size The data for each Global product tape consist of a set of 78 files (111 for the GTDR), as detailed in Section 4, below. These files include 72 image frames (104 for the GTDR), each divided into 1024x1024-pixel sub-frames, each with its own VICAR header label. Each Global product will be written on a single magnetic tape reel. 2.3. Labeling and Identification 2.3.1. Magnetic Label Global A&R tapes delivered to DMAT shall have Level 3 ANSI standard magnetic labels (see Applicable Document [1]), and file structures as described in Section 5 of this document. In addition, the header and trailer files shall be identified by a set of Standard Formatted Data Unit (SFDU) labels, as described in Applicable Document [2]. 2.3.2. External Tape Label Each volume shall have an external label defining its contents. In addition to creation time, the label shall include the following structure designated by DMAT as the generic external product label, as the unique product identifier: GxDR.c;v where x may be 'T', 'S', 'RE', or 'E', according to whether this product is the GTDR, GSDR, GREDR, or GEDR. c is the latest mapping cycle what contributes data to this product. v is a decimal version number which shall be initialized at '1' for each product tape, and incremented by 1 for each subsequent iteration of that product tape. For test tapes, 'v' consists of the letter 'T' followed by a decimal version number which shall be initialized at '1' for each test tape, and incremented by 1 for each subsequent iteration of that test tape. 2.4. Interface Medium Characteristics Magellan global A&R products shall be contained on a single reel of 1/2 inch computer compatible magnetic tape written with 9 tracks at 6250 bytes per inch. The length of each tape reel shall be either 2400 or 3600 foot, as necessary. 2.5. Failure Protection, Detection, and Recovery Procedures Three copies of each global A&R product tape shall be written. Two shall be delivered to DMAT, and the third retained at MIT. 2.6. End-of-File Conventions End of file labeling shall comply with SFDU standards (see Section 4, below), and with ANSI standards for multi-file magnetic tapes. 2.7. End-of-Volume Conventions End of volume labeling shall comply with SFDU standards (see Section 4, below), and with ANSI standards for multi-file and single-volume magnetic tapes. ________________________________________________________________________ 3. Access 3.1. Programs Using the Interface Global A&R files are generated by the MIT A&R programs MGMMAP and WRITE_GXDR. Investigators' programs that use A&R products cannot be identified here. 3.2. Synchronization Considerations 3.2.1. Timing and Sequencing Considerations None. 3.2.2. Effective Duration Except in special circumstances, the Global A&R product tapes delivered to DMAT shall be the final versions. 3.2.3. Priority Interrupts None identified. 3.3. Input/Output Protocols, Calling Sequences None identified. ________________________________________________________________________ 4. Detailed Interface Specifications 4.1. Structure and Organization Overview Each global A&R tape shall consist of a single Volume Header File and a Single Volume Trailer File that brackets 72 image files (104 files for the GTDR), as shown in tables 4-1 and 4.2. In the following diagrams, the last column refers to the part of Section 5, below, that describes the detailed format of the files. +-------------------------------------------------------------------+ | Table 4-1. Order of Files on GxDR Product Tapes | |(applies to GSDR, GREDR, and GEDR. See Table 4-2 for GTDR contents)| +-----+---------------------+---------------------+-----------+-----+ | Seq | Description | Image Projection | Size | Sec | +-----+---------------------+---------------------+-----------+-----+ | 1 | Volume Header File | | varies | 5.2 | | 2 | Frame Header | Sinusoidal | 128x1024 | 5.3 | | 3 | Framelet #1 | . | 1024x1024 | 5.4 | | . | . | . | . | . | | 34 | Framelet #32 | . | 1024x1024 | 5.4 | | 35 | Frame Header | Polar Stereographic | 128x1024 | 5.3 | | 36 | Framelet #1 | (North) | 1024x1024 | 5.4 | | . | . | . | . | . | | 39 | Framelet #4 | . | 1024x1024 | 5.4 | | 40 | Frame Header | Polar Stereographic | 128x1024 | 5.3 | | 41 | Framelet #1 | (South) | 1024x1024 | 5.4 | | . | . | . | . | . | | 44 | Framelet #4 | . | 1024x1024 | 5.4 | | 45 | Frame Header | Mercator | 128x1024 | 5.3 | | 46 | Framelet #1 | . | 1024x1024 | 5.4 | | . | . | . | . | . | | 77 | Framelet #32 | . | 1024x1024 | 5.4 | | 78 | Volume Trailer File | | Varies | 5.5 | +-----+---------------------+---------------------+-----------+-----+ 4.2. Substructure Definition and Format Section 5 of this document details the use of Standard Formatted Data Unit (SFDU) labels and headers and provides a description of the data files on the tape. The Volume Header and Trailer Files are detailed in Sections 5.2 and 5.5, respectively. 4.2.1. SFDU Labels and Headers SFDU labels are used to identify and characterize only the header and trailer files on the product tapes. Guidelines for the use of SFDU headers are found in Applicable Document [2]. To conform with the convention adopted by other Magellan data products, all length fields in SFDU labels will be recorded as 8-byte ASCII values. 4.2.2. Data Blocking ANSI standard data tapes contain header and trailer labels. These consist of a series of 80-byte physical records, ending in single tape marks. The format is described in Applicable Document [1]. The following applies to the data portions of all ANSI files on the GxDR tapes, not to the ANSI labels. 4.2.3. Block Length GxDR data files are a series of images stored in the VICAR format, as described in applicable document [7]. The physical record length of these image files shall be 16,384 bytes, except for the last block of each file, which may be shorter. +-------------------------------------------------------------------+ | Table 4-2. Order of Files on GTDR Product Tapes | +-----+---------------------+---------------------+-----------+-----+ | Seq | Description | Image Projection | Size | Sec | +-----+---------------------+---------------------+-----------+-----+ | 1 | Volume Header File | | varies | 5.2 | | 2 | Frame Header | Sinusoidal | 128x1024 | 5.3 | | 3 | Framelet #1 | . | 1024x1024 | 5.4 | | . | . | . | . | . | | 34 | Framelet #32 | . | 1024x1024 | 5.4 | | 35 | Frame Header | Polar Stereographic | 128x1024 | 5.3 | | 36 | Framelet #1 | (North) | 1024x1024 | 5.4 | | . | . | . | . | . | | 39 | Framelet #4 | . | 1024x1024 | 5.4 | | 40 | Frame Header | Polar Stereographic | 128x1024 | 5.3 | | 41 | Framelet #1 | (South) | 1024x1024 | 5.4 | | . | . | . | . | . | | 44 | Framelet #4 | . | 1024x1024 | 5.4 | | 45 | Frame Header | Mercator | 128x1024 | 5.3 | | 46 | Framelet #1 | . | 1024x1024 | 5.4 | | . | . | . | . | . | | 77 | Framelet #32 | . | 1024x1024 | 5.4 | | 78 | Frame Header | Sinusoidal | 128x1024 | 5.3 | | 79 | Framelet #1 | (Radius Errors) | 1024x1024 | 5.4 | | . | . | . | . | . | | 110 | Framelet #32 | . | 1024x1024 | 5.4 | | 111 | Volume Trailer File | | Varies | 5.5 | +-----+---------------------+---------------------+-----------+-----+ ________________________________________________________________________ 5. GxDR Data Block Format Descriptions 5.1. ANSI and SFDU Label Structures The physical tape volume starts with an ANSI standard 'VOL' label, and ends with a 'EOF' label. All data files start with 'HDR1' and 'HDR2' labels, and end with 'EOF1' and 'EOF2' labels. Depending on details of the computer system that reads the tapes, these labels may be sensed as additional physical files, or may be completely hidden from the user. Refer to Applicable Document [1] for details. The ANSI labels contain ASCII character-string fields reserved for user-specific information. The following three sections define the contents of those fields that contain special GxDR values. The remainder are defined in Applicable Document [1]. Within the ANSI labels, the volume header and trailer files contain a series of Standard Formatted Data Units (SFDU's). Each SFDU begins with a 12-byte type header, followed by an 8-byte length indicator, and a varying-length value field. For the details and philosophy of SFDU's, consult Applicable Document [2]. The GxDR uses several SFDU types: Primary Label A string beginning 'CCSD1Z', identifying the data as obeying the conventions of the CCSDS authority. Catalog/Keyword Label A string beginning 'NJPL1K' that further identifies each data file by a series of simple 'KEYWORD=VALUE' statements. Aggregation Marker A pair of strings beginning 'CCSD1R' that sandwiches collections of data whose length is otherwise undefined. 5.1.1. ANSI Volume Header and Trailer +------------------------------------------------------------------+ | Table 5-1. GxDR-specific ANSI 'VOL1' and 'EOV1' Label Fields | +--------+--------+------+-------------+---------------------------+ | Offset | Length | Type | Name | Description | +--------+--------+------+-------------+---------------------------+ | +5 | 6 | char | volume_id | Tape volume serial number | | +38 | 17 | char | owner_id | Name of volume "owner" | +--------+--------+------+-------------+---------------------------+ * volume_id The volume serial number, a unique 6-character string, 'Gxnnnn' where 'x' is the product code as described in section 2.3.2, and 'nnnn' is a sequence number, initially '0001', that is incremented by 1 for each distinct generation of a product tape of this type. For the GREDR, the sequence number is only 3 digits long. For test tapes, the volume serial number is 'GxTnnn' where 'nnn' is a sequence number, initially '001', that is incremented by 1 for each distinct generation of a test tape of this type. For the GREDR, the sequence number is only 3 digits long. * owner_id Set permanently to 'MIT_MGN_A_AND_R' (with 2 trailing blanks). 5.1.2. ANSI File Header/Trailer HDR1/EOF1 Field Identifier Codes +------------------------------------------------------------------+ | Table 5-2. GxDR-specific ANSI 'HDR1' and 'EOF1' Label Fields | +--------+--------+------+-------------+---------------------------+ | Offset | Length | Type | Name | Description | +--------+--------+------+-------------+---------------------------+ | +5 | 17 | char | file_id | Tape file identifier code | +--------+--------+------+-------------+---------------------------+ * file_id The ANSI file name, a 17-character string, padded on the right with blanks, with the values for each data file as shown in the third column of table 5-4. 'x' is the one- or two-character product code as defined in section 2.3.2, and 'n' is an image sequence number that is '1' for the first image on the product tape, '2' for the second, etc. 'mm' is a framelet sequence number that is '01' for the first framelet of the particular image on the product tape, '02' for the second, etc. 5.1.3. ANSI Header/Trailer HDR2/EOF2 Fields +------------------------------------------------------------------+ | Table 5-3. GxDR-specific ANSI 'HDR2' and 'EOF2' Label Fields | +--------+--------+------+-------------+---------------------------+ | Offset | Length | Type | Name | Description | +--------+--------+------+-------------+---------------------------+ | +5 | 1 | char | file_format | Tape file format code | | +6 | 5 | num | block_size | Physical record length | | +11 | 5 | num | record_size | Logical record length | +--------+--------+------+-------------+---------------------------+ * file_format The ANSI file format code, always 'F' to indicate that all data records are of fixed length. * block_size The physical length of the tape blocks, in bytes. The number is written in ASCII characters, right justified with leading zeros. Since the file_format field is 'F' for all GxDR files, all tape blocks, except possibly the last of each file, must be of this length. * record_size The logical record length of the tape file, in bytes. The number is written in ASCII characters, right justified with leading zeros. Since the file_format field is 'F' for all GxDR files, the length of all tape blocks must be a multiple of this value. +------------------------------------------------------------------------+ | Table 5-4. MIT A&R Global Data File Nomenclature | +-----------------+--------+-------------------+-------------------------+ | GxDR Product | MIT | Name in ANSI | Data_Object or Product | | File Name | abbrev | Header/Trailer | Type SFDU Keyword Value | +-----------------+--------+-------------------+-------------------------+ | Volume Header | VHF | 'VOLUME-HEADER' | 'GTDR', 'GSDR'. etc. | | Frame Header | FHF | 'FRAME-HEADER-xn' | | | Sub-Frame File | SFF | 'SUBFRAME-xn-nn' | | | Volume Trailer | VTF | 'VOLUME-TRAILER' | | +-----------------+--------+-------------------+-------------------------+ 5.1.4. Catalog Keyword Labels The SFDU catalog keyword label is made up of a set of fields that completely identify each file according to its type, content, origin, and version. In addition, the label contains time tags identifying the time and date on which the data were created. The value of the catalog keyword label is an ASCII string comprising several keyword/value pairs. Alphanumeric characters are always in UPPERCASE. Underscore characters (0x5f) are used between words--no "white spaces"--such as space (0x20), nul (0x0), or tab (0x9) are permitted. All numeric fields are of fixed length, and unused leading digit positions must be filled with ASCII zero ('0') characters. Catalog keyword headers will always contain an even number of bytes. To accomplish this, an ASCII blank (0x20) may be added before the last carriage return and line feed. This will cause succeeding data to line up on even byte boundaries. The "keyword=value" syntax used in GxDR keyword labels is a subset of the "Object Definition Language" (ODL) used by the Planetary Data System Project. It is discussed in more detail in Applicable Document [10]. Each keyword/value pair is separated by an equals sign, and terminated by a carriage return (0xd) followed by a line feed (0xa), which are not shown in the following figures. Figure 5-1 shows the parameters that will appear in all GxDR keyword fields. 5.2. Volume Header File Each GxDR product tape begins with a Volume Header File (VHF), a set of SFDU volume descriptors and catalog keywords. It identifies the number and sequence of images on this multi-image product. +---------------------------------------------------------------+ | Figure 5-1. MIT Volume Header File (VHF) Format | +---+--------------------------------------------+--------------+ | T | CCSD1Z000001 | CCSD label | +---+--------------------------------------------+--------------+ | L | 00000xxx | length | +---+---+----------------------------------------+--------------+ | . | T | NJPL1K00KL00 | Keywd label | +---+---+----------------------------------------+--------------+ | . | L | 00000xxx | length | +---+---+----------------------------------------+--------------+ | . | . | DATA_SET_NAME=GxDR.c.v | | | . | . | DATA_OBJECT_TYPE=GxDR | | | . | . | PRODUCT_SEQUENCE_NUMBER=nnnnn | | | . | V | MISSION_ID=4 | | | . | A | MISSION_NAME=MAGELLAN | Keywords | | . | L | SPACECRAFT_ID=18 | and | | . | U | SPACECRAFT_NAME=MAGELLAN | Values | | . | E | PROCESS_TIME=yyyy-mm-ddThh:mm:ss.fff | | | . | . | FIRST_ORBIT_NUMBER=nnnnn | | | . | . | LAST_ORBIT_NUMBER=nnnnn | | | . | . | HARDWARE_VERSION_ID=nn | | | . | . | SOFTWARE_VERSION_ID=nn | | | . | . | DATA_FORMAT_TYPE=VAX | | +---+---+----------------------------------------+--------------+ | . | T | CCSD1R000003 | Start marker | +---+---+----------------------------------------+--------------+ | . | L | 000000xx | length | +---+---+----------------------------------------+--------------+ | . | V | DELIMITER=SMARKER | Start value | | . | . | PRODUCT_NAME=GxDR | | +---+---+----------------------------------------+--------------+ * CCSDS Label 'CCSD1Z000001', the CCSDS primary SFDU label. * Length Eight bytes, ASCII, with leading zeroes mandatory; the length of the remainder of the Volume Header File. * Keyword Label 'NJPL1K00KL00', the SFDU Catalog/Keyword label, where '1' indicates that an ASCII length field follows. The 'KL00' sub-field indicates that the keywords follow ODL syntax. * Length Eight bytes, ASCII, with leading zeroes mandatory; the length of the keyword/value field, including two bytes per keyword/value pair for the (unillustrated) carriage return and line feed, and a possible trailing blank if required to make this length an even number. * DATA_SET_NAME= 'GxDR.c.v', the external volume identifier of the tape product that contains this file. See section 2.3.2. for details. Note that the trailing ';' has been changed to '.' to conform with ODL conventions. * DATA_OBJECT_TYPE= A character string denoting the kind of global product 'GTDR' - Global Topography Data Record 'GSDR' - Global (rms) Slope Data Record 'GREDR' - Global Reflectivity Data Record 'GEDR' - Global Emissivity Data Record * PRODUCT_SEQUENCE_NUMBER= A 5-character numeric string, with leading zeroes, that is incremented by 1 for each GxDR product. The first will be numbered '00001'. GxDR products with identical sequence numbers can be assumed to be identical. * MISSION_ID= The single character '4'. * MISSION_NAME= The character string 'MAGELLAN'. * SPACECRAFT_ID= For real data, the 2-digit number '18'. For simulated data, the number '28'. * SPACECRAFT_NAME= The character string 'MAGELLAN'. * PROCESS_TIME= The local EST or EDT time at which the product tape was written by the MIT A&R processing system. * FIRST_ORBIT_NUMBER= The number of the first orbit that contributed data to this product. * LAST_ORBIT_NUMBER= The number of the last orbit that contributed data to this product. * HARDWARE_VERSION_ID= A 2-digit number, 'nn', identifying the hardware version number of the MIT A&R data processing system used to create this file or volume. * SOFTWARE_VERSION_ID= A 2-digit number, 'nn', identifying the software version number of the MIT A&R data processing system used to create this file or volume. * DATA_FORMAT_TYPE= Either 'VAX' or 'IEEE', depending on the format in which binary fields are represented in the data records. For all GxDR products sent to DMAT, this will be 'VAX'. The value is only significant for the GTDR and GEDR products, in which the format of 2-byte integer pixels will differ. * Start Marker 'CCSD1R000003', the SFDU Aggregate Marker label, indicating the start of a data aggregate of unspecified length. This aggregate consists of the remainder of the product, and is matched by an ending marker in the Volume Trailer File. * Length Eight bytes, ASCII, with leading zeroes mandatory; the length of the remainder of the aggregate marker SFDU. * DELIMITER= The character string 'SMARKER', indicating that this is the start of a data aggregate. * PRODUCT_NAME= The character string 'GxDR' (see DATA_OBJECT_TYPE). 5.3. VICAR Frame Header File The file format is described in appendix B. The label of this file describes the aggregate of image sub-frames that follow. It spans one or more physical records containing a series of ASCII strings consisting of "keyword=value" items. Label keywords, described in appendix C, are limited to 8 characters. Figure 5-2 shows a typical GxDR frame header label. +--------------------------------------------------------------+ | Figure 5-2. MIT Frame Header File (FHF) Label Format | +--------------------------------------------------------------+ | The VICAR label always starts with the LBLSIZE keyword; the | | TASK='MGMMAP' keyword separates the "system" section which | | defines the physical image format from the "history" section | | which supplies additional information. Within each section, | | remaining keywords may be in any order. | +--------------------------------------------------------------+ | | | LBLSIZE=nnnn HOST='UNIX' N4=0 NS=1024 | | BUFSIZ=16384 INTFMT='LOW' NB=1 ORG='BSQ' | | DIM=3 N1=128 NBB=0 REALFMT='VAX' | | EOL=0 N2=1024 NL=128 RECSIZE=1024 | | FORMAT='BYTE' N3=1 NLB=0 TYPE='IMAGE' | | | | TASK='MGMMAP' | | ANALYST='Doe,John' M_SPDN_6='MISSING DATA' | | DAT_TIM='cccccccccc' MAP_PROJ='cccccccccc' | | DN_UNITS='cccc' N_SPDN=6 | | FILE=1 PIXSIZ=4641 | | FILETYPE='GxDR FRAME HEADER' PRODTYPE='GxDR' | | HI_DN=250 PRODUCT='GxDR.c;v' | | HI_REP=nnn.nnn PROJ_LON=nnn.nnn | | IMAGE='cccccccccc' PROJSAMP=nnnn | | LAT_UC=nnn.nnn REV_END=nnnn | | LAT_LC=nnn.nnn REV_STRT=nnnn | | LON_CL=nnn.nnn SPDN_1=0 | | LON_CR=nnn.nnn SPDN_2=251 | | LOW_DN=1 SPDN_3=252 | | LOW_REP=nnn.nnn SPDN_4=253 | | M_SPDN_1='MISSING DATA' SPDN_5=254 | | M_SPDN_1='OUTSIDE IMAGE' SPDN_6=255 | | M_SPDN_2='UNASSIGNED' SPECLINE=nnnn | | M_SPDN_3='UNASSIGNED' SPECSAMP=nnnn | | M_SPDN_4='UNASSIGNED' SUBF_TOT=nn | | M_SPDN_5='UNASSIGNED' USER=cccc | | | +--------------------------------------------------------------+ The remainder of the frame header file consists of an array of 128x1024 pixels. Each pixel occupies one byte. The array is divided into a pair of 64x1024 grey wedges. Each wedge is made up of 128 grey level chips, each 8 pixels wide. The first wedge consists of grey level chips monotonically increasing by 1 DN beginning from a DN level of 0 and increasing to 127. The second wedge consists of grey level chips monotonically decreasing by 1 DN from left to right beginning from a DN level of 255 and decreasing to 128. Algebraically, if the array is written A(x,y), with 0 <= x <= 1023 and 0 <= y <= 127, the DN values are given by A(x,y) = x/8 (y < 64) = 255-(x/8) (y >= 64) When recorded on magnetic tape, A(x+1,y) immediately follows A(x,y), and all A(x,y+1) follow all A(x,y). +--------------------------------------------------------------+ | Figure 5-3. MIT Sub-Frame File (SFF) Label Format | +--------------------------------------------------------------+ | The VICAR label always starts with the LBLSIZE keyword; the | | TASK='MGMMAP' keyword separates the "system" section which | | defines the physical image format from the "history~ section | | which supplies additional information. Within each section, | | remaining keywords may be in any order. LAT_UC, LAT_LC, | | LON_CL and LON_CR are absent from some sinusoidal sub-frames.| +--------------------------------------------------------------+ | | | LBLSIZE=nnnn HOST='UNIX' N4=0 NS=1024 | | BUFSIZ=16384 INTFMT='LOW' NB=1 ORG='BSQ' | | DIM=3 N1=1024 NBB=0 REALFMT='VAX' | | EOL=0 N2=1024 NL=1024 RECSIZE=1024 | | FORMAT='BYTE' N3=1 NLB=0 TYPE='IMAGE' | | | | TASK='MGMMAP' MAP_PROJ='cccccccccc' | | ANALYST='Doe,John' N_SPDN=6 | | DAT_TIM='cccccccccc' PIXSIZ=4641 | | DN_UNITS='cccc' PRODTYPE='GxDR' | | FILE=nn PRODUCT='GxDR.c;v' | | FILETYPE='GxDR SUBFRAME' PROJ_LON=nnn.nnn | | HI_DN=250 PROJSAMP=nnnn | | HI_REP=nnn.nnn REV_END=nnnn | | IMAGE='cccccccccc' REV_STRT=nnnn | | LAT_UC=nnn.nnn SPDN_1=0 | | LAT_LC=nnn.nnn SPDN_2=251 | | LON_CL=nnn.nnn SPDN_3=252 | | LON_CR=nnn.nnn SPDN_4=253 | | LOW_DN=1 SPDN_5=254 | | LOW_REP=nnn.nnn SPDN_6=255 | | M_SPDN_1='MISSING DATA' SPECLINE=nnnn | | M_SPDN_1='OUTSIDE IMAGE' SPECSAMP=nnnn | | M_SPDN_2='UNASSIGNED' SUBF_COL=n | | M_SPDN_3='UNASSIGNED' SUBF_ROW=n | | M_SPDN_4='UNASSIGNED' SUBF_TOT=nn | | M_SPDN_5='UNASSIGNED' SUBFRAME=nn | | M_SPDN_6='MISSING DATA' USER=cccc | | | +--------------------------------------------------------------+ 5.4. VICAR Sub-Frame File The file format is described in appendix B. The label of each sub-frame file describes the single image sub-frame file that follows. It spans one or more physical records containing a series of ASCII strings consisting of "keyword=value" items. Label keywords, described in appendix C, are limited to 8 characters. Some define characteristics of this sub-frame, while others are global values. Figure 5-3 shows a typical GxDR sub-frame label. The label is followed by a VICAR image sub-frame consisting of a 1024x1024 pixel image of the particular altimetric or radiometric data, as described in table 5-5. Each sub-frame represents a portion of a larger image of Venus, in three successive projections, as described in the following sections in terms of a sample address (x) varying from 0 (left) to 1023 (right), and a line address (y) varying from 0 (top) to 1023 (bottom). The first pixel in each framelet has x=0, y=0, the next has x=1, y=0, and so forth. 5.4.1. Sinusoidal Projection The image is in the sinusoidal projection centered on the longitude which bisects the total image area (specified by the 'PROJ_LON' value in the image label). Near the Venus poles, the sub-frames will be partially devoid of pixels as a consequence of this projection; pixels of value zero (0x0) will be used for the regions outside of the map area. The first image line is the northernmost in the image and the first pixel in each line is the westernmost in the line. The transformation between longitude/latitude (lat,lon in radians) and sub-frame pixel address (x,y) is given by x = PROJSAMP+d*(lon-PROJ_LON)*cos(lat)-0.5 y = SPECLINE-d*lat-0.5 where d is a scaling factor equal to 6051000/PIXSIZ, and PROJSAMP, SPECLINE, PROJ_LON, and PIXSIZ are the values of the corresponding VICAR label keywords. The data in this projection come from the ARCDR data product, and have been resampled on a sinusoidal 4.641x4.641 km grid. Small inter-orbit gaps have been filled by gaussian convolution, but no other image enhancements have been applied, as described in applicable document [4]. 5.4.2. Polar Stereographic Projection The image is in the polar stereographic projection, centered on either the North or South pole of Venus, with the central longitude (specified by the 'PROJ_LON' value in the image label) running vertically from the pole to the bottom of the image. The transformation between longitude/latitude (lat,lon in radians) and sub-frame pixel address (x,y) is given by x = PROJSAMP+2*d*sin(lon-PROJ_LON)*tan(pi/4-lat/2)-0.5 y = SPECLINE+2*d*cos(lon-PROJ_LON)*tan(pi/4-lat/2)-0.5 for North Polar images, and by x = PROJSAMP+2*d*sin(lon-PROJ_LON)*tan(pi/4+lat/2)-0.5 y = SPECLINE-2*d*cos(lon-PROJ_LON)*tan(pi/4+lat/2)-0.5 for South Polar images, where d is a scaling factor equal to 6051000/PIXSIZ, and PROJSAMP, SPECLINE, PROJ_LON, and PIXSIZ are the values of the corresponding VICAR label keywords. The data in this projection come from the ARCDR data product, and have been resampled on a stereographic grid whose dimension is 4.641x4.641 km at the Venus pole. Small inter-orbit gaps have been filled by gaussian convolution, and image enhancements have been applied to remove systematic errors, as described in applicable document [4]. 5.4.3. Mercator Projection The image is in the Mercator projection. The first image line is the northernmost in the image and the first pixel in each line is the westernmost in the line. The transformation between longitude/latitude (lat,lon in radians) and sub-frame pixel address (x,y) is given by x = PROJSAMP+d*(lon-PROJ_LON)-0.5 y = SPECLINE-d*log(tan(pi/4+lat/2)-0.5 where d is a scaling factor equal to 6051000/PIXSIZ, and PROJSAMP, SPECLINE, PROJ_LON, and PIXSIZ are the values of the corresponding VICAR label keywords. The data in this projection come from the ARCDR data product, and have been resampled on a Mercator grid whose dimension is 4.641x4.641 km at the Venus equator. Small inter-orbit gaps have been filled by gaussian convolution, and other image enhancements have been applied to remove systematic errors, as described in applicable document [4]. 5.4.4. Pixel Values The integer pixel values (DN) represent a range of physical surface parameter values. In addition, a small set of DN values is "reserved", i.e. those pixels are representing something other than surface parameters, e.g. "missing data", implying that the data potentially exists, but not in this product, "no data", meaning that this pixel lies outside the dimensions of the projection, etc. The reserved values are listed in the VICAR header variables M_SPDN_x (see appendix C). The mapping between the remaining DN values and surface parameters is shown in table 5-6. Thus, to convert a given DN to its corresponding parameter value, multiply it by the value shown in column 6 (DN Increment) of that table, and add the value in column 5 (DN Value). +-------------------------------------------------------------------+ | Table 5-5. MIT A&R Global Image Projections | +---------------------------+-----------+-------------+------+------+ | Image | Latitude | Longitude |Frames|Frames| | Projection | Limits | Limits |Across| Down | +---------------------------+-----------+-------------+------+------+ | Sinusoidal | 90N - 90S | 180E - 180E | 8 | 4 | | North Polar Stereographic | 44N - 90N | 0E - 360E | 2 | 2 | | South Polar Stereographic | 44S - 90S | 0E - 360E | 2 | 2 | | Mercator | 69N - 69S | 240E - 240E | 8 | 4 | +---------------------------+-----------+-------------+------+------+ +-------------------------------------------------------------------+ | Table 5-6. MIT A&R Global Image Pixel Data Values | +-------+------------------------+------+--------+--------+---------+ |Product| Surface Parameter |Bytes/| DN | DN | DN | | | |pixel | units | origin |increment| +-------+------------------------+------+--------+--------+---------+ | GTDR | Planetary Radius | 2 | meter | 6040km | 1 meter | | | Estimated Radius Error | 1 | meter | 0 | 5 meter | | GSDR | Meter-Scale Slope | 1 | degree | 0 | 0.1 | | GREDR | Fresnel Reflectivity | 1 | none | 0 | 0.005 | | GEDR | Microwave Emissivity | 2 | none | 0 | 0.0001 | +-------+------------------------+------+--------+--------+---------+ 5.5. Volume Trailer File +-------------------------------------------------------------------+ | Figure 5-4. MIT Volume Trailer File (VTF) Format | +---+------------------------------------------------+--------------+ | T | CCSD1Z000001 | CCSD label | +---+------------------------------------------------+--------------+ | L | 00000xxx | length | +---+---+--------------------------------------------+--------------+ | . | T | CCSD1R000003 | End marker | +---+---+--------------------------------------------+--------------+ | . | L | 00000xxx | length | +---+---+--------------------------------------------+--------------+ | . | V | DELIMITER=EMARKER | End value | | . | . | PRODUCT_NAME=GxDR | | +---+---+--------------------------------------------+--------------+ * CCSDS Label 'CCSD1Z000001', the CCSDS primary SFDU label.. * Length Eight bytes, ASCII, with leading zeroes mandatory; the length of the remainder of the trailer file. * End Marker 'CCSD1R000003', the SFDU Aggregate Marker label, indicating the end of a data aggregate of unspecified length. This matches the Aggregate Marker in the Volume Header File. * Length Eight bytes, ASCII, with leading zeroes mandatory; the length of the remainder of the aggregate marker SFDU. * DELIMITER= The character string 'EMARKER', indicating that this is the end of a data aggregate. * PRODUCT_NAME= The character string 'GxDR'. ________________________________________________________________________ Appendix A. The VICAR Image File A.1. Physical Representation A VICAR image file is stored as a series of fixed length logical records in a one to one correspondence to the raster lines of the digital image contained therein. On tape, these logical records are blocked into physical records (using the standard ANSI protocol) to reduce the length of tape required to store the image file. For the global image products that are produced by MIT for the Magellan project, either eight (8) or sixteen (16) image lines (logical records) will be blocked into each physical tape record, according to the VICAR format definitions in applicable document [6]. Thus the physical tape record size will be 16384 bytes, but the last physical record of each file may be shorter. All information about the tape blocking is stored in the ANSI labels as outlined in Applicable Document [1]. Throughout the following description, the term record should be understood to mean a logical record as described above. A.2. Logical Content A.2.1. Image Label The first N records of the VICAR file contain the image label which consists of a sequence of ASCII strings of the form "keyword=value", delimited by one or more spaces (0x20). Any excess bytes following these are filled with nulls (0x0). The length of the label, and of the image that follows it, is determined by the values of the following keywords: FORMAT defines the number of bytes in each image pixel. For MIT products, it will be 'BYTE' for those whose pixels are one byte in length (i.e. the GSDR and GREDR), and 'HALF' for those with two bytes per pixel (i.e. the GTDR and the GEDR). NS defines the number of pixels in each image line, and hence in each logical record. The number of bytes in each logical record is therefore NS when FORMAT=BYTE and 2*NS when FORMAT=HALF. LBLSIZE defines the number of bytes in the label, and is always an integral multiple of the record length. Thus, N (above) is LBLSIZE/NS when FORMAT=BYTE and it is LBLSIZE/(2*NS) when FORMAT=HALF. NL defines the number of image lines in the frame or sub-frame. The total number of bytes in the file is therefore LBLSIZE+NL*NS when FORMAT=BYTE and it is LBLSIZE+2*NL*NS when FORMAT=HALF. A.2.2. Keywords Keywords consist of eight (8) or fewer characters drawn from the set of uppercase alphabetic characters, numerals, and the underscore (0x5f). Keywords are unique within a single image label. A.2.3. Reserved Keywords Certain keywords are reserved by the VICAR system for its own use in maintaining the image files. These include LBLSIZE, FORMAT, NL, and NS, described above. Others, while not strictly required according to applicable documents [6] and [7], are necessary for the correct execution of certain common VICAR commands. A.2.4. Other Keywords The definitions of keywords used in the MIT Magellan global products are in appendix B. A.2.5. Values The value field may be occupied by an integer, a string, or a real number. Integers may be signed. Strings begin and end with single quotes and may contain any ASCII characters except carriage returns, new lines, or single quotes. Real numbers, which are intended to be read by Fortran programs under type-D or type-G format control, are represented as follows: {+-}n[nnn][{.}[nnn]][{DEde}{+-}{n}{n}] where n represents a decimal digit 0-9, {} indicates a single optional character and delimits the possible candidates, and [] delimits zero or more optional items. A.2.6. Image Data For MIT Magellan global products, the image data is stored as one- or two-byte pixels with NS or 2*NS pixels per line (logical record) and NL lines per image. In Sinusoidal and Mercator projections, the first pixel in an image file is the northwesternmost pixel in the image. ________________________________________________________________________ Appendix B. A Glossary of VICAR Label Keywords (Keyword data type code: I=integer; C=character; R=real) ANALYST= Name of the analyst who is responsible for generating the product. (C) BUFSIZ= The length in bytes of each physical block of the VICAR file. For GxDR images, this will always have the value 16384. (I) DAT_TIM= The date and time that the image was created. The string contains 24 bytes and the format is be represented as 'ddd mmm dd hh:mm:ss yyyy', e.g. 'Mon Jan 11 21:51:55 1990'. The 'dd' field is right-justified with blank fill; the other integer fields are right-justified with zero fill. (C) DN_UNITS= Units of physical parameter represented by the pixels, specifically (C) Product Units Description GTDR METERS Planetary Radius and Radius Error GSDR DEGREES RMS meter-scale Surface Slope GREDR NONE Fractional Fresnel Reflectivity GEDR NONE Fractional Emissivity FILE= The file number within the frame. The frame header is always FILE=1. (I) FILETYPE= The file contents, 'GxDR FRAME HEADER' or 'GxDR SUBFRAME'. (C) FORMAT= The size of each pixel, i.e. 'BYTE' for one byte per pixel (GSDR and GREDR) and 'HALF' for two bytes per pixel (GTDR and GEDR). (C) HI_DN= Data number corresponding to the highest intensity found in the image. DN's greater than HI_DN have special interpretations. (I) HI_REP= Quantity of DN_UNITS represented by the HI_DN value. (R) IMAGE= The image represented in this file, specifically (C) Product 'IMAGE=' value Any 'TEST IMAGE' GTDR 'PLANETARY RADIUS' GSDR 'RMS METER-SCALE SLOPE' GREDR 'FRESNEL REFLECTIVITY' GEDR 'MICROWAVE EMISSIVITY' LAT_UC= The body-fixed latitude of the central sample of the first image line, in degrees. (R) NOTE: If the central line or sample of the frame or framelet falls outside the projection domain, this keyword will be omitted. This situation will only occur for images in the sinusoidal projection. If the image contains an even number of lines or samples, the "central" latitude or longitude will be the average of the two central lines and/or samples. LAT_LC= The body-fixed latitude of the central sample of the last image line, in degrees. (see above note) (R) LBLSIZE= The number of bytes at the beginning of the frame or sub-frame file that is reserved for the header. The value must be a multiple of the logical record length, which is itself either equal to NS (if FORMAT=BYTE) or to 2*NS (if FORMAT=HALF). (I) LON_CL= The body-fixed longitude of the first pixel in the central line, in degrees. (see above note) (R) LON_CR= The body-fixed longitude of the last pixel in the central line, in degrees. (see above note) (R) LOW_DN= The data number corresponding to the lowest intensity found in the image. DN's less than LOW_DN have special interpretations. (I) LOW_REP= Quantity of DN_UNITS represented by the LOW_DN value. (R) MAP_PROJ= The type of map projection, either 'SINUSOIDAL', 'MERCATOR', or 'STEREOGRAPHIC'. (C) M_SPDN_x= Interpretation of the special data number x (see SPDN_x keyword below), used to denote missing data. (C) NB= The number of bands in this image. For GxDR images, this is always 1. (I) NL= The number of lines in this frame header or sub-frame. (I) NS= The number of samples in this frame header or sub-frame. (I) N_SPDN= The number of reserved data numbers designated by the M_SPDN_x and SPDN_x keywords. (I) PIXSIZ= Pixel spacing on the planet in meters. For polar stereographic projections, this is the pixel dimension at the poles. For Mercator projections, it is the pixel dimension at the equator. For MIT GxDR products, this spacing is 4641.0587 meters, so chosen that, assuming a radius of 6051.0 km, the equator is divided into exactly 8192 pixels. (I) PRODUCT= Name of the data product, in the DMAS specified external label format, as detailed in section 2.3.2. (C) PROJ_LON= Body-fixed longitude, in degrees, of the meridian passing through the center of the GxDR image frame. This is used as the reference meridian for sinusoidally projected images. For North Polar Stereographic images, it is the meridian that descends vertically from the pole to the bottom of the image. For South Polar Stereographic images, it is the meridian that ascends vertically from the pole to the top of the image. (R) PROJSAMP= The image frame sample number nearest the global coordinate origin. For sinusoidal and Mercator projections, the origin is the intersection of the reference meridian PROJ_LON with the equator. For polar stereographic projections, the origin is the pole itself. (I) RECSIZE= The number of bytes that will be read by a VICAR default-length input request. For GxDR files, this will always be equal to the value of NS multiplied by the length of each pixel. (I) REV_END= The highest orbital revolution number from which the image data for the frame is derived. All sub-frames will contain the same value of REV_END. (I) REV_STRT= The lowest orbital revolution number from which the image data for the frame is derived. All sub-frames will contain the same value of REV_STRT. (I) SPDN_x= The DN value reserved for special data number x, c.f. M_SPDN_x and N_SPDN. (I) SPECLINE= The image frame line number nearest the global coordinate origin. For sinusoidal and Mercator projections, the origin is the intersection of the reference meridian PROJ_LON with the equator. (SPECLINE is therefore positive for sub-frames above the equator, negative for those below. For polar stereographic projections, the origin is the pole itself. (I) SPECSAMP= The number of samples from the prime meridian to the projection longitude of the frame, measured along the equator in the positive longitude direction. This keyword is not applicable to polar stereographic projections, and is therefore set to zero. (I) SUBF_COL= The column number from which a sub-frame was taken. 1 < SUBF_COL <= n, where n depends on the projection type. It is 8 for sinusoidal and Mercator, and 2 for polar stereographic. (I) SUBF_ROW= Row number from which a sub-frame was taken. 1 < SUBF_ROW <= n, where n depends on the projection type. It is 4 for sinusoidal and Mercator, and 2 for polar stereographic. (I) SUBF_TOT= The total number of sub-frames in an image frame. The value depends on the projection type. It is 32 for sinusoidal and Mercator, and 4 for polar stereographic. (I) TASK= The name of the program that created the VICAR image or framelet--for GxDR files, this will always have the value 'MGMMAP'. This keyword marks the end of the VICAR "system" label. All keywords after this belong to the "history" label. (C) USER= An identifier, taken from the user id of the user that invoked the program that created the GxDR file. (C)