<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<?xml-model href="https://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_1A10.sch"
  schematypens="http://purl.oclc.org/dsdl/schematron"?>
<?xml-model href="https://pds.nasa.gov/pds4/mission/mess/v1/PDS4_MESS_1B00_1020.sch"
  schematypens="http://purl.oclc.org/dsdl/schematron"?>

<Product_Observational xmlns="http://pds.nasa.gov/pds4/pds/v1" 
    xmlns:mess="http://pds.nasa.gov/pds4/mission/mess/v1" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://pds.nasa.gov/pds4/pds/v1 https://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_1A10.xsd   http://pds.nasa.gov/pds4/mission/mess/v1 https://pds.nasa.gov/pds4/mission/mess/v1/PDS4_MESS_1B00_1020.xsd">
  <Identification_Area>
    <logical_identifier>urn:nasa:pds:mess_grs_raw:data_edr:grs_adc2014246zzz_dat</logical_identifier>
    <version_id>1.0</version_id>
    <title>MESSENGER GRS FPGA ADC Diagnostic Information product: grs_adc2014246zzz_dat</title>
    <information_model_version>1.10.1.0</information_model_version>
    <product_class>Product_Observational</product_class>
    <Modification_History>
      <Modification_Detail>
        <modification_date>2018-06-08</modification_date>
        <version_id>1.0</version_id>
        <description>PDS4 migrated product</description>
      </Modification_Detail>
    </Modification_History>
  </Identification_Area>
  <Observation_Area>
    <Time_Coordinates>
      <start_date_time>2014-09-03T00:00:35.000Z</start_date_time>
      <stop_date_time>2014-09-03T23:59:35.000Z</stop_date_time>
    </Time_Coordinates>
    <Investigation_Area>
      <name>MESSENGER</name>
      <type>Mission</type>
      <Internal_Reference>
        <lid_reference>urn:nasa:pds:context:investigation:mission.messenger</lid_reference>
        <reference_type>data_to_investigation</reference_type>
      </Internal_Reference>
    </Investigation_Area>
    <Observing_System>
      <Observing_System_Component>
        <name>MESSENGER</name>
        <type>Spacecraft</type>
        <Internal_Reference>
          <lid_reference>urn:nasa:pds:context:instrument_host:spacecraft.mess</lid_reference>
          <reference_type>is_instrument_host</reference_type>
        </Internal_Reference>
      </Observing_System_Component>
      <Observing_System_Component>
        <name>Gamma Ray Spectrometer</name>
        <type>Instrument</type>
        <Internal_Reference>
          <lid_reference>urn:nasa:pds:context:instrument:grs.mess</lid_reference>
          <reference_type>is_instrument</reference_type>
        </Internal_Reference>
      </Observing_System_Component>
    </Observing_System>
    <Target_Identification>
      <name>Mercury</name>
      <type>Planet</type>
      <Internal_Reference>
        <lid_reference>urn:nasa:pds:context:target:planet.mercury</lid_reference>
        <reference_type>data_to_target</reference_type>
      </Internal_Reference>
    </Target_Identification>
    <Mission_Area>
      <mess:MESSENGER>
        <mess:mission_phase_name>Mercury Orbit Year 4</mess:mission_phase_name>
        <mess:spacecraft_clock_start_count>2/052026434</mess:spacecraft_clock_start_count>
        <mess:spacecraft_clock_stop_count>2/052112774</mess:spacecraft_clock_stop_count>
        <mess:standard_data_product_id>grs_fpga</mess:standard_data_product_id>
        <mess:software_name>pipe-grs2edr</mess:software_name>
        <mess:software_version_id>1.0</mess:software_version_id>
      </mess:MESSENGER>
    </Mission_Area>
  </Observation_Area>
  <File_Area_Observational>
    <File>
      <file_name>grs_adc2014246zzz.dat</file_name>
      <creation_date_time>2014-09-04T14:47:32Z</creation_date_time>
    </File>
    <Table_Binary>
      <offset unit="byte">0</offset>
      <records>1440</records>
      <description>
        This table contains one set of FPGA ADC diagnostic information gathered by
        the MESSENGER Gamma-Ray Spectrometer (GRS). A set is defined as all data
        with MET timestamps corresponding to a given Earth day.
        Additional details are contained in the EDR SIS document.
      </description>
      <Record_Binary>
        <fields>31</fields>
        <groups>0</groups>
        <record_length unit="byte">64</record_length>
        <Field_Binary>
          <name>met</name>
          <field_number>1</field_number>
          <field_location unit="byte">1</field_location>
          <data_type>UnsignedMSB4</data_type>
          <field_length unit="byte">4</field_length>
          <description>Mission elapsed time in seconds.</description>
        </Field_Binary>
        <Field_Binary>
          <name>orbit_number</name>
          <field_number>2</field_number>
          <field_location unit="byte">5</field_location>
          <data_type>UnsignedMSB2</data_type>
          <field_length unit="byte">2</field_length>
          <description>
            Orbit number is a unique identifier for a given orbit of
            the MESSENGER spacecraft around Mercury. Orbit number is defined as
            starting at apoherm and is calculated using the MET value and the
            appropriate SPICE kernels. Orbit numbering does not start until MESSENGER
            performs the Mercury orbit insertion. Until that time the value for orbit
            number is 0.
          </description>
        </Field_Binary>
        <Field_Binary>
          <name>power_register</name>
          <field_number>3</field_number>
          <field_location unit="byte">7</field_location>
          <data_type>UnsignedMSB2</data_type>
          <field_length unit="byte">2</field_length>
          <description>
            The 2-byte integer contains the following bit fields:
          
            Bits - Name - Description
            1 - ch1_latchup - ADC Channel 1 latchup. =0 no latchup. =1 latchup
            2 - ch0_latchup - ADC Channel 0 latchup. =0 no latchup. =1 latchup
            3 - pwr_ch1_inverted_adc - Channel 1 inverted power. =0 not inverted,
                                     =1 inverted
            4 - pwr_ch0_inverted_adc - Channel 0 inverted power. =0 not inverted,
                                     =1 inverted
            8 - fpga_reset_adc - Always reads 0. Write a 1 to reset FPGA
            9 - adc_ch2_clock - ADC Channel 2 clock. =0 off, =1 on
            10 - adc_ch1_clock - ADC Channel 1 clock. =0 off, =1 on
            11 - adc_ch0_clock - ADC Channel 0 clock. =0 off, =1 on
            12 - ch1_2_adc_power - Channel 1,2 ADC power. =0 power on, =1 power off
            13 - ch1_reset_latchup - Channel 1,2 reset latchup. =0 normal, 
                                 =1 reset latchup
            14 - ch0_adc_power - Channel 0 ADC Power, =0 power on, =1 power off
            15 - ch0_reset_latchup - Channel 0 reset latchup, =0 normal, =1 reset latchup
            16 - power_sleep_adc - =0 normal operation, =1 sleep mode
          </description>
        </Field_Binary>
        <Field_Binary>
          <name>tap_register</name>
          <field_number>4</field_number>
          <field_location unit="byte">9</field_location>
          <data_type>UnsignedMSB2</data_type>
          <field_length unit="byte">2</field_length>
          <description>
            The 2-byte integer contains the following bit fields:
          
            Bits - Name - Description
            3 - use_zc_or_max_for_coin - =0 use zc0-zc1 for coincidence. =1 use max0-max1
                                   for coincidence
            4 - ch0_prefilter_flag - Channel 0 prefilter flag. =0 bypass input filter, 
                                   =1 prefilter channel 0
            5 - dither_mode_setting - =0 Immediate dither, =1 synchronized dither
            6 - ch1_settle_retrig - Settling retriggered by Channel 1 trigger. 
                                  =0 true, =1 false
            7 - ch1_q_reset_disable_adc - Channel 1 charge reset does disable triggers. 
                                        =0 false, =1 true
            8 - ch0_q_reset_disable_adc - Channel 0 charge reset does disable triggers. 
                                        =0 false, =1 true
            9-12 - tap_ch1_adc - Channel 1 trigger tap
            13-16 - tap_ch0_adc - Channel 0 trigger tap
          </description>
        </Field_Binary>
        <Field_Binary>
          <name>ch0_trigger_threshold</name>
          <field_number>5</field_number>
          <field_location unit="byte">11</field_location>
          <data_type>SignedMSB2</data_type>
          <field_length unit="byte">2</field_length>
          <description>Channel 0 trigger threshold.</description>
        </Field_Binary>
        <Field_Binary>
          <name>ch1_trigger_threshold</name>
          <field_number>6</field_number>
          <field_location unit="byte">13</field_location>
          <data_type>SignedMSB2</data_type>
          <field_length unit="byte">2</field_length>
          <description>Channel 1 trigger threshold.</description>
        </Field_Binary>
        <Field_Binary>
          <name>ch0_window</name>
          <field_number>7</field_number>
          <field_location unit="byte">15</field_location>
          <data_type>UnsignedMSB2</data_type>
          <field_length unit="byte">2</field_length>
          <description>Channel 0 processing window.</description>
        </Field_Binary>
        <Field_Binary>
          <name>ch1_window</name>
          <field_number>8</field_number>
          <field_location unit="byte">17</field_location>
          <data_type>UnsignedMSB2</data_type>
          <field_length unit="byte">2</field_length>
          <description>Channel 1 processing window.</description>
        </Field_Binary>
        <Field_Binary>
          <name>settle_adc</name>
          <field_number>9</field_number>
          <field_location unit="byte">19</field_location>
          <data_type>UnsignedMSB2</data_type>
          <field_length unit="byte">2</field_length>
          <description>Settling time.</description>
        </Field_Binary>
        <Field_Binary>
          <name>dither_settle_adc</name>
          <field_number>10</field_number>
          <field_location unit="byte">21</field_location>
          <data_type>UnsignedMSB2</data_type>
          <field_length unit="byte">2</field_length>
          <description>Dither settling time.</description>
        </Field_Binary>
        <Field_Binary>
          <name>dither_dac_cmd</name>
          <field_number>11</field_number>
          <field_location unit="byte">23</field_location>
          <data_type>UnsignedMSB2</data_type>
          <field_length unit="byte">2</field_length>
          <description>Dither DAC command.</description>
        </Field_Binary>
        <Field_Binary>
          <name>gain_dac_cmd</name>
          <field_number>12</field_number>
          <field_location unit="byte">25</field_location>
          <data_type>UnsignedMSB2</data_type>
          <field_length unit="byte">2</field_length>
          <description>Gain DAC command.</description>
        </Field_Binary>
        <Field_Binary>
          <name>status_register</name>
          <field_number>13</field_number>
          <field_location unit="byte">27</field_location>
          <data_type>UnsignedMSB2</data_type>
          <field_length unit="byte">2</field_length>
          <description>
            This 2-byte integer contains the following bit fields:
          
            Bit - Name - Decription
            1 - event_pending - =0 No events pending. =1 Event pending in FIFO
            2 - reset_fifo_adc - Always reads 0. Write a 1 to reset buffer pointer logic
            11 - ch1_in_range - =0 Channel 1 in range, =1 channel 1 out of range
            12 - ch1_event_flag - =0 No channel 1 event occurred, =1 channel 1 event occurred
            13 - test_pulse - =0 Not a test pulse event, =1 Test pulse event
            14 - ch0_inverted_pulse - =0 Channel 0 is not an inverted pulse. =1 Inverted
                                    Channel 0 pulse event
            15 - ch0_in_range - =0 Channel 0 in range. =1 Channel 0 out of range
            16 - ch0_event_flag - =0 No channel 0 event occurred, =1 channel 0 event occurred
          </description>
        </Field_Binary>
        <Field_Binary>
          <name>trigger_per_sec_ch0</name>
          <field_number>14</field_number>
          <field_location unit="byte">29</field_location>
          <data_type>UnsignedMSB2</data_type>
          <field_length unit="byte">2</field_length>
          <description>Channel 0 number of triggers per second.</description>
        </Field_Binary>
        <Field_Binary>
          <name>event_max_ch0</name>
          <field_number>15</field_number>
          <field_location unit="byte">31</field_location>
          <data_type>SignedMSB2</data_type>
          <field_length unit="byte">2</field_length>
          <description>Channel 0 event max.</description>
        </Field_Binary>
        <Field_Binary>
          <name>event_min_ch0</name>
          <field_number>16</field_number>
          <field_location unit="byte">33</field_location>
          <data_type>SignedMSB2</data_type>
          <field_length unit="byte">2</field_length>
          <description>Channel 0 event min.</description>
        </Field_Binary>
        <Field_Binary>
          <name>event_peak_ch0</name>
          <field_number>17</field_number>
          <field_location unit="byte">35</field_location>
          <data_type>SignedMSB2</data_type>
          <field_length unit="byte">2</field_length>
          <description>Channel 0 event peak.</description>
        </Field_Binary>
        <Field_Binary>
          <name>trigger_per_sec_ch1</name>
          <field_number>18</field_number>
          <field_location unit="byte">37</field_location>
          <data_type>UnsignedMSB2</data_type>
          <field_length unit="byte">2</field_length>
          <description>Channel 1 number of triggers per second.</description>
        </Field_Binary>
        <Field_Binary>
          <name>event_max_ch1</name>
          <field_number>19</field_number>
          <field_location unit="byte">39</field_location>
          <data_type>SignedMSB2</data_type>
          <field_length unit="byte">2</field_length>
          <description>Channel 1 event max.</description>
        </Field_Binary>
        <Field_Binary>
          <name>event_min_ch1</name>
          <field_number>20</field_number>
          <field_location unit="byte">41</field_location>
          <data_type>SignedMSB2</data_type>
          <field_length unit="byte">2</field_length>
          <description>Channel 1 event min.</description>
        </Field_Binary>
        <Field_Binary>
          <name>event_peak_ch1</name>
          <field_number>21</field_number>
          <field_location unit="byte">43</field_location>
          <data_type>SignedMSB2</data_type>
          <field_length unit="byte">2</field_length>
          <description>Channel 1 event peak.</description>
        </Field_Binary>
        <Field_Binary>
          <name>delta_peak_time</name>
          <field_number>22</field_number>
          <field_location unit="byte">45</field_location>
          <data_type>SignedMSB2</data_type>
          <field_length unit="byte">2</field_length>
          <description>
            Time of channel 0 peak - time of channel 1 peak (100 ns lsb).
          </description>
        </Field_Binary>
        <Field_Binary>
          <name>dead_time_adc</name>
          <field_number>23</field_number>
          <field_location unit="byte">47</field_location>
          <data_type>UnsignedMSB2</data_type>
          <field_length unit="byte">2</field_length>
          <description>Dead time per second. (16 microseconds lsb).</description>
        </Field_Binary>
        <Field_Binary>
          <name>q_reset_adc</name>
          <field_number>24</field_number>
          <field_location unit="byte">49</field_location>
          <data_type>UnsignedMSB2</data_type>
          <field_length unit="byte">2</field_length>
          <description>Channel 0 (Ge) charge resets per second.</description>
        </Field_Binary>
        <Field_Binary>
          <name>pmt_reset_adc</name>
          <field_number>25</field_number>
          <field_location unit="byte">51</field_location>
          <data_type>UnsignedMSB2</data_type>
          <field_length unit="byte">2</field_length>
          <description>Channel 1 (PMT) charge resets per second.</description>
        </Field_Binary>
        <Field_Binary>
          <name>ch0_adc_test_port</name>
          <field_number>26</field_number>
          <field_location unit="byte">53</field_location>
          <data_type>SignedMSB2</data_type>
          <field_length unit="byte">2</field_length>
          <description>Channel 0 ADC test port. HPGe raw data for debugging.</description>
        </Field_Binary>
        <Field_Binary>
          <name>ch1_adc_test_port</name>
          <field_number>27</field_number>
          <field_location unit="byte">55</field_location>
          <data_type>SignedMSB2</data_type>
          <field_length unit="byte">2</field_length>
          <description>Channel 1 ADC test port. Shield raw data for debugging.</description>
        </Field_Binary>
        <Field_Binary>
          <name>ch2_adc_test_port</name>
          <field_number>28</field_number>
          <field_location unit="byte">57</field_location>
          <data_type>SignedMSB2</data_type>
          <field_length unit="byte">2</field_length>
          <description>
            Channel 2 ADC test port. Microphonics raw data (actual time series data).
          </description>
        </Field_Binary>
        <Field_Binary>
          <name>test_pulse_register</name>
          <field_number>29</field_number>
          <field_location unit="byte">59</field_location>
          <data_type>UnsignedMSB2</data_type>
          <field_length unit="byte">2</field_length>
          <description>
            This 2-byte integer contains the following bit fields:
          
            Bit 15 - test_pls_auto_cyc - Setting this bit will generate a 7.8 Hz pulse
            Bit 16 - test_pls_fire_adc - Any writing to this register will generate a 64
                                  microsecond active low pulse
          </description>
        </Field_Binary>
        <Field_Binary>
          <name>delta_ch0_max_min</name>
          <field_number>30</field_number>
          <field_location unit="byte">61</field_location>
          <data_type>UnsignedMSB2</data_type>
          <field_length unit="byte">2</field_length>
          <description>Time between Channel 0 max and Channel 0 min.</description>
        </Field_Binary>
        <Field_Binary>
          <name>diagnostic_adc</name>
          <field_number>31</field_number>
          <field_location unit="byte">63</field_location>
          <data_type>UnsignedMSB2</data_type>
          <field_length unit="byte">2</field_length>
          <description>Diagnostic register.</description>
        </Field_Binary>
      </Record_Binary>
    </Table_Binary>
  </File_Area_Observational>
  <File_Area_Observational_Supplemental>
    <File>
      <file_name>grs_adc2014246zzz.lbl</file_name>
    </File>
    <Stream_Text>
      <offset unit="byte">0</offset>
      <parsing_standard_id>PDS3</parsing_standard_id>
      <description>Original PDS3 label</description>
      <record_delimiter>Carriage-Return Line-Feed</record_delimiter>
    </Stream_Text>
  </File_Area_Observational_Supplemental>
</Product_Observational>
