<?xml version="1.0" encoding="UTF-8"?>
  <!-- PDS4 XML/Schema for Name Space Id:mess  Version:1.1.0.0 - Fri Jun 21 07:09:20 PDT 2019 -->
  <!-- Generated from the PDS4 Information Model Version 1.11.0.0 - System Build 9a -->
  <!-- *** This PDS4 product schema is an operational deliverable. *** -->
  <!--                                                                           -->
  <!--               Dictionary Stack                                            -->
  <!-- 1.11.0.0 - pds: - Common Dictionary - N/A                                 -->
  <!-- 1.1.0.0 - mess: - MESSENGER Mission Dictionary - ldd-messenger.xml        -->
  <!--                                                                           -->
  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://pds.nasa.gov/pds4/mission/mess/v1"
    xmlns:mess="http://pds.nasa.gov/pds4/mission/mess/v1"
    xmlns:pds="http://pds.nasa.gov/pds4/pds/v1"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified"
    version="1.1.0.0">
 
    <xs:import namespace="http://pds.nasa.gov/pds4/pds/v1" schemaLocation="https://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_1B00.xsd"/>
 
  <xs:annotation>
    <xs:documentation>

		The MESSENGER mission dictionary contains classes that describe aspects 
		of the MESSENGER mission and related instruments.

		1.0.0.0 (2018-05-02)
		Updated PDS4 model to 1.9.0.0, may want to further update to 1.A.0.0.
		Corrections and additions by E. Guinness, Geo Node, as noted in comments
		below. Also changed all DD_Assocation clasess to have identifier_reference instead of 
		local_identifier so that the ingest file works with 1.9.0.0

		1.0.1.0 (2018-06-22) 
		S. Slavney: Added orbit_number element. Removed erroneous leading space from mission 
		phase name value "Mercury 4 Cruise".
		Build with lddtool -lpMs

		1.0.2.0 (2018-10-29)
		T. King: Add ec_factor and make img_id_lsb, img_id_msb, piv_pos_motor and piv_goal nillable as requested by Paul Geissler.
		Also made mission_phase_name multiple occurrence.

		1.1.0.0 (2019-06-07)
		T. King: Add observation_id, observation_type, data_quality_id, smear_magnitude, dark_strip_mean, missing_pixel_count, saturated_pixel_count and ec_factor as requested by Paul Geissler.
	
    </xs:documentation>
  </xs:annotation>
 
  <xs:element name="MESSENGER" type="mess:MESSENGER"> </xs:element>

  <xs:complexType name="MDIS">
    <xs:annotation>
      <xs:documentation>The MESSENGER MDIS class is the container for
        MESSENGER MDIS specific metadata elements. </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="aex_bacb" type="mess:aex_bacb" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="aex_maxe" type="mess:aex_maxe" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="aex_mine" type="mess:aex_mine" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="aex_stat" type="mess:aex_stat" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="aex_sthr" type="mess:aex_sthr" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="aex_tgtb" type="mess:aex_tgtb" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="att_clock_count" type="mess:att_clock_count" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="att_flag" type="mess:att_flag" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="att_q1" type="mess:att_q1" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="att_q2" type="mess:att_q2" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="att_q3" type="mess:att_q3" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="att_q4" type="mess:att_q4" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="cam_t1" type="mess:cam_t1" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="cam_t2" type="mess:cam_t2" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="ccd_temp" type="mess:ccd_temp" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="comp12_8" type="mess:comp12_8" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="comp_alg" type="mess:comp_alg" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="comp_fst" type="mess:comp_fst" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="critopnv" type="mess:critopnv" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="dlnkprio" type="mess:dlnkprio" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="data_quality_id" type="mess:data_quality_id" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="dark_strip_mean" type="mess:dark_strip_mean" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="dpu_id" type="mess:dpu_id" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="ec_factor" type="mess:ec_factor" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="exp_mode" type="mess:exp_mode" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="exposure" type="mess:exposure" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="fpu_bin" type="mess:fpu_bin" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="fw_goal" type="mess:fw_goal" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="fw_pos" type="mess:fw_pos" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="fw_pv" type="mess:fw_pv" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="fw_read" type="mess:fw_read" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="fw_rv" type="mess:fw_rv" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="imager" type="mess:imager" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="img_id_lsb" type="mess:img_id_lsb" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="img_id_msb" type="mess:img_id_msb" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="jailbars" type="mess:jailbars" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="jb_space" type="mess:jb_space" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="jb_x0" type="mess:jb_x0" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="jb_x1" type="mess:jb_x1" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="latch_up" type="mess:latch_up" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="met_exp" type="mess:met_exp" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="missing_pixel_count" type="mess:missing_pixel_count" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="observation_id" type="mess:observation_id" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="observation_type" type="mess:observation_type" minOccurs="0" maxOccurs="unbounded"> </xs:element>
      <xs:element name="piv_cal" type="mess:piv_cal" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="piv_goal" type="mess:piv_goal" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="piv_mpen" type="mess:piv_mpen" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="piv_pos" type="mess:piv_pos" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="piv_pos_motor" type="mess:piv_pos_motor" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="piv_pv" type="mess:piv_pv" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="piv_read" type="mess:piv_read" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="piv_rv" type="mess:piv_rv" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="piv_stat" type="mess:piv_stat" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="pixelbin" type="mess:pixelbin" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="saturated_pixel_count" type="mess:saturated_pixel_count" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="smear_azimuth" type="mess:smear_azimuth" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="smear_magnitude" type="mess:smear_magnitude" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="source" type="mess:source" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="subf_dx1" type="mess:subf_dx1" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="subf_dx2" type="mess:subf_dx2" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="subf_dx3" type="mess:subf_dx3" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="subf_dx4" type="mess:subf_dx4" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="subf_dx5" type="mess:subf_dx5" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="subf_dy1" type="mess:subf_dy1" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="subf_dy2" type="mess:subf_dy2" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="subf_dy3" type="mess:subf_dy3" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="subf_dy4" type="mess:subf_dy4" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="subf_dy5" type="mess:subf_dy5" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="subframe" type="mess:subframe" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="subf_x1" type="mess:subf_x1" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="subf_x2" type="mess:subf_x2" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="subf_x3" type="mess:subf_x3" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="subf_x4" type="mess:subf_x4" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="subf_x5" type="mess:subf_x5" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="subf_y1" type="mess:subf_y1" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="subf_y2" type="mess:subf_y2" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="subf_y3" type="mess:subf_y3" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="subf_y4" type="mess:subf_y4" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="subf_y5" type="mess:subf_y5" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="time_pls" type="mess:time_pls" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="wvlratio" type="mess:wvlratio" minOccurs="0" maxOccurs="1"> </xs:element>
    </xs:sequence>
    <!-- Begin assert statements for schematron - Enumerated Values -->
    <!-- <xs:assert test="mess:comp12_8 = ('0', '1')"/> -->
    <!-- <xs:assert test="mess:comp_alg = ('0', '1', '2', '3', '4', '5', '6', '7')"/> -->
    <!-- <xs:assert test="mess:comp_fst = ('0', '1')"/> -->
    <!-- <xs:assert test="mess:critopnv = ('0', '1')"/> -->
    <!-- <xs:assert test="mess:dlnkprio = ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9')"/> -->
    <!-- <xs:assert test="mess:dpu_id = ('0', '1')"/> -->
    <!-- <xs:assert test="mess:exp_mode = ('0', '1')"/> -->
    <!-- <xs:assert test="mess:fpu_bin = ('0', '1')"/> -->
    <!-- <xs:assert test="mess:fw_pv = ('0', '1')"/> -->
    <!-- <xs:assert test="mess:fw_rv = ('0', '1')"/> -->
    <!-- <xs:assert test="mess:imager = ('0', '1')"/> -->
    <!-- <xs:assert test="mess:jailbars = ('0', '1')"/> -->
    <!-- <xs:assert test="mess:latch_up = ('0', '1')"/> -->
    <!-- <xs:assert test="mess:observation_type = ('Albedo', 'Co-align Calibration', 'Color', 'Comet', 'Dark Current', 'Dark Polar Craters', 'Eleven Color', 'Emission Phase Function', 'Engineering', 'High Incidence', 'Limb', 'Min Phase Five Color', 'Monochrome', 'NAC WAC Calibration', 'Northern Polar', 'Oblique', 'Photometry', 'Pivot Calibration', 'Ridealong NAC', 'Satellite Search', 'Southern Polar', 'Stereo', 'Targeted', 'Thermal Calibration', 'Three Color', 'Vulcanoid Search')"/> -->
    <!-- <xs:assert test="mess:piv_mpen = ('0', '1')"/> -->
    <!-- <xs:assert test="mess:piv_pv = ('0', '1')"/> -->
    <!-- <xs:assert test="mess:piv_rv = ('0', '1')"/> -->
    <!-- <xs:assert test="mess:piv_stat = ('0', '1', '2', '3')"/> -->
    <!-- <xs:assert test="mess:pixelbin = ('0', '2', '4', '8')"/> -->
    <!-- <xs:assert test="mess:source = ('0', '1', '2')"/> -->
    <!-- <xs:assert test="mess:subframe = ('0', '1', '2', '3', '4', '5')"/> -->
    <!-- <xs:assert test="mess:time_pls = ('0', '1', '2', '3')"/> -->
    <!-- <xs:assert test="mess:wvlratio = ('0', '1', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '2', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '3', '30', '31', '32', '4', '5', '6', '7', '8', '9')"/> -->
    <!-- End assert statements for schematron - Enumerated Values -->
  </xs:complexType>

  <xs:complexType name="MESSENGER">
    <xs:annotation>
      <xs:documentation>The MESSENGER class is the container for
        MESSENGER mission-specific metadata elements. </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="mission_phase_name" type="mess:mission_phase_name" minOccurs="0" maxOccurs="unbounded"> </xs:element>
      <xs:element name="orbit_number" nillable="true" type="mess:orbit_number" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="spacecraft_clock_start_count" type="mess:spacecraft_clock_start_count" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="spacecraft_clock_stop_count" type="mess:spacecraft_clock_stop_count" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="standard_data_product_id" nillable="true" type="mess:standard_data_product_id" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="software_name" type="mess:software_name" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="software_version_id" type="mess:software_version_id" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="detector_id" type="mess:detector_id" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="MDIS" type="mess:MDIS" minOccurs="0" maxOccurs="1"> </xs:element>
    </xs:sequence>
    <!-- Begin assert statements for schematron - Enumerated Values -->
    <!-- <xs:assert test="mess:mission_phase_name = ('Earth Cruise', 'Earth Flyby', 'Launch', 'Mercury 1 Cruise', 'Mercury 1 Flyby', 'Mercury 2 Cruise', 'Mercury 2 Flyby', 'Mercury 3 Cruise', 'Mercury 3 Flyby', 'Mercury 4 Cruise', 'Mercury Orbit', 'Mercury Orbit Year 2', 'Mercury Orbit Year 3', 'Mercury Orbit Year 4', 'Mercury Orbit Year 5', 'Venus 1 Cruise', 'Venus 1 Flyby', 'Venus 2 Cruise', 'Venus 2 Flyby')"/> -->
    <!-- <xs:assert test="mess:detector_id = ('acs', 'hpge', 'microphonics', 'shield')"/> -->
    <!-- End assert statements for schematron - Enumerated Values -->
  </xs:complexType>

    <xs:annotation>
      <xs:documentation>This section contains the simpleTypes that provide more constraints
        than those at the base data type level. The simpleTypes defined here build on the base data
        types. This is another component of the common dictionary and therefore falls within the
        common namespace.
      </xs:documentation>
    </xs:annotation>

  <xs:simpleType name="aex_bacb">
    <xs:annotation>
      <xs:documentation>The background brightness used for MDIS
        automatic exposure time calculation. In a test image that it
        analyzed to determine an exposure time using automatic exposure,
        DPU hardware generates a histogram of the image. The histogram
        is analyzed by the software to determine if the image is
        overexposed or underexposed, and the exposure time is adjusted
        accordingly by analyzing the histogram of raw DN values in
        different brightness bins. The background or dark current level
        (mess.mdis.aex_bacb) is taken into account an is assumed to be a
        constant value. A threshold of number of pixels
        (mess.mdis.aex_sthr) is allowed to exceed a target brightness
        (mess.mdis.aex_tgtb). Starting with the maximum value, the
        number of pixels exceeding the target is counted, and the
        brightness of the histogram bin in which that threshold is
        reached (mess.mdis.aex_stat) is reported. The exposure time is
        scaled back by the ratio of
        mess.mdis.aex_tgtb/mess.mdis.aex_stat.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="4095"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="aex_maxe">
    <xs:annotation>
      <xs:documentation>The maximum allowable exposure time from an MDIS
        automatic exposure time calculation. In a test image that it
        analyzed to determine an exposure time using automatic exposure,
        DPU hardware generates a histogram of the image. The histogram
        is analyzed by the software to determine if the image is
        overexposed or underexposed, and the exposure time is adjusted
        accordingly by analyzing the histogram of raw DN values in
        different brightness bins. The background or dark current level
        (mess.mdis.aex_bacb) is taken into account an is assumed to be a
        constant value. A threshold of number of pixels
        (mess.mdis.aex_sthr) is allowed to exceed a target brightness
        (mess.mdis.aex_tgtb). Starting with the maximum value, the
        number of pixels exceeding the target is counted, and the
        brightness of the histogram bin in which that threshold is
        reached (mess.mdis.aex_stat) is reported. The exposure time is
        scaled back by the ratio of
        mess.mdis.aex_tgtb/mess.mdis.aex_stat.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="989"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="aex_mine">
    <xs:annotation>
      <xs:documentation>The minimum allowable exposure time from an MDIS
        automatic exposure time calculation. In a test image that it
        analyzed to determine an exposure time using automatic exposure,
        DPU hardware generates a histogram of the image. The histogram
        is analyzed by the software to determine if the image is
        overexposed or underexposed, and the exposure time is adjusted
        accordingly by analyzing the histogram of raw DN values in
        different brightness bins. The background or dark current level
        (mess.mdis.aex_bacb) is taken into account an is assumed to be a
        constant value. A threshold of number of pixels
        (mess.mdis.aex_sthr) is allowed to exceed a target brightness
        (mess.mdis.aex_tgtb). Starting with the maximum value, the
        number of pixels exceeding the target is counted, and the
        brightness of the histogram bin in which that threshold is
        reached (mess.mdis.aex_stat) is reported. The exposure time is
        scaled back by the ratio of
        mess.mdis.aex_tgtb/mess.mdis.aex_stat.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="989"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="aex_stat">
    <xs:annotation>
      <xs:documentation>The bin in a DPU histogram of image brightness
        used for MDIS automatic exposure time calculation. In a test
        image that it analyzed to determine an exposure time using
        automatic exposure, DPU hardware generates a histogram of the
        image. The histogram is analyzed by the software to determine if
        the image is overexposed or underexposed, and the exposure time
        is adjusted accordingly by analyzing the histogram of raw DN
        values in different brightness bins. The background or dark
        current level (mess.mdis.aex_bacb) is taken into account an is
        assumed to be a constant value. A threshold of number of pixels
        (mess.mdis.aex_sthr) is allowed to exceed a target brightness
        (mess.mdis.aex_tgtb). Starting with the maximum value, the
        number of pixels exceeding the target is counted, and the
        brightness of the histogram bin in which that threshold is
        reached (mess.mdis.aex_stat) is reported. The exposure time is
        scaled back by the ratio of
        mess.mdis.aex_tgtb/mess.mdis.aex_stat.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="4095"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="aex_sthr">
    <xs:annotation>
      <xs:documentation>The number of pixels allowed to exceed target
        brightness during an MDIS automatic exposure time calculation.
        In a test image that it analyzed to determine an exposure time
        using automatic exposure, DPU hardware generates a histogram of
        the image. The histogram is analyzed by the software to
        determine if the image is overexposed or underexposed, and the
        exposure time is adjusted accordingly by analyzing the histogram
        of raw DN values in different brightness bins. The background or
        dark current level (mess.mdis.aex_bacb) is taken into account an
        is assumed to be a constant value. A threshold of number of
        pixels (mess.mdis.aex_sthr) is allowed to exceed a target
        brightness (mess.mdis.aex_tgtb). Starting with the maximum
        value, the number of pixels exceeding the target is counted, and
        the brightness of the histogram bin in which that threshold is
        reached (mess.mdis.aex_stat) is reported. The exposure time is
        scaled back by the ratio of
        mess.mdis.aex_tgtb/mess.mdis.aex_stat.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="65535"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="aex_tgtb">
    <xs:annotation>
      <xs:documentation>The target brightness used for MDIS automatic
        exposure time calculation. In a test image that it analyzed to
        determine an exposure time using automatic exposure, DPU
        hardware generates a histogram of the image. The histogram is
        analyzed by the software to determine if the image is
        overexposed or underexposed, and the exposure time is adjusted
        accordingly by analyzing the histogram of raw DN values in
        different brightness bins. The background or dark current level
        (mess.mdis.aex_bacb) is taken into account an is assumed to be a
        constant value. A threshold of number of pixels
        (mess.mdis.aex_sthr) is allowed to exceed a target brightness
        (mess.mdis.aex_tgtb). Starting with the maximum value, the
        number of pixels exceeding the target is counted, and the
        brightness of the histogram bin in which that threshold is
        reached (mess.mdis.aex_stat) is reported. The exposure time is
        scaled back by the ratio of
        mess.mdis.aex_tgtb/mess.mdis.aex_stat.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="4095"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="att_clock_count">
    <xs:annotation>
      <xs:documentation>The mission-elapsed-time, or MET, in seconds
        since MESSENGER launch, of the second during which the
        spacecraft attitude measurement in the header of an MDIS image
        was acquired.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="-9223372036854775808"/>
     <xs:maxInclusive value="9223372036854775807"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="att_flag">
    <xs:annotation>
      <xs:documentation>Attitude quality flag for the spacecraft
        attitude quaternion in the header of an MDIS image: 7 = Attitude
        Knowledge OK (At least 1 Star Tracker is available and at least
        50% of gyro data is valid) 6 = Attitude Knowledge OK (No Star
        Tracker is available but at least 50% of gyro data is valid) 5 =
        Attitude Knowledge OK (No Star Tracker is and between 10% and
        50% of gyro data is valid -OR- At least 1 Star Tracker is valid
        and between 0% and 50% of gyro data valid) 4 = not a legal
        option 3 = Attitude Knowledge BAD (At least 1 Star Tracker is
        available and at least 50% of gyro data is valid) 2 = Attitude
        Knowledge BAD (No Star Tracker is available but at least 50% of
        gyro data is valid) 1 = Attitude Knowledge BAD (No Star Tracker
        is available and between 10% and 50% of gyro data is valid -OR-
        At least 1 Star Tracker is valid and between 0% and 50% of gryo
        data is valid) 0 = Attitude Knowledge BAD (No Star Tracker data
        fewer than 10% of gyro data valid).</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="7"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="att_q1">
    <xs:annotation>
      <xs:documentation>The roll value of the vector component of the
        attitude quaternion representing spacecraft attitude, in the
        header of an MDIS image.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Real">
     <xs:minInclusive value="-1.0"/>
     <xs:maxInclusive value="1.0"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="att_q2">
    <xs:annotation>
      <xs:documentation>The pitch value of the vector component of the
        attitude quaternion representing spacecraft attitude, in the
        header of an MDIS image.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Real">
     <xs:minInclusive value="-1.0"/>
     <xs:maxInclusive value="1.0"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="att_q3">
    <xs:annotation>
      <xs:documentation>The yaw value of the vector component of the
        attitude quaternion representing spacecraft attitude, in the
        header of an MDIS image.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Real">
     <xs:minInclusive value="-1.0"/>
     <xs:maxInclusive value="1.0"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="att_q4">
    <xs:annotation>
      <xs:documentation>The scalar component of the attitude quaternion
        representing spacecraft attitude, in the header of an MDIS
        image.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Real">
     <xs:minInclusive value="-1.0"/>
     <xs:maxInclusive value="1.0"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="cam_t1">
    <xs:annotation>
      <xs:documentation>The temperature of the focal plane array in raw
        counts at observation time. The conversion formula to degrees
        Celsius depends on the camera performing the observation: For
        WAC: Temperature = -263.2584 + Raw * 0.5022 For NAC: Temperature
        = -268.8441 + Raw * 0.5130 Where Raw is the raw counts in
        telemetry (mess.mdis.cam_t1).</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="1023"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="cam_t2">
    <xs:annotation>
      <xs:documentation>Camera temperature 2 in raw counts. The meaning
        depends on whether it is being reported by the WAC or NAC. A
        single telemetry point is used to return the raw value of filter
        wheel temperature (WAC), FILTER_TEMPERATURE once converted to
        units of degrees Celsius, or the raw value of telescope
        temperature (NAC), OPTICS_TEMPERATURE once converted to units of
        degrees Celsius, depending on which camera is in use. For the
        WAC, this is temperature of the filter wheel. Thus,
        FILTER_TEMPERATURE is 'N/A' if the NAC was used for the
        observation because the telemetry point will be a measurement of
        the NAC telescope temperature. For the WAC the conversion from
        raw counts to degrees Celsius is: T = -292.7603 + Raw * 0.5553
        where Raw is the raw counts in MESS:CAM_T2. For the NAC, this is
        temperature of the NAC telescope. Thus OPTICS_TEMPERATURE is
        'N/A' if the WAC was used for observation because the telemetry
        point will be a measurement of the WAC filter wheel temperature.
        For the NAC the conversion from raw counts to degrees Celsius
        is: T = -269.7180 + Raw * 0.4861 where Raw is the raw counts in
        telemetry (mess.mdis.cam_t2).</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="1023"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ccd_temp">
    <xs:annotation>
      <xs:documentation>MDIS CCD temperature in raw counts. The
        conversion formula to degrees Celsius depends on the camera
        performing the observation: For WAC: Temperature = -318.4553 +
        Raw * 0.2718 For NAC: Temperature = -323.3669 + Raw * 0.2737
        Where Raw is the raw counts in telemetry
        (mess.mdis.ccd_temp).</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="4095"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="comp12_8">
    <xs:annotation>
      <xs:documentation>12 to 8 bit image compression enabled or
        disabled. Which algorithm is used is specified by
        MESS.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="-9223372036854775808"/>
     <xs:maxInclusive value="9223372036854775807"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="comp_alg">
    <xs:annotation>
      <xs:documentation>12 to 8 bit compression algorithm (0-7) used to
        compress images from 12 to 8 bits. Whether this option is
        enabled is indicated by mess.mdis.comp12_8. The compression is
        implemented using one of eight lookup tables, which are
        optimized to the lower WAC CCD read noise and higher NAC read
        noise, light levels, and bias level (nominal or after inflight
        drift). </xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="-9223372036854775808"/>
     <xs:maxInclusive value="9223372036854775807"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="comp_fst">
    <xs:annotation>
      <xs:documentation>Status of lossless Fast compression of MDIS
        images. This is applied to images by the instrument itself. The
        images are first uncompressed on the solid-state recorder if
        lossy wavelet compression is applied.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="-9223372036854775808"/>
     <xs:maxInclusive value="9223372036854775807"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="critopnv">
    <xs:annotation>
      <xs:documentation>When true, this indicates that the MDIS image is
        a critical optical navigation image and will be compressed by
        the MESSENGER Main Processor (MP) before other images. Normally,
        the MP compresses images in the order that they are
        received.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="-9223372036854775808"/>
     <xs:maxInclusive value="9223372036854775807"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="dark_strip_mean">
    <xs:annotation>
      <xs:documentation>The dark_strip_mean element provides the mean
        value of the pixels in the dark strip area of a CCD. The dark
        strip is an area of the CCD which is covered in such a way as to
        receive no light. The dark strip provides a measure of the dark
        current in the CCD. </xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Real">
     <xs:minInclusive value="0.0"/>
     <xs:maxInclusive value="1.7976931348623157e308"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="data_quality_id">
    <xs:annotation>
      <xs:documentation>The data_quality_id element provides a numeric
        key which identifies the quality of data available for a
        particular time period. The data_quality_id scheme is unique to
        a given instrument and is described by the associated
        data_quality_desc element. </xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Short_String_Collapsed">
     <xs:minLength value="1"/>
     <xs:maxLength value="255"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="detector_id">
    <xs:annotation>
      <xs:documentation>The value indicates what detector of the GRS
        instrument measured the observation.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Short_String_Collapsed">
     <xs:minLength value="1"/>
     <xs:maxLength value="255"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="dlnkprio">
    <xs:annotation>
      <xs:documentation>Priority for downlink of an MDIS image file from
        the MESSENGER spacecraft.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="-9223372036854775808"/>
     <xs:maxInclusive value="9223372036854775807"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="dpu_id">
    <xs:annotation>
      <xs:documentation>The identified of the DPU used during
        acquisition of an MDIS image.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="-9223372036854775808"/>
     <xs:maxInclusive value="9223372036854775807"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ec_factor">
    <xs:annotation>
      <xs:documentation>The ec_factor element records the empirical
        correction factor used to process MDIS WAC CDRs.
        </xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Real">
     <xs:minInclusive value="-1.7976931348623157e308"/>
     <xs:maxInclusive value="1.7976931348623157e308"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="exp_mode">
    <xs:annotation>
      <xs:documentation>Exposure time mode used for acquisition of an
        MDIS image. Manual exposure uses a pre-commanded exposure time.
        Autoexposure determines the exposure time from test images taken
        before the exposure, targeting a specific brightness
        value.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="-9223372036854775808"/>
     <xs:maxInclusive value="9223372036854775807"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="exposure">
    <xs:annotation>
      <xs:documentation>MDIS exposure time in
        milliseconds.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="9990"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="fpu_bin">
    <xs:annotation>
      <xs:documentation>On-chip image binning option for MDIS. Images
        may be taken either without on-chip binning or with 2x2 binning,
        which decreases the size of a full image from 1024x1024 pixels
        to 512x512 pixels. On-chip binning can be used to manage the
        size of raw images being stored on the spacecraft solid-state
        recorder, or to increase CCD sensitivity. If this option is
        used, sensitivity increases by about a factor of four but read
        noise is similar.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="-9223372036854775808"/>
     <xs:maxInclusive value="9223372036854775807"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="fw_goal">
    <xs:annotation>
      <xs:documentation>The goal position, in raw counts of the position
        resolver on the MDIS filter wheel. For each commanded filter
        number, the instrument software will try to place the filter
        wheel at the following positions: FILTER_NUMBER
        mess.mdis.fw_goal 1 17376 2 11976 3 6492 4 1108 5 61104 6 55684
        7 50148 8 44760 9 39256 10 33796 11 28252 12 22852 Actual
        position attained is reported in
        mess.mdis.fw_pos.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="65535"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="fw_pos">
    <xs:annotation>
      <xs:documentation>The actual position, in raw counts of the
        position resolver on the MDIS filter wheel. For each commanded
        filter number, the instrument software will try to place the
        filter wheel at the following positions: FILTER_NUMBER
        mess.mdis.fw_goal 1 17376 2 11976 3 6492 4 1108 5 61104 6 55684
        7 50148 8 44760 9 39256 10 33796 11 28252 12 22852 Commanded
        position is reported in mess.mdis.fw_goal. There is a tolerance
        of 240 resolver counts around mess.mdis.fw_goal for
        mess.mdis.fw_pos to indicate that the filter wheel is correctly
        positioned.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="65535"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="fw_pv">
    <xs:annotation>
      <xs:documentation>Validity flag for position of the MDIS filter
        wheel given in mess.mdis.fw_pos.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="-9223372036854775808"/>
     <xs:maxInclusive value="9223372036854775807"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="fw_read">
    <xs:annotation>
      <xs:documentation>The raw value from the MDIS filter wheel
        resolver in resolver counts. It is used by the flight software
        to compute mess.mdis.fw_pos. For each commanded filter number,
        the instrument software will try to place the filter wheel at
        the following positions: FILTER_NUMBER mess.mdis.fw_goal 1 17376
        2 11976 3 6492 4 1108 5 61104 6 55684 7 50148 8 44760 9 39256 10
        33796 11 28252 12 22852 Commanded position is reported in
        mess.mdis.fw_goal. There is a tolerance of 240 resolver counts
        around mess.mdis.fw_goal for mess.mdis.fw_pos to indicate that
        the filter wheel is correctly positioned.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="65535"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="fw_rv">
    <xs:annotation>
      <xs:documentation>Validity flag for reading of the MDIS filter
        wheel given in mess.mdis.fw_read.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="-9223372036854775808"/>
     <xs:maxInclusive value="9223372036854775807"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="imager">
    <xs:annotation>
      <xs:documentation>Which of the two cameras was used during
        acquisition of an MDIS image.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="-9223372036854775808"/>
     <xs:maxInclusive value="9223372036854775807"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="img_id_lsb">
    <xs:annotation>
      <xs:documentation>The 16 least-significant-bits of the 24-bit
        unique image identifier from the raw image header. This item was
        added to images effective with an instrument software update
        2009-08-18 and will be set to N/A in images aquired
        earlier.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="65535"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="img_id_msb">
    <xs:annotation>
      <xs:documentation>The 8 most-significant-bits of the 24-bit unique
        image identifier from the raw image header. This item was added
        to images effective with an instrument software update
        2009-08-18 and will be set to N/A in images aquired
        earlier.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="255"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="jailbars">
    <xs:annotation>
      <xs:documentation>When true, this indicates that an MDIS image is
        subsampled by jailbars, a subset of all the image columns that
        are downlinked to save data volume in optical navigation images.
        The start column, stop column, and column spacing are indicated
        by mess:jb_x0, mess:jb_x1, and mess:jb_space respectively.
        Jailbars are defined in the original 1024x1024 pixel MDIS
        coordinate system before pixel binning as described by
        mess_fpu_bin and mess:pixelbin.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="-9223372036854775808"/>
     <xs:maxInclusive value="9223372036854775807"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="jb_space">
    <xs:annotation>
      <xs:documentation>The column spacing for jailbars in an MDIS
        image, a subset of all the image columns that are downlinked to
        save data volume in optical navigation images. Jailbars are
        defined in the original 1024x1024 pixel MDIS coordinate system
        before pixel binning as described by mess_fpu_bin and
        mess:pixelbin.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="1023"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="jb_x0">
    <xs:annotation>
      <xs:documentation>The start column for jailbars in an MDIS image,
        a subset of all the image columns that are downlinked to save
        data volume in optical navigation images. Jailbars are defined
        in the original 1024x1024 pixel MDIS coordinate system before
        pixel binning as described by mess_fpu_bin and
        mess:pixelbin.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="1023"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="jb_x1">
    <xs:annotation>
      <xs:documentation>The stop column for jailbars in an MDIS image, a
        subset of all the image columns that are downlinked to save data
        volume in optical navigation images. Jailbars are defined in the
        original 1024x1024 pixel MDIS coordinate system before pixel
        binning as described by mess_fpu_bin and
        mess:pixelbin.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="1023"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="latch_up">
    <xs:annotation>
      <xs:documentation>Indicator if MDIS FPU is latched up. If the
        value is 1 then the image data are probably
        invalid.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="-9223372036854775808"/>
     <xs:maxInclusive value="9223372036854775807"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="met_exp">
    <xs:annotation>
      <xs:documentation>The mission-elapsed-time, or MET, in seconds
        since MESSENGER launch of the second during which an MDIS image
        completes its exposure.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="-9223372036854775808"/>
     <xs:maxInclusive value="9223372036854775807"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="missing_pixel_count">
    <xs:annotation>
      <xs:documentation>The missing_pixel_count element provides the
        number of pixels missing from an image or observation.
        </xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="9223372036854775807"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="mission_phase_name">
    <xs:annotation>
      <xs:documentation>The mission_phase_name attribute provides the
        mission-defined name of a mission phase.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Short_String_Collapsed">
     <xs:minLength value="1"/>
     <xs:maxLength value="255"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="observation_id">
    <xs:annotation>
      <xs:documentation>The observation_id element uniquely identifies a
        scientific observation within a data set.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Short_String_Collapsed">
     <xs:minLength value="1"/>
     <xs:maxLength value="255"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="observation_type">
    <xs:annotation>
      <xs:documentation>The observation_type element identifies the
        general type of an observation.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Short_String_Collapsed">
     <xs:minLength value="1"/>
     <xs:maxLength value="255"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="orbit_number">
    <xs:annotation>
      <xs:documentation>The orbit_number attribute identifies the number
        of the orbital revolution of a spacecraft around a target body.
        For MESSENGER, the orbit number was incremented at apoapsis. For
        observations made before the spacecraft was in orbit,
        orbit_number has no value, and its nilReason attribute is
        "inapplicable". </xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="pds:ASCII_NonNegative_Integer">
        <xs:attribute name="nilReason" type="pds:nil_reason" use="optional" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:simpleType name="piv_cal">
    <xs:annotation>
      <xs:documentation>The offset in measured pivot position applied to
        mess.mdis.piv_pos and mess.mdis.piv_goal so that zero is as
        close as possible to true spacecraft nadir (+z axis). The
        correction is in increments of (180 DEGREES /
        (2**15)).</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="-32768"/>
     <xs:maxInclusive value="32768"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="piv_goal">
    <xs:annotation>
      <xs:documentation>The commanded position of the MDIS pivot during
        exposure of an MDIS image, in increments of (180 DEGREES /
        (2**15)) with zero at nadir. -180 degrees is stowed. This item
        is not available after an instrument sofware upload 2009-08-18
        and will be set to N/A in images acquired
        later.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="-32768"/>
     <xs:maxInclusive value="32768"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="piv_mpen">
    <xs:annotation>
      <xs:documentation>Status of main processor (MP) control of the
        MDIS pivot. If this is enabled, then the pivot goes to a
        position broadcast by the MP that points MDIS to nadir or some
        other aimpoint. If not enabled then a discrete pivot position is
        commanded.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="-9223372036854775808"/>
     <xs:maxInclusive value="9223372036854775807"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="piv_pos">
    <xs:annotation>
      <xs:documentation>The actual position of the MDIS pivot during
        exposure of an MDIS image, in increments of (180 DEGREES /
        (2**15)) with zero at nadir. -180 degrees is
        stowed.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="-32768"/>
     <xs:maxInclusive value="32768"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="piv_pos_motor">
    <xs:annotation>
      <xs:documentation>The actual position of the MDIS pivot during
        exposure of an MDIS image, in motor step units. This item is not
        available prior to an instrument software upload 2009-08-18 and
        will be set to N/A in images taken earlier.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="65535"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="piv_pv">
    <xs:annotation>
      <xs:documentation>Validity flag for position of the MDIS pivot
        given in mess.mdis.piv_pos.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="-9223372036854775808"/>
     <xs:maxInclusive value="9223372036854775807"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="piv_read">
    <xs:annotation>
      <xs:documentation>Raw pivot reading from resolver (in units of
        resolver counts). The pivot platform resolver only covers 45
        degrees of motion; the resolver read-out values repeat eight
        times over the entire 360 degrees that an unconstrained platform
        could travel. This value is used along with dead-reckoning
        knowledge of which octant the platform is in to give the value
        in mess.mdis.piv_pos.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="65535"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="piv_rv">
    <xs:annotation>
      <xs:documentation>Validity flag for reading of the MDIS pivot
        given in mess.mdis.piv_read.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="-9223372036854775808"/>
     <xs:maxInclusive value="9223372036854775807"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="piv_stat">
    <xs:annotation>
      <xs:documentation>Pivot control state of MDIS. A resolver provides
        a position reading of the pivot platform. The resolver only
        covers 45 degrees of motion; the resolver read-out values repeat
        eight times over the entire 360 degrees that an unconstrained
        platform could travel. The DPU software must determine in which
        of the eight octants the platform is located before the resolver
        reading is meaningful. The software combines the octant with the
        resolver reading to form a position that covers the entire 360
        degrees. To determine the octant the DPU software must be
        commanded to 'home' the platform. To home the pivot platform,
        the software drives the motor open loop backwards into the hard
        stop at -185 degrees. Then the software drives the motor
        forward, open loop, prepositioning it to -179 degrees. Until
        homing is completed, the pivot platform is considered 'lost' and
        all other pivot commands will remain pending. This status item
        describes that state of the pivot in determining this position
        knowledge.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="-9223372036854775808"/>
     <xs:maxInclusive value="9223372036854775807"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="pixelbin">
    <xs:annotation>
      <xs:documentation>Pixel binning done to MDIS images by the
        MESSENGER spacecraft main processor (MP). This is in addition to
        on-chip binning as described by mess_fpu_bin.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="-9223372036854775808"/>
     <xs:maxInclusive value="9223372036854775807"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="saturated_pixel_count">
    <xs:annotation>
      <xs:documentation>The saturated_pixel_count element provides a
        count of the number of pixels in the array that are at or exceed
        the maximum DN value. </xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="9223372036854775807"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="smear_azimuth">
    <xs:annotation>
      <xs:documentation>The smear_azimuth element indicates the
        direction in which an image was smeared. The values of this
        angle increment in a clockwise direction from a horizontal
        reference line. </xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Real">
     <xs:minInclusive value="0.0"/>
     <xs:maxInclusive value="360.0"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="smear_magnitude">
    <xs:annotation>
      <xs:documentation>The smear_magnitude element indicates how far an
        image was smeared during an exposure. </xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Real">
     <xs:minInclusive value="0.0"/>
     <xs:maxInclusive value="1.7976931348623157e308"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="software_name">
    <xs:annotation>
      <xs:documentation>The name of the software used to generate the
        product.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Short_String_Collapsed">
     <xs:minLength value="1"/>
     <xs:maxLength value="255"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="software_version_id">
    <xs:annotation>
      <xs:documentation>The version of the software used to generate the
        product. It usually has the form m.n</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Short_String_Collapsed">
     <xs:minLength value="1"/>
     <xs:maxLength value="255"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="source">
    <xs:annotation>
      <xs:documentation>Source of an MDIS image, either a scene image
        from the CCD or one of two test patterns.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="-9223372036854775808"/>
     <xs:maxInclusive value="9223372036854775807"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="spacecraft_clock_start_count">
    <xs:annotation>
      <xs:documentation>The spacecraft_clock_start_count attribute
        provides the value of the spacecraft clock at the beginning of a
        time period of interest. A planned reset of the on-board clock
        of the MESSENGER spacecraft occurred on January 8, 2013. This
        was commanded by Mission Operations and was done because the
        integer seconds part of the on-board mission- elapsed-time (MET)
        counter is not long enough to contain the larger MET values that
        would occur due to the extended mission. The MESSENGER team
        elected to command the clock reset and set MET to a small
        non-zero value to prevent disruptions in on-board timekeeping
        and other effects (that might have occurred if the clock were
        allowed to automatically rollover to 0 in early 2013) and to
        ensure that the MET counter would accomodate the remaining
        extended mission. As a result of the spacecraft clock reset, a
        discontinuity was introduced and MET values are no longer
        guaranteed to be unique throughout the mission. This ambiguity
        is resolved in ground processing by the use of SPICE 'clock
        partitions' (partition 1 for pre-reset METs and partition 2 for
        post-reset METs) in the Spacecraft Clock (SCLK) kernel (which
        supports mapping MET to other time forms using SPICE routines as
        described below) and with MET values stored in PDS products,
        labels, and for some instruments, product file names. For MET
        values in products or labels, a '1/' or '2/' preceding MET
        indicates the partition, as in: SPACECRAFT_CLOCK_START_COUNT =
        '1/265485874' SPACECRAFT_CLOCK_STOP_COUNT = '2/000100005' When
        using SPICE routines, clock partition numbers should be included
        with MET input values. METs expressed without an explicit
        partition number are associated with clock partition 1 by
        default. Use of clock partition numbers in file names for some
        MDIS products is described in the MDIS EDR and CDR/RDR SIS
        documents with those data sets. </xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Short_String_Collapsed">
    	<xs:pattern value='[1-9]/[0-9]{9}(.[0-9]{3})?'/>
     <xs:minLength value="1"/>
     <xs:maxLength value="255"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="spacecraft_clock_stop_count">
    <xs:annotation>
      <xs:documentation>The spacecraft_clock_stop_count attribute
        provides the value of the spacecraft clock at the beginning of a
        time period of interest. A planned reset of the on-board clock
        of the MESSENGER spacecraft occurred on January 8, 2013. This
        was commanded by Mission Operations and was done because the
        integer seconds part of the on-board mission- elapsed-time (MET)
        counter is not long enough to contain the larger MET values that
        would occur due to the extended mission. The MESSENGER team
        elected to command the clock reset and set MET to a small
        non-zero value to prevent disruptions in on-board timekeeping
        and other effects (that might have occurred if the clock were
        allowed to automatically rollover to 0 in early 2013) and to
        ensure that the MET counter would accomodate the remaining
        extended mission. As a result of the spacecraft clock reset, a
        discontinuity was introduced and MET values are no longer
        guaranteed to be unique throughout the mission. This ambiguity
        is resolved in ground processing by the use of SPICE 'clock
        partitions' (partition 1 for pre-reset METs and partition 2 for
        post-reset METs) in the Spacecraft Clock (SCLK) kernel (which
        supports mapping MET to other time forms using SPICE routines as
        described below) and with MET values stored in PDS products,
        labels, and for some instruments, product file names. For MET
        values in products or labels, a '1/' or '2/' preceding MET
        indicates the partition, as in: SPACECRAFT_CLOCK_START_COUNT =
        '1/265485874' SPACECRAFT_CLOCK_STOP_COUNT = '2/000100005' When
        using SPICE routines, clock partition numbers should be included
        with MET input values. METs expressed without an explicit
        partition number are associated with clock partition 1 by
        default. Use of clock partition numbers in file names for some
        MDIS products is described in the MDIS EDR and CDR/RDR SIS
        documents with those data sets. </xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Short_String_Collapsed">
    	<xs:pattern value='[1-9]/[0-9]{9}(.[0-9]{3})?'/>
     <xs:minLength value="1"/>
     <xs:maxLength value="255"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="standard_data_product_id">
    <xs:annotation>
      <xs:documentation>The standard_data_product_id keyword is used to
        identify data products of the same processing level that are not
        otherwise indentified by being in different collections within
        the bundle.</xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="pds:ASCII_Short_String_Collapsed">
        <xs:attribute name="nilReason" type="pds:nil_reason" use="optional" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:simpleType name="subf_dx1">
    <xs:annotation>
      <xs:documentation>The number of columns in the FIRST rectangular
        subframe within an MDIS image to be retained after image
        compression by the MESSENGER spacecraft main processor (MP).
        There may be up to five subframes per image as defined by
        mess_subframe. Subframes are defined in the original 1024x1024
        pixel MDIS coordinate system before pixel binning as described
        by mess:fpu_bin and mess:pixelbin.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="1024"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="subf_dx2">
    <xs:annotation>
      <xs:documentation>The number of columns in the SECOND rectangular
        subframe within an MDIS image to be retained after image
        compression by the MESSENGER spacecraft main processor (MP).
        There may be up to five subframes per image as defined by
        mess_subframe. Subframes are defined in the original 1024x1024
        pixel MDIS coordinate system before pixel binning as described
        by mess:fpu_bin and mess:pixelbin.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="1024"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="subf_dx3">
    <xs:annotation>
      <xs:documentation>The number of columns in the THIRD rectangular
        subframe within an MDIS image to be retained after image
        compression by the MESSENGER spacecraft main processor (MP).
        There may be up to five subframes per image as defined by
        mess_subframe. Subframes are defined in the original 1024x1024
        pixel MDIS coordinate system before pixel binning as described
        by mess:fpu_bin and mess:pixelbin.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="1024"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="subf_dx4">
    <xs:annotation>
      <xs:documentation>The number of columns in the FOURTH rectangular
        subframe within an MDIS image to be retained after image
        compression by the MESSENGER spacecraft main processor (MP).
        There may be up to five subframes per image as defined by
        mess_subframe. Subframes are defined in the original 1024x1024
        pixel MDIS coordinate system before pixel binning as described
        by mess:fpu_bin and mess:pixelbin.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="1024"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="subf_dx5">
    <xs:annotation>
      <xs:documentation>The number of columns in the FIFTH rectangular
        subframe within an MDIS image to be retained after image
        compression by the MESSENGER spacecraft main processor (MP).
        There may be up to five subframes per image as defined by
        mess_subframe. Subframes are defined in the original 1024x1024
        pixel MDIS coordinate system before pixel binning as described
        by mess:fpu_bin and mess:pixelbin.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="1024"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="subf_dy1">
    <xs:annotation>
      <xs:documentation>The number of rows in the FIRST rectangular
        subframe within an MDIS image to be retained after image
        compression by the MESSENGER spacecraft main processor (MP).
        There may be up to five subframes per image as defined by
        mess_subframe. Subframes are defined in the original 1024x1024
        pixel MDIS coordinate system before pixel binning as described
        by mess:fpu_bin and mess:pixelbin.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="1024"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="subf_dy2">
    <xs:annotation>
      <xs:documentation>The number of rows in the SECOND rectangular
        subframe within an MDIS image to be retained after image
        compression by the MESSENGER spacecraft main processor (MP).
        There may be up to five subframes per image as defined by
        mess_subframe. Subframes are defined in the original 1024x1024
        pixel MDIS coordinate system before pixel binning as described
        by mess:fpu_bin and mess:pixelbin.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="1024"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="subf_dy3">
    <xs:annotation>
      <xs:documentation>The number of rows in the THIRD rectangular
        subframe within an MDIS image to be retained after image
        compression by the MESSENGER spacecraft main processor (MP).
        There may be up to five subframes per image as defined by
        mess_subframe. Subframes are defined in the original 1024x1024
        pixel MDIS coordinate system before pixel binning as described
        by mess:fpu_bin and mess:pixelbin.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="1024"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="subf_dy4">
    <xs:annotation>
      <xs:documentation>The number of rows in the FOURTH rectangular
        subframe within an MDIS image to be retained after image
        compression by the MESSENGER spacecraft main processor (MP).
        There may be up to five subframes per image as defined by
        mess_subframe. Subframes are defined in the original 1024x1024
        pixel MDIS coordinate system before pixel binning as described
        by mess:fpu_bin and mess:pixelbin.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="1024"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="subf_dy5">
    <xs:annotation>
      <xs:documentation>The number of rows in the FIFTH rectangular
        subframe within an MDIS image to be retained after image
        compression by the MESSENGER spacecraft main processor (MP).
        There may be up to five subframes per image as defined by
        mess_subframe. Subframes are defined in the original 1024x1024
        pixel MDIS coordinate system before pixel binning as described
        by mess:fpu_bin and mess:pixelbin.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="1024"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="subf_x1">
    <xs:annotation>
      <xs:documentation>The zero-based starting column of the FIRST
        rectangular subframe within an MDIS image to be retained after
        image compression by the MESSENGER spacecraft main processor
        (MP). There may be up to five subframes per image as defined by
        mess:subframe. Subframes are defined in the original 1024x1024
        pixel MDIS coordinate system before pixel binning as described
        by mess_fpu_bin and mess:pixelbin.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="1023"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="subf_x2">
    <xs:annotation>
      <xs:documentation>The zero-based starting column of the SECOND
        rectangular subframe within an MDIS image to be retained after
        image compression by the MESSENGER spacecraft main processor
        (MP). There may be up to five subframes per image as defined by
        mess:subframe. Subframes are defined in the original 1024x1024
        pixel MDIS coordinate system before pixel binning as described
        by mess_fpu_bin and mess:pixelbin.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="1023"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="subf_x3">
    <xs:annotation>
      <xs:documentation>The zero-based starting column of the THIRD
        rectangular subframe within an MDIS image to be retained after
        image compression by the MESSENGER spacecraft main processor
        (MP). There may be up to five subframes per image as defined by
        mess:subframe. Subframes are defined in the original 1024x1024
        pixel MDIS coordinate system before pixel binning as described
        by mess_fpu_bin and mess:pixelbin.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="1023"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="subf_x4">
    <xs:annotation>
      <xs:documentation>The zero-based starting column of the FOURTH
        rectangular subframe within an MDIS image to be retained after
        image compression by the MESSENGER spacecraft main processor
        (MP). There may be up to five subframes per image as defined by
        mess:subframe. Subframes are defined in the original 1024x1024
        pixel MDIS coordinate system before pixel binning as described
        by mess_fpu_bin and mess:pixelbin.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="1023"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="subf_x5">
    <xs:annotation>
      <xs:documentation>The zero-based starting column of the FIFTH
        rectangular subframe within an MDIS image to be retained after
        image compression by the MESSENGER spacecraft main processor
        (MP). There may be up to five subframes per image as defined by
        mess:subframe. Subframes are defined in the original 1024x1024
        pixel MDIS coordinate system before pixel binning as described
        by mess_fpu_bin and mess:pixelbin.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="1023"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="subf_y1">
    <xs:annotation>
      <xs:documentation>The zero-based starting row of the FIRST
        rectangular subframe within an MDIS image to be retained after
        image compression by the MESSENGER spacecraft main processor
        (MP). There may be up to five subframes per image as defined by
        mess:subframe. Subframes are defined in the original 1024x1024
        pixel MDIS coordinate system before pixel binning as described
        by mess_fpu_bin and mess:pixelbin.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="1023"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="subf_y2">
    <xs:annotation>
      <xs:documentation>The zero-based starting row of the SECOND
        rectangular subframe within an MDIS image to be retained after
        image compression by the MESSENGER spacecraft main processor
        (MP). There may be up to five subframes per image as defined by
        mess:subframe. Subframes are defined in the original 1024x1024
        pixel MDIS coordinate system before pixel binning as described
        by mess_fpu_bin and mess:pixelbin.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="1023"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="subf_y3">
    <xs:annotation>
      <xs:documentation>The zero-based starting row of the THIRD
        rectangular subframe within an MDIS image to be retained after
        image compression by the MESSENGER spacecraft main processor
        (MP). There may be up to five subframes per image as defined by
        mess:subframe. Subframes are defined in the original 1024x1024
        pixel MDIS coordinate system before pixel binning as described
        by mess_fpu_bin and mess:pixelbin.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="1023"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="subf_y4">
    <xs:annotation>
      <xs:documentation>The zero-based starting row of the FOURTH
        rectangular subframe within an MDIS image to be retained after
        image compression by the MESSENGER spacecraft main processor
        (MP). There may be up to five subframes per image as defined by
        mess:subframe. Subframes are defined in the original 1024x1024
        pixel MDIS coordinate system before pixel binning as described
        by mess_fpu_bin and mess:pixelbin.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="1023"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="subf_y5">
    <xs:annotation>
      <xs:documentation>The zero-based starting row of the FIFTH
        rectangular subframe within an MDIS image to be retained after
        image compression by the MESSENGER spacecraft main processor
        (MP). There may be up to five subframes per image as defined by
        mess:subframe. Subframes are defined in the original 1024x1024
        pixel MDIS coordinate system before pixel binning as described
        by mess_fpu_bin and mess:pixelbin.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="0"/>
     <xs:maxInclusive value="1023"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="subframe">
    <xs:annotation>
      <xs:documentation>Number of rectangular subframes within an MDIS
        image to be retained after image compression by the MESSENGER
        spacecraft main processor (MP). Subframes may overlap each
        other, and are defined in the original 1024x1024 pixel MDIS
        coordinate system before pixel binning as described by
        mess:fpu_bin and mess:pixelbin. Either a full image may be
        specified, or up to five discrete regions within the full image.
        In all cases, the first four columns of the original 1024x1024
        image, which are physically masked and serve as a dark current
        reference, are downlinked as subframe 0, even if the full image
        case is described. Within the subframes, pixel binning as
        described by mess:fpu_bin and mess:pixelbin is
        performed.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="-9223372036854775808"/>
     <xs:maxInclusive value="9223372036854775807"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="time_pls">
    <xs:annotation>
      <xs:documentation>Source of the 1 Hz time pulse used in
        time-tagging MDIS images.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="-9223372036854775808"/>
     <xs:maxInclusive value="9223372036854775807"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="wvlratio">
    <xs:annotation>
      <xs:documentation>Commanded (lossy) wavelet compression ratio for
        an MDIS image.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="-9223372036854775808"/>
     <xs:maxInclusive value="9223372036854775807"/>
	   </xs:restriction>
  </xs:simpleType>
</xs:schema>
