<?xml version="1.0" encoding="UTF-8"?>
  <!-- PDS4 XML/Schema for Name Space Id:kplo  Version:1.0.1.0 - Wed May 01 23:52:41 UTC 2024 -->
  <!-- Generated from the PDS4 Information Model Version 1.21.0.0 - System Build 14.0 -->
  <!-- *** This PDS4 product schema is an operational deliverable. *** -->
  <!--                                                                           -->
  <!--               Dictionary Stack                                            -->
  <!-- 1.21.0.0 - pds: - Common Dictionary                                       -->
  <!-- 1.0.1.0 - kplo: - KPLO                                                    -->
  <!--                                                                           -->
  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.kari.re.kr/kpds/mission/kplo/v1"
    xmlns:kplo="http://www.kari.re.kr/kpds/mission/kplo/v1"
    xmlns:pds="http://pds.nasa.gov/pds4/pds/v1"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified"
    version="1.0.1.0">
 
    <xs:import namespace="http://pds.nasa.gov/pds4/pds/v1" schemaLocation="https://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_1L00.xsd"/>
 
  <xs:annotation>
    <xs:documentation>

        The KPLO dictionary contains classes that describe aspects of the 
        Korea Pathfinder Lunar Orbiter mission and related instruments.
    
    </xs:documentation>
  </xs:annotation>
 
  <xs:element name="KPLO_Parameters" type="kplo:KPLO_Parameters"> </xs:element>

  <xs:complexType name="KPLO_Parameters">
    <xs:annotation>
      <xs:documentation>The KPLO_Parameters class is the container for
        mission-specific metadata elements.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="product_version_id" type="kplo:product_version_id" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="mission_phase_name" type="kplo:mission_phase_name" minOccurs="0" maxOccurs="unbounded"> </xs:element>
      <xs:element name="orbit_number" nillable="true" type="kplo:orbit_number" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="producer_institution_name" type="kplo:producer_institution_name" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="SHADOWCAM_Parameters" type="kplo:SHADOWCAM_Parameters" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="LUTI_Parameters" type="kplo:LUTI_Parameters" minOccurs="0" maxOccurs="1"> </xs:element>
    </xs:sequence>
    <!-- Begin assert statements for schematron - Enumerated Values -->
    <!-- <xs:assert test="kplo:mission_phase_name = ('commissioning', 'cruise', 'extended', 'nominal')"/> -->
    <!-- End assert statements for schematron - Enumerated Values -->
  </xs:complexType>

  <xs:complexType name="LUTI_Parameters">
    <xs:annotation>
      <xs:documentation>The LUTI_Parameters class is the container for
        Lunar Terrain Imager A and B specific observation
        parameters.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="rationale_desc" type="kplo:rationale_desc" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="luti_target_type" type="kplo:luti_target_type" minOccurs="0" maxOccurs="unbounded"> </xs:element>
      <xs:element name="luti_target_name" type="kplo:luti_target_name" minOccurs="0" maxOccurs="unbounded"> </xs:element>
      <xs:element name="frame_id" type="kplo:frame_id" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="luti_constant_time_offset" type="kplo:luti_constant_time_offset" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="spacecraft_clock_start_count" type="kplo:spacecraft_clock_start_count" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="spacecraft_clock_stop_count" type="kplo:spacecraft_clock_stop_count" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="line_integration_time" type="kplo:line_integration_time" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="ccd_direction" type="kplo:ccd_direction" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="bit_selection" type="kplo:bit_selection" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="pre_scan_mode_selection" type="kplo:pre_scan_mode_selection" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="luti_quality_id" type="kplo:luti_quality_id" minOccurs="0" maxOccurs="1"> </xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="SHADOWCAM_Parameters">
    <xs:annotation>
      <xs:documentation>The SHADOWCAM_Parameters class is the container
        for ShadowCam-specific observation parameters.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="rationale_desc" type="kplo:rationale_desc" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="data_quality_id" type="kplo:data_quality_id" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="data_quality_desc" type="kplo:data_quality_desc" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="dqi_corruption_detected" type="kplo:dqi_corruption_detected" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="dqi_fpa_out_of_bounds" type="kplo:dqi_fpa_out_of_bounds" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="dqi_under_saturated" type="kplo:dqi_under_saturated" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="dqi_missing_data" type="kplo:dqi_missing_data" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="dqi_missing_spice" type="kplo:dqi_missing_spice" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="dqi_uncalibratable" type="kplo:dqi_uncalibratable" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="execution_spacecraft_time" type="kplo:execution_spacecraft_time" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="execution_time" type="kplo:execution_time" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="start_time_offset" type="kplo:start_time_offset" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="preroll_time" type="kplo:preroll_time" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="temperature_fpa_a" type="kplo:temperature_fpa_a" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="temperature_fpa_b" type="kplo:temperature_fpa_b" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="temperature_fpga" type="kplo:temperature_fpga" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="temperature_telescope" type="kplo:temperature_telescope" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="line_rate_ms" type="kplo:line_rate_ms" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="line_rate_code" type="kplo:line_rate_code" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="klines" type="kplo:klines" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="preroll_lines" type="kplo:preroll_lines" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="bterm1" type="kplo:bterm1" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="bterm2" type="kplo:bterm2" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="bterm3" type="kplo:bterm3" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="bterm4" type="kplo:bterm4" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="bterm5" type="kplo:bterm5" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="xterm0" type="kplo:xterm0" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="xterm1" type="kplo:xterm1" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="xterm2" type="kplo:xterm2" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="xterm3" type="kplo:xterm3" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="xterm4" type="kplo:xterm4" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="mode_test" type="kplo:mode_test" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="tdi_direction" type="kplo:tdi_direction" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="gain_ch0" type="kplo:gain_ch0" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="gain_ch1" type="kplo:gain_ch1" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="gain_ch2" type="kplo:gain_ch2" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="gain_ch3" type="kplo:gain_ch3" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="gain_ch4" type="kplo:gain_ch4" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="gain_ch5" type="kplo:gain_ch5" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="offset_ch0" type="kplo:offset_ch0" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="offset_ch1" type="kplo:offset_ch1" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="offset_ch2" type="kplo:offset_ch2" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="offset_ch3" type="kplo:offset_ch3" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="offset_ch4" type="kplo:offset_ch4" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="offset_ch5" type="kplo:offset_ch5" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="bias_spread" type="kplo:bias_spread" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="bias_spread_ch0" type="kplo:bias_spread_ch0" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="bias_spread_ch1" type="kplo:bias_spread_ch1" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="bias_spread_ch2" type="kplo:bias_spread_ch2" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="bias_spread_ch3" type="kplo:bias_spread_ch3" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="bias_spread_ch4" type="kplo:bias_spread_ch4" minOccurs="0" maxOccurs="1"> </xs:element>
      <xs:element name="bias_spread_ch5" type="kplo:bias_spread_ch5" minOccurs="0" maxOccurs="1"> </xs:element>
    </xs:sequence>
    <!-- Begin assert statements for schematron - Enumerated Values -->
    <!-- <xs:assert test="kplo:tdi_direction = ('A', 'B')"/> -->
    <!-- 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="bias_spread">
    <xs:annotation>
      <xs:documentation>Difference between the max and min bias 12-bit
        DN value for the whole 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="bias_spread_ch0">
    <xs:annotation>
      <xs:documentation>Difference between the max and min bias 12-bit
        DN value for channel 0.</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="bias_spread_ch1">
    <xs:annotation>
      <xs:documentation>Difference between the max and min bias 12-bit
        DN value for channel 1.</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="bias_spread_ch2">
    <xs:annotation>
      <xs:documentation>Difference between the max and min bias 12-bit
        DN value for channel 2.</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="bias_spread_ch3">
    <xs:annotation>
      <xs:documentation>Difference between the max and min bias 12-bit
        DN value for channel 3.</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="bias_spread_ch4">
    <xs:annotation>
      <xs:documentation>Difference between the max and min bias 12-bit
        DN value for channel 4.</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="bias_spread_ch5">
    <xs:annotation>
      <xs:documentation>Difference between the max and min bias 12-bit
        DN value for channel 5.</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="bit_selection">
    <xs:annotation>
      <xs:documentation>The ADC bit selection is for the used bit range
        flag. The value 0 is for bit range 11 ~ 0 and detectable range
        0~4095, the value 1 is for bit range 12 ~ 1 and detectable range
        0~8190, and the value 2 is for bit range 13 ~ 2 and detectable
        range 0~16380. </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="bterm1">
    <xs:annotation>
      <xs:documentation>ShadowCam companding bterm 1 (See appendix in
        the ShadowCam archive SIS for detailed companding
        information)</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="bterm2">
    <xs:annotation>
      <xs:documentation>ShadowCam companding bterm 2 (See appendix in
        the ShadowCam archive SIS for detailed companding
        information)</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="bterm3">
    <xs:annotation>
      <xs:documentation>ShadowCam companding bterm 3 (See appendix in
        the ShadowCam archive SIS for detailed companding
        information)</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="bterm4">
    <xs:annotation>
      <xs:documentation>ShadowCam companding bterm 4 (See appendix in
        the ShadowCam archive SIS for detailed companding
        information)</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="bterm5">
    <xs:annotation>
      <xs:documentation>ShadowCam companding bterm 5 (See appendix in
        the ShadowCam archive SIS for detailed companding
        information)</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="ccd_direction">
    <xs:annotation>
      <xs:documentation> The CCD direction parameter defines the
        direction of CCD reading. The value 0 is for the reading
        direction from 1st pixel to 2048th pixel (default) and the value
        1 is from the reading direction from 2048th pixel to 1st pixel.
        </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="data_quality_desc">
    <xs:annotation>
      <xs:documentation> Describes how to interpret the data_quality_id
        field. </xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Text_Collapsed">
     <xs:minLength value="1"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="data_quality_id">
    <xs:annotation>
      <xs:documentation> LROC-style data quality ID bitmask with minimal
        differences between ShadowCam and LROC definitions. See
        data_quality_desc for details. The individual boolean fields
        (dqi_*) are likely easier to use for new software.
        </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="dqi_corruption_detected">
    <xs:annotation>
      <xs:documentation> The corruption detection algorithm found a
        strong likelihood of image corruption somewhere in the
        observation. This is often localized to a small area, leaving
        most of the image usable. </xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Boolean">
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="dqi_fpa_out_of_bounds">
    <xs:annotation>
      <xs:documentation> The focal plane temperature was outside of the
        nominal operational limits. The calibration of the image is
        likely to not be as good in this case. </xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Boolean">
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="dqi_missing_data">
    <xs:annotation>
      <xs:documentation> One or more 1 MiB data blocks are missing from
        the image. Due to interleaving, this typically results in a
        pattern of 4 pixels present 4 pixels missing. </xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Boolean">
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="dqi_missing_spice">
    <xs:annotation>
      <xs:documentation> SPICE was unavailable for this observation.
        </xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Boolean">
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="dqi_uncalibratable">
    <xs:annotation>
      <xs:documentation> This observation could not be calibrated.
        </xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Boolean">
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="dqi_under_saturated">
    <xs:annotation>
      <xs:documentation> One or more 0 DN values are present in the
        companded 8-bit DN. </xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Boolean">
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="execution_spacecraft_time">
    <xs:annotation>
      <xs:documentation>The spacecraft time of when the image command
        was executed. Use this time with the SCLK kernel and add the
        start_time_offset value for the most accurate image start.
        </xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Short_String_Collapsed">
    	<xs:pattern value='([0-9]{1,2}/)?[0-9]{1,10}([:|.][0-9]{1,9})?'/>
     <xs:minLength value="1"/>
     <xs:maxLength value="255"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="execution_time">
    <xs:annotation>
      <xs:documentation>The UTC time and date at the execution of the
        image acquisition command. Add the start time offset to this
        time to get the start of the image data. Use the spacecraft
        clock version of the time with an SCLK kernel for the most
        accurate timing. </xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Date_Time_YMD">
  <!-- format="YYYY-MM-DDTHH:MM:SS.SSSSSS(Z)" -->
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="frame_id">
    <xs:annotation>
      <xs:documentation>Records if the image was LUTI A or
        B</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="gain_ch0">
    <xs:annotation>
      <xs:documentation> The analog front end gain for channel 0. See
        ShadowCam calibration paper for details on the gain correction.
        </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="gain_ch1">
    <xs:annotation>
      <xs:documentation> The analog front end gain for channel 1. See
        ShadowCam calibration paper for details on the gain correction.
        </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="gain_ch2">
    <xs:annotation>
      <xs:documentation> The analog front end gain for channel 2. See
        ShadowCam calibration paper for details on the gain correction.
        </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="gain_ch3">
    <xs:annotation>
      <xs:documentation> The analog front end gain for channel 3. See
        ShadowCam calibration paper for details on the gain correction.
        </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="gain_ch4">
    <xs:annotation>
      <xs:documentation> The analog front end gain for channel 4. See
        ShadowCam calibration paper for details on the gain correction.
        </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="gain_ch5">
    <xs:annotation>
      <xs:documentation> The analog front end gain for channel 4. See
        ShadowCam calibration paper for details on the gain correction.
        </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="klines">
    <xs:annotation>
      <xs:documentation> The number of 1024-line image chunks commanded
        (includes preroll). </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="line_integration_time_WO_Units">
    <xs:restriction base="pds:ASCII_Real">
     <xs:minInclusive value="-1.7976931348623157e308"/>
     <xs:maxInclusive value="1.7976931348623157e308"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="line_integration_time">
    <xs:annotation>
      <xs:documentation> The line integration time in milliseconds.
        </xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="kplo:line_integration_time_WO_Units">
        <xs:attribute name="unit" type="pds:Units_of_Time" use="required" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:simpleType name="line_rate_code">
    <xs:annotation>
      <xs:documentation> The TDI line rate code commanded. The line time
        in seconds can be computed from the commanded line rate using
        the expression 50e-9*(12*524+(lr*(38+1)+46)), where lr is
        thecommanded line rate (0-4095). </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="line_rate_ms_WO_Units">
    <xs:restriction base="pds:ASCII_Real">
     <xs:minInclusive value="-1.7976931348623157e308"/>
     <xs:maxInclusive value="1.7976931348623157e308"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="line_rate_ms">
    <xs:annotation>
      <xs:documentation> The TDI line rate in milliseconds, the
        effective exposure time is multiplied by 32 for the number of
        TDI stages. </xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="kplo:line_rate_ms_WO_Units">
        <xs:attribute name="unit" type="pds:Units_of_Time" use="required" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:simpleType name="luti_constant_time_offset_WO_Units">
    <xs:restriction base="pds:ASCII_Real">
     <xs:minInclusive value="-1.7976931348623157e308"/>
     <xs:maxInclusive value="1.7976931348623157e308"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="luti_constant_time_offset">
    <xs:annotation>
      <xs:documentation> Constant time offset for LUTI A or B in
        seconds. </xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="kplo:luti_constant_time_offset_WO_Units">
        <xs:attribute name="unit" type="pds:Units_of_Time" use="required" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:simpleType name="luti_quality_id">
    <xs:annotation>
      <xs:documentation> For LUTI, the quality ID represents the error
        status of the image. 0: No error, 1: CRC error, 2: CRC error +
        compression/decompression error. </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="luti_target_name">
    <xs:annotation>
      <xs:documentation> The luti target name indicates the name of
        target areas if it is available. If it is not, it will show NA.
        </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="luti_target_type">
    <xs:annotation>
      <xs:documentation> The luti target type is for LUTI target type
        such as MLND (Lunar surface, moon landing candidates), MMMO (man
        made objects), MCRT (lunar craters), MPIT (lunar pits), CGEO
        (calibration target for geocal), CDRK (dark), CLIM(lunar limb),
        LSLT (side slither), CSTA (star image), SERT (special targets
        for the earth), SPLT (planets), and SMS1 and SMS2 (special lunar
        surface image). </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="mission_phase_name">
    <xs:annotation>
      <xs:documentation> The mission_phase_name attribute provides the
        mission-defined name of a time period within the mission.
        </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="mode_test">
    <xs:annotation>
      <xs:documentation> The instrument was commanded in test mode,
        resulting in a gradient rather than image data.
        </xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Boolean">
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="offset_ch0">
    <xs:annotation>
      <xs:documentation> The analog front end offset for channel 0.
        </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="offset_ch1">
    <xs:annotation>
      <xs:documentation> The analog front end offset for channel 1.
        </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="offset_ch2">
    <xs:annotation>
      <xs:documentation> The analog front end offset for channel 2.
        </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="offset_ch3">
    <xs:annotation>
      <xs:documentation> The analog front end offset for channel 3.
        </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="offset_ch4">
    <xs:annotation>
      <xs:documentation> The analog front end offset for channel 4.
        </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="offset_ch5">
    <xs:annotation>
      <xs:documentation> The analog front end offset for channel 5.
        </xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Integer">
     <xs:minInclusive value="-9223372036854775808"/>
     <xs:maxInclusive value="9223372036854775807"/>
	   </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 the spacecraft around the Moon.
        </xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="pds:ASCII_Integer">
        <xs:attribute name="nilReason" type="pds:nil_reason" use="optional" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:simpleType name="pre_scan_mode_selection">
    <xs:annotation>
      <xs:documentation> The pre scan mode selection flag is set by
        ground command. Default value is 1. The value 0 is for disable
        of use of pre-scan pixel and the value 1 is to use averaged
        value of pre-scan pixel and the value 2 is to use constant
        offset value predefined. </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="preroll_lines">
    <xs:annotation>
      <xs:documentation> The number of image lines dropped to initialize
        the TDI sensor. Typically, this is a minimum of 256.
        </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="preroll_time">
    <xs:annotation>
      <xs:documentation>The UTC time and date at the start of the image
        acquisition, corresponding to the acquisition of preroll_lines
        at the given exposure prior to the actual image acquisition.
        </xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Date_Time_YMD">
  <!-- format="YYYY-MM-DDTHH:MM:SS.SSSSSS(Z)" -->
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="producer_institution_name">
    <xs:annotation>
      <xs:documentation>The producer_institution_name attribute
        identifies a university, research center, NASA center, or other
        institution associated with the production of a data product.
        </xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Short_String_Preserved">
     <xs:minLength value="1"/>
     <xs:maxLength value="255"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="product_version_id">
    <xs:annotation>
      <xs:documentation> A version specifier to differentiate how the
        data was processed. </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="rationale_desc">
    <xs:annotation>
      <xs:documentation> Any available commentary on the goal of the
        observation. This is created at planning time, and specific
        instrument and spacecraft performance may impact if the
        resulting image meets the original goal or not.
        </xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Text_Preserved">
     <xs:minLength value="1"/>
	   </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. </xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Short_String_Collapsed">
    	<xs:pattern value='([0-9]{1,2}/)?[0-9]{1,10}([:|.][0-9]{1,9})?'/>
     <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. </xs:documentation>
    </xs:annotation>
    <xs:restriction base="pds:ASCII_Short_String_Collapsed">
    	<xs:pattern value='([0-9]{1,2}/)?[0-9]{1,10}([:|.][0-9]{1,9})?'/>
     <xs:minLength value="1"/>
     <xs:maxLength value="255"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="start_time_offset_WO_Units">
    <xs:restriction base="pds:ASCII_Real">
     <xs:minInclusive value="-1.7976931348623157e308"/>
     <xs:maxInclusive value="1.7976931348623157e308"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="start_time_offset">
    <xs:annotation>
      <xs:documentation> The time in seconds after the execution time
        that the first image row started. Use this with
        execution_spacecraft_time and the KPLO SCLK kernel to get the
        best available start of the image data. </xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="kplo:start_time_offset_WO_Units">
        <xs:attribute name="unit" type="pds:Units_of_Time" use="required" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:simpleType name="tdi_direction">
    <xs:annotation>
      <xs:documentation> The TDI direction of the sensor (A or B). This
        must match the flight direction of the spacecraft except for
        calibration images. </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="temperature_fpa_a_WO_Units">
    <xs:restriction base="pds:ASCII_Real">
     <xs:minInclusive value="-1.7976931348623157e308"/>
     <xs:maxInclusive value="1.7976931348623157e308"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="temperature_fpa_a">
    <xs:annotation>
      <xs:documentation> The temperature of the ‘A’ sensor adjacent to
        the focal plane. This sensor is located on the heat strap going
        to the radiator and is the primary temperature used for
        calibration. </xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="kplo:temperature_fpa_a_WO_Units">
        <xs:attribute name="unit" type="pds:Units_of_Temperature" use="required" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:simpleType name="temperature_fpa_b_WO_Units">
    <xs:restriction base="pds:ASCII_Real">
     <xs:minInclusive value="-1.7976931348623157e308"/>
     <xs:maxInclusive value="1.7976931348623157e308"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="temperature_fpa_b">
    <xs:annotation>
      <xs:documentation> The temperature of the ‘B’ sensor adjacent to
        the focal plane. This sensor is on the opposite side of the TDI
        sensor from ‘A’, but is not on the copper strap.
        </xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="kplo:temperature_fpa_b_WO_Units">
        <xs:attribute name="unit" type="pds:Units_of_Temperature" use="required" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:simpleType name="temperature_fpga_WO_Units">
    <xs:restriction base="pds:ASCII_Real">
     <xs:minInclusive value="-1.7976931348623157e308"/>
     <xs:maxInclusive value="1.7976931348623157e308"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="temperature_fpga">
    <xs:annotation>
      <xs:documentation> The temperature reported on the electronics
        board adjacent to the FPGA. </xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="kplo:temperature_fpga_WO_Units">
        <xs:attribute name="unit" type="pds:Units_of_Temperature" use="required" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:simpleType name="temperature_telescope_WO_Units">
    <xs:restriction base="pds:ASCII_Real">
     <xs:minInclusive value="-1.7976931348623157e308"/>
     <xs:maxInclusive value="1.7976931348623157e308"/>
	   </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="temperature_telescope">
    <xs:annotation>
      <xs:documentation> The temperature reported from the metering
        structure of the telescope. </xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="kplo:temperature_telescope_WO_Units">
        <xs:attribute name="unit" type="pds:Units_of_Temperature" use="required" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:simpleType name="xterm0">
    <xs:annotation>
      <xs:documentation> ShadowCam companding xterm 0 (See appendix in
        the ShadowCam archive SIS for detailed companding information)
        </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="xterm1">
    <xs:annotation>
      <xs:documentation> ShadowCam companding xterm 1 (See appendix in
        the ShadowCam archive SIS for detailed companding information)
        </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="xterm2">
    <xs:annotation>
      <xs:documentation> ShadowCam companding xterm 2 (See appendix in
        the ShadowCam archive SIS for detailed companding information)
        </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="xterm3">
    <xs:annotation>
      <xs:documentation> ShadowCam companding xterm 3 (See appendix in
        the ShadowCam archive SIS for detailed companding information)
        </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="xterm4">
    <xs:annotation>
      <xs:documentation> ShadowCam companding xterm 4 (See appendix in
        the ShadowCam archive SIS for detailed companding information)
        </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:schema>
