PDS_VERSION_ID = PDS3 RECORD_TYPE = STREAM OBJECT = TEXT INTERCHANGE_FORMAT = ASCII PUBLICATION_DATE = 2007-04-20 NOTE = "Mars Reconnaissance Orbiter Project, MARCI EDR Data Product SIS in ASCII format." END_OBJECT = TEXT END Mars Reconnaissance Orbiter Software Interface Specification Mars Color Imager (MARCI) Standard Data Product M. Caplinger Malin Space Science Systems, Inc. Approved by: _________________________ M. Malin, President _________________________ L. Gaddis, PDS Imaging Node Manager _________________________ E. Grayzeck, PDS Program Manager April 2007 (formatted April 20, 2007) Contents 1. Introduction ...................................... 1 1.1. Purpose ........................................ 1 1.2. Scope .......................................... 1 1.3. Applicable Documents ........................... 1 1.4. Functional Description ......................... 1 1.4.1. Data Content Summary ........................ 1 1.4.2. Source and Transfer Method .................. 1 1.4.3. Recipients and Utilization .................. 2 1.5. Assumptions and Constraints .................... 2 2. Environment ....................................... 2 2.1. Instrument Overview ............................ 3 2.2. Failure Protection, Detection, and Recovery .... 3 2.3. End-of-File Conventions ........................ 3 3. Access ............................................ 3 3.1. Access Tools ................................... 3 3.2. Input/Output Protocols ......................... 4 3.3. Timing and Sequencing Characteristics .......... 4 4. Detailed Interface Specifications ................. 4 4.1. Labeling and Identification .................... 4 4.2. Structure and Organization Overview ............ 4 4.3. Substructure Definition and Format ............. 5 4.3.1. Header/Trailer Description Details .......... 9 4.3.2. Data Description Details .................... 9 4.3.3. Data loss considerations .................... 10 5. Appendix -- MARCI square root companding table .................................................. 11 April 2007 ii 1. Introduction 1.1. Purpose This document describes the format of the Mars Reconnais- sance Orbiter Context Camera (MARCI) Standard Data Product. 1.2. Scope The format and content specifications in this SIS apply to all phases of the project for which this product is avail- able. 1.3. Applicable Documents Mars Exploration Program Data Management Plan, R.E. Arvid- son, S. Slavney, and S. Nelson, Rev. 3.0, March 20, 2002. Mars Reconnaissance Orbiter Project Data Archive Generation, Validation, and Transfer Plan, MRO 31-468, JPL D-22246, Ver- sion 1.1, January 26, 2006. Planetary Data System Standards Reference, Version 3.6, JPL D-7669, Part 2, August 1, 2003. Planetary Science Data Dictionary Document, JPL D-7116, Rev. E, August 28, 2002. "Mars Color Imager (MARCI) on the Mars Climate Orbiter", Malin, M. C., J. F. Bell III, W. Calvin, R. T. Clancy, R. M. Haberle, P. B. James, S. W. Lee, P. C. Thomas, and M. A. Caplinger, Journal of Geophysical Research, v. 106, no. E8, pp. 17,651-17,672, 2001. 1.4. Functional Description 1.4.1. Data Content Summary Each MARCI Standard Data Product is a single image contained in either one or two files, in the raw image format as pro- duced by the instrument. The data have been depacketized, decompressed, and reformatted with standard labels, but are otherwise "raw"; that is, as received from the instrument. In that sense these products are most closely analogous to the Experiment Data Record (EDR) products of previous mis- sions. The processing level of this dataset is CODMAC level 2 (NASA level 0). 1.4.2. Source and Transfer Method MARCI products are produced at the MARCI Mission Operations Facility (MOF) by the `makepds05' program from the format internally used at the MOF. This program reads a raw MARCI April 2007 1 image file (in the internal "DDD" format), extracts some information from its headers, formats and attaches the PDS labels, and appends the image data. MARCI products are validated at the MOF through visual inspection of the images as well as automated verification of various elements of the image header (e.g., SPACECRAFT_CLOCK_START_COUNT, INTERFRAME_DELAY). It is expected that there will be two ways to receive MARCI products: by electronic file transfer from the Planetary Data System, and on some archival medium such as CD-ROM or DVD. MARCI is expected to return approximately 1.5 Tb over the course of a 26 Tb primary mission (see the MRO Project Data Archive Generation, Validation, and Transfer Plan). Volume returned varies as a function of the available data rate; see the Archive Policy and Data Management Plan for more details. 1.4.3. Recipients and Utilization These products will be available to MARCI team members, the MRO science community, the planetary science community, and other interested parties. Descriptions of data rights and proprietary periods are beyond the scope of this document, and are discussed in the Project Archive Policy and Data Transfer Plan, and in unique Operational Interface Agree- ments between the MARCI Science Team and other parties. These products will be used for engineering support, direct science analysis, or the construction of other science pro- ducts. 1.5. Assumptions and Constraints Note that this file contains decompressed image data. Decompression will result in a raw image that is not corrected for instrument signature, effects of spacecraft motion, or the effects of imaging geometry. Although there is enough information in the header to do some processing, for more sophisticated processing ancillary files will be required. These ancillary files are not described in this document. Examples of ancillary files are calibration files, viewing geometry files (e.g., SPICE kernels), image index tables, etc. 2. Environment April 2007 2 2.1. Instrument Overview MARCI is a framing camera with a 1024x1024 pixel interline transfer CCD (Kodak KAI-1001) with 9x9 micron pixels. MARCI has two all-refractive 180-degree "fisheye" lenses, one optimized for the visible and near-IR and one for the UV bands. The beams from these two lenses are brought to the CCD through a prism. A color filter array with seven dif- ferent bandpasses (five visible/near-IR and two UV) is directly bonded to the CCD. A typical image consists of seven "framelets", each 1024 pixels wide and 16 pixels high, in each of these bandpasses. The visible bands can be optionally summed; the UV bands are always summed 8x8. The visible resolution from 300 km is about 1 km/pixel at nadir. The core of the MARCI electronics is a Motorola 56166 DSP, which interfaces to the spacecraft, generates the CCD clocks, and received digitized pixels from an Analog Devices AD1672 analog-to-digital converter. Both lossless and lossy image data compression can be applied by software running in the spacecraft computer. MARCI was originally designed for the Mars Climate Orbiter mission. For MRO, a separate subsystem, the MARCI Interface Adapter or MIA, was designed and built to translate the MRO command/data protocol into a form that could be interpreted by the heritage MARCI hardware. 2.2. Failure Protection, Detection, and Recovery Instrument data from the Raw Science Data Server (RSDS) will be safed temporarily by the PDS Imaging Node until the end of the mission. These archives and depacketized compressed image data will be archived at the MARCI MOF. 2.3. End-of-File Conventions End-of-file labeling shall comply with SFDU standards; specifically, fixed-size records are used, the header expli- citly contains the record offset of each subelement of the dataset, and the size of each subelement can be computed from information in the header. 3. Access 3.1. Access Tools Existing PDS image display programs (e.g. NASAView) can display these files. April 2007 3 3.2. Input/Output Protocols None identified. 3.3. Timing and Sequencing Characteristics None. 4. Detailed Interface Specifications 4.1. Labeling and Identification The dataset ID is MRO-M-MARCI-2-EDR-L0-V1.0. Each product will have a file name of the form ".IMG", where the ID is not to exceed 27 characters, will start with an alphabetic character, and will consist only of alphanumeric characters. The file name will be unique across all MARCI data product files. For mapping-phase images, the ID will be of the form PPP_NNNNNN_TTTT_"M"X_"00N"BBB"W", where PPP is a mission phase descriptor, NNNNNN is the orbit number, TTTT is the solar longitude at image start (in units of 0.1 degree), X is the filter combination specifier for the image ("U" for ultraviolet and other letters for various combinations of the visible filters, see below), and BBB is the planned sub-spacecraft (west) longitude at ascending or descending equator crossing, whichever is closer to the image center time. Case is not significant; under the Unix operating system, the names will be considered to be in all lower- case. 4.2. Structure and Organization Overview All MARCI images must be a multiple of 16 pixels in both width and height. Images are broken up into subimages (also called fragments), and each fragment is transmitted separately. Raw and predictively compressed images are reconstructed by concatenating all of their image fragments and then processing; transform compressed images are pro- cessed a fragment at a time. A MARCI data product consists of one or two images (one each for visible and ultraviolet, as acquired) with decompression applied. For each image file, a header identifies various properties of the image and contains a file offset to the data portion of the image. The image data are then appended to the end of the file. PDS_VERSION_ID PDS3 FILE_NAME "filename" RECORD_TYPE FIXED_LENGTH April 2007 4 RECORD_BYTES nnnn FILE_RECORDS nn LABEL_RECORDS nn ^IMAGE nn SPACECRAFT_NAME MARS_RECONNAISSANCE_ORBITER INSTRUMENT_NAME "MARS COLOR IMAGER" INSTRUMENT_HOST_NAME "MARS RECONNAISSANCE ORBITER" MISSION_PHASE_NAME PSP TARGET_NAME MARS INSTRUMENT_ID MARCI PRODUCER_ID MRO_MARCI_TEAM DATA_SET_ID "MRO-M-MARCI-2-EDR-L0-V1.0" PRODUCT_CREATION_TIME yyyy-mm-ddThh:mm:ss.fff SOFTWARE_NAME "id-string" UPLOAD_ID "version-id" ORIGINAL_PRODUCT_ID "original-product-id" PRODUCT_ID "product-id" START_TIME yyyy-mm-ddThh:mm:ss.fff STOP_TIME yyyy-mm-ddThh:mm:ss.fff SPACECRAFT_CLOCK_START_COUNT "sclk-string" SPACECRAFT_CLOCK_STOP_COUNT "N/A" INTERFRAME_DELAY ff.fff FOCAL_PLANE_TEMPERATURE ff.fff SAMPLE_BIT_MODE_ID "mode-id" LINE_EXPOSURE_DURATION ff.fff SAMPLING_FACTOR ff.f SAMPLE_FIRST_PIXEL nn FILTER_NAME "filter-list" RATIONALE_DESC string DATA_QUALITY_DESC "OK" or "ERROR" ORBIT_NUMBER nnnnn OBJECT IMAGE LINES nnn LINE_SAMPLES nnn LINE_PREFIX_BYTES 0 LINE_SUFFIX_BYTES 0 SAMPLE_TYPE UNSIGNED_INTEGER SAMPLE_BITS 8 SAMPLE_BIT_MASK 2#11111111# CHECKSUM 16#xxxx# END_OBJECT IMAGE END 4.3. Substructure Definition and Format PDS_VERSION_ID The PDS version number for the header format; e.g., PDS3. FILE_NAME The file name for these products; see above. April 2007 5 RECORD_TYPE The record type; always FIXED_LENGTH for these pro- ducts. RECORD_BYTES The number of bytes per record. FILE_RECORDS The total number of records in this file. The last record will be padded with zeros if necessary. LABEL_RECORDS The number of records used for header data. If needed, the last record of the header will be padded with blanks. ^IMAGE A pointer to the starting record of the image object in the file. SPACECRAFT_NAME Always MARS_RECONNAISSANCE_ORBITER. INSTRUMENT_NAME Always "MARS COLOR IMAGER". INSTRUMENT_HOST_NAME Always "MARS RECONNAISSANCE ORBITER". MISSION_PHASE_NAME Name of the mission phase; e.g., PSP. TARGET_NAME The name of the target body; typically MARS. INSTRUMENT_ID Always MARCI. PRODUCER_ID Always MRO_MARCI_TEAM. DATA_SET_ID MRO-M-MARCI-2-EDR-L0-V1.0. PRODUCT_CREATION_TIME Time and date of this file's creation. Note that this time is the time of this file's creation in this for- mat, and does not reflect the acquisition time or the time of any other processing that may be associated with this product. SOFTWARE_NAME Identifier of the version of the MARCI Ground Data April 2007 6 System software that created this product. UPLOAD_ID Identifier of the command file used to acquire this image. ORIGINAL_PRODUCT_ID Product ID of this image received from the spacecraft. For example, "4A_05_1008803100". PRODUCT_ID This uniquely identifies this MARCI product among all MARCI products. The MARCI product ID format is PPP_NNNNNN_TTTT_"M"X_"00N"BBB"W", where PPP is a string describing the mission subphase, NNNNNN is the orbit number, TTTT is the solar longitude at image start (in units of 0.1 degree), X is the filter combination specifier ("A" for all five visible channels, "B" for blue/green/orange/near-IR, "C" for blue/green/orange, "D" for blue/green/orange/red, "U" for both ultra- violet), and BBB is the planned sub-spacecraft (west) longitude at ascending or descending equator crossing, whichever is closer to the image center time; e.g., "P01_001330_1322_MA_00N237W". For cruise phase (CRU) images, NNNNNN is a sequential image number. START_TIME SCET (UTC) time at start of image acquisition, as com- manded. This time will be the start time of the first frame of the MARCI image. STOP_TIME SCET (UTC) time at end of image acquisition, as com- manded. This time will be the start time of the last frame of the MARCI image. SPACECRAFT_CLOCK_START_COUNT Value of spacecraft clock at the actual start of image acquisition. There may be small inconsistencies with START_TIME due to varying correlation between UTC and the spacecraft clock. For purposes of data analysis the spacecraft clock value should be used. The format of this field is compatible with the NAIF Toolkit software (e.g., "00610499:32") The corresponding STOP_COUNT is not applicable because the timing of a MARCI image, once started, is independent of the space- craft clock. INTERFRAME_DELAY The time (in seconds) between acquisitions of adjacent MARCI frames. April 2007 7 The following information can be used, along with calibra- tion files to be included on the volume, to calibrate each image. This information is in some sense redundant with that in the E-kernel. FOCAL_PLANE_TEMPERATURE Temperature of focal plane of optical system associated with this image, in degrees Kelvin, at the start of image acquisition. SAMPLE_BIT_MODE_ID MARCI digitizes pixels to 12 bits and then uses a lookup table to map pixels to 8 bits. This field iden- tifies the table in use. Valid values are SQROOT, LIN1-LIN16, and LIN1CYC-LIN16CYC. The contents of the SQROOT table are given in Appendix A. LINE_EXPOSURE_DURATION Per-frame exposure duration in units of milliseconds. SAMPLING_FACTOR MARCI can do pixel averaging in the instrument before transmission. For MARCI, this value must be 1, 2, 4, 8, or 12. For UV images this field will always be 8. SAMPLE_FIRST_PIXEL This is the first pixel column of the CCD recorded in the image, and thus implicitly specifies the off-nadir look angle. A value of 0 refers to the first pixel in the array. FILTER_NAME A list describing which filter(s) were used to acquire this dataset, from the set "SHORT_UV", "LONG_UV", "BLUE", "GREEN", "ORANGE", "RED", and "NIR". RATIONALE_DESC A text description of the scientific purpose for the acquisition of this image; e.g., "Monthly monitoring of aeolian features on summit of Pavonis Mons". For some specific images, this string will contain a description of the image as actually received; for routine mapping operations, it will more likely be the goal of the image as targeted (which may not be met if the image missed its target significantly, the atmosphere was cloudy, image parameters were set inappropriately, etc.) DATA_QUALITY_DESC This field will be set to "OK" if all fragments of the image are received without detected checksum or sequence errors, and "ERROR" otherwise. April 2007 8 ORBIT_NUMBER The orbit number from the start of the mapping phase as defined by the MRO Project. The following describe keywords found internal to the IMAGE object. LINES Number of lines in the decompressed image. LINE_SAMPLES Number of samples per line in the decompressed image. For UV images this value will always be 128. LINE_PREFIX_BYTES Number of bytes of prefix information per line. This field is always 0 for MARCI products. LINE_SUFFIX_BYTES Number of bytes of suffix information per line. This field is always 0 for MARCI products. SAMPLE_TYPE Type of each sample; for MARCI, always UNSIGNED_INTEGER. SAMPLE_BITS Number of bits for each sample; for MARCI, always 8. SAMPLE_BIT_MASK Bit mask description for each sample; for MARCI, always 2#11111111#. CHECKSUM This is a checksum for the entire data part of this image, to be used for data validation. 4.3.1. Header/Trailer Description Details See above. No trailers are present. 4.3.2. Data Description Details 4.3.2.1. Filter order Each MARCI frame acquired has 16/summing factor lines of image data per selected filter (band) for visible images and 2 lines of image per selected filter for UV images. The image defined by this document has been reordered as fol- lows: +-----------------------------+ | frame 1, band 1 + April 2007 9 +-----------------------------+ | frame 1, band 2 + +-----------...---------------+ | frame 1, band N + +-----------------------------+ | frame 2, band 1 + +-----------------------------+ | frame 2, band 2 + +-----------...---------------+ | frame 2, band N + +-----------...---------------+ | frame M, band 1 + +-----------------------------+ | frame M, band 2 + +-----------...---------------+ | frame M, band N + +-----------------------------+ To create an image with data from only a single visible (or UV) band, simply extract from each frame in the data product the 16/summing factor (or 2) lines of the desired band. 4.3.2.2. Geometry Note that MARCI images are acquired and compressed in row- major order by increasing time. The arrangement of the CCD and optics in MARCI somewhat complicates the mapping of pixel to surface feature. Suppose an image acquired while the spacecraft was moving north to south was displayed in left-to-right, top-to-bottom order on a monitor. The MARCI image would then have east at the left. It is suggested that ancillary products be used to systemat- ically display images in north-up, west-left form. The decompression tool does not perform this transformation. 4.3.3. Data loss considerations MRO can use a version of the CFDP protocol to retransmit portions of data products that are dropped during initial transmission. This capability may not be employed at all times, however, and so it is possible that some MARCI images will be affected by data loss. A typical data loss is that of one or two packets, due to uncorrectable bit errors caused by noise in the space-to- Earth communications path (rare), momentary loss of receiver lock caused by a transition between the one-way and two-way tracking modes, or loss in the Earth segment of the Deep Space Network. April 2007 10 For compressed images, a packet loss leads to loss of 'line sync' in the image. We expect the majority of MARCI images to be acquired using the lossless predictive compression mode of MARCI. When a packet is lost from this compressed data stream, the decompression algorithm aligns itself to the next line by searching for the line counter and applying statistical testing to distinguish a valid line counter from a data pattern that coincidentally resembles a line counter. The effect of decompressing the data between the site of packet loss and the next valid line is the loss of one or more partial lines of data, which are zero-filled by the decompression software. A second type of loss is that of tens or hundreds of packets caused by bad weather, hardware failure, or operator error at the DSN stations, or miscommanding of the telemetry play- back on the spacecraft. For these errors in a compressed data stream, many lines of the image are lost, making it impossible to recover even the original downtrack size of the image. The MARCI ground software that produces the archival data may perform some limited correction of these errors. Correct and complete reconstruction should only be expected if there are no detected checksum errors or sequence gaps in the data; i.e., if the DATA_QUALITY_DESC field is "OK". 5. Appendix -- MARCI square root companding table 8-bit sqroot value 11-bit linear value ________________________________________ 0 0 1 1 2 2 3 3 4 3 5 4 6 5 7 5 8 6 9 7 10 8 11 9 12 10 13 11 14 13 15 14 16 15 17 17 18 18 19 20 20 21 April 2007 11 21 23 22 25 23 26 24 28 25 30 26 32 27 34 28 36 29 38 30 40 31 43 32 45 33 47 34 50 35 52 36 55 37 57 38 60 39 63 40 65 41 68 42 71 43 74 44 77 45 80 46 83 47 86 48 90 49 93 50 96 51 100 52 103 53 107 54 110 55 114 56 118 57 121 58 125 59 129 60 133 61 137 62 141 63 145 64 150 65 154 66 158 67 163 68 167 69 171 70 176 71 181 72 185 73 190 April 2007 12 74 195 75 200 76 205 77 210 78 215 79 220 80 225 81 230 82 235 83 241 84 246 85 251 86 257 87 262 88 268 89 274 90 279 91 285 92 291 93 297 94 303 95 309 96 315 97 321 98 328 99 334 100 340 101 346 102 353 103 359 104 366 105 373 106 379 107 386 108 393 109 400 110 407 111 414 112 421 113 428 114 435 115 442 116 449 117 457 118 464 119 472 120 479 121 487 122 494 123 502 124 510 125 518 126 526 April 2007 13 127 534 128 542 129 550 130 558 131 566 132 574 133 582 134 591 135 599 136 608 137 616 138 625 139 633 140 642 141 651 142 660 143 669 144 678 145 687 146 696 147 705 148 714 149 723 150 732 151 742 152 751 153 761 154 770 155 780 156 789 157 799 158 809 159 819 160 829 161 839 162 849 163 859 164 869 165 879 166 889 167 900 168 910 169 920 170 931 171 941 172 952 173 963 174 973 175 984 176 995 177 1006 178 1017 179 1028 April 2007 14 180 1039 181 1050 182 1061 183 1073 184 1084 185 1095 186 1107 187 1118 188 1130 189 1142 190 1153 191 1165 192 1177 193 1189 194 1201 195 1212 196 1225 197 1237 198 1249 199 1261 200 1273 201 1286 202 1298 203 1310 204 1323 205 1336 206 1348 207 1361 208 1374 209 1386 210 1399 211 1412 212 1425 213 1438 214 1451 215 1464 216 1478 217 1491 218 1504 219 1518 220 1531 221 1545 222 1558 223 1572 224 1586 225 1599 226 1613 227 1627 228 1641 229 1655 230 1669 231 1683 232 1697 April 2007 15 233 1712 234 1726 235 1740 236 1755 237 1769 238 1784 239 1798 240 1813 241 1828 242 1842 243 1857 244 1872 245 1887 246 1902 247 1917 248 1932 249 1947 250 1963 251 1978 252 1993 253 2009 254 2024 255 2040 April 2007 16