<?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_scr2015114zzz_dat</logical_identifier>
    <version_id>1.0</version_id>
    <title>MESSENGER GRS Anti-Coincidence Shield product: grs_scr2015114zzz_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>2015-04-24T00:13:49.000Z</start_date_time>
      <stop_date_time>2015-04-24T23:45:48.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 5</mess:mission_phase_name>
        <mess:spacecraft_clock_start_count>2/072158419</mess:spacecraft_clock_start_count>
        <mess:spacecraft_clock_stop_count>2/072243138</mess:spacecraft_clock_stop_count>
        <mess:standard_data_product_id>grs_shield_counter</mess:standard_data_product_id>
        <mess:software_name>pipe-grs2edr</mess:software_name>
        <mess:software_version_id>1.1</mess:software_version_id>
        <mess:detector_id>acs</mess:detector_id>
      </mess:MESSENGER>
    </Mission_Area>
  </Observation_Area>
  <File_Area_Observational>
    <File>
      <file_name>grs_scr2015114zzz.dat</file_name>
      <creation_date_time>2015-04-27T04:49:28Z</creation_date_time>
    </File>
    <Table_Binary>
      <offset unit="byte">0</offset>
      <records>751</records>
      <description>
        This table contains one set of high-time-resolution count rate
        measurements in the GRS anti-coincidence shield. Each entry 
        contains a 16384-channel-long array that is populated with values 
        corresponding to the total number of events registered by the GRS 
        Anti-Coincidence Shield (ACS) in 10-ms-long increments. When the 
        accumulation period is insufficient to populate all 16384 
        channels, the remaining entries are assigned values of zero. When 
        the number of measurements exceeds 16384, the last channel records 
        the sum of all subsequent events. A set is defined as all data 
        with MET timestamps corresponding to a given day.
      </description>
      <Record_Binary>
        <fields>9</fields>
        <groups>1</groups>
        <record_length unit="byte">32792</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, corresponding to the 
            start of the accumulation period for the spectra.
          </description>
        </Field_Binary>
        <Field_Binary>
          <name>accum_time</name>
          <field_number>2</field_number>
          <field_location unit="byte">5</field_location>
          <data_type>UnsignedMSB4</data_type>
          <field_length unit="byte">4</field_length>
          <description>
            Accumulation time, in seconds, of the anti-coincidence shield detector.
          </description>
        </Field_Binary>
        <Field_Binary>
          <name>midpoint_met</name>
          <field_number>3</field_number>
          <field_location unit="byte">9</field_location>
          <data_type>UnsignedMSB4</data_type>
          <field_length unit="byte">4</field_length>
          <description>
            The mission elapsed time at the midpoint of the
            observation. Defined as:
            MET at the start of the observation +  (ACCUM_TIME / 2).
          </description>
        </Field_Binary>
        <Field_Binary>
          <name>orbit_number</name>
          <field_number>4</field_number>
          <field_location unit="byte">13</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>start_bin</name>
          <field_number>5</field_number>
          <field_location unit="byte">15</field_location>
          <data_type>UnsignedMSB2</data_type>
          <field_length unit="byte">2</field_length>
          <description>
            The bin containing first shield counter (starting from 
            zero). Nominally is zero.
          </description>
        </Field_Binary>
        <Field_Binary>
          <name>number_of_bins</name>
          <field_number>6</field_number>
          <field_location unit="byte">17</field_location>
          <data_type>UnsignedMSB2</data_type>
          <field_length unit="byte">2</field_length>
          <description>Number of bins in each science packet.</description>
        </Field_Binary>
        <Field_Binary>
          <name>grs_priority_level</name>
          <field_number>7</field_number>
          <field_location unit="byte">19</field_location>
          <data_type>UnsignedMSB2</data_type>
          <field_length unit="byte">2</field_length>
          <description>
            Indicates the type of priority assigned to the science
            packet. The priority level is tied to the ApID of the packet. Priority
            level varies from 0-3, 0 being highest and 3 being lowest priority.
          </description>
        </Field_Binary>
        <Field_Binary>
          <name>missing_data_packets</name>
          <field_number>8</field_number>
          <field_location unit="byte">21</field_location>
          <data_type>UnsignedMSB2</data_type>
          <field_length unit="byte">2</field_length>
          <description>
            The value represents a 16-bit binary number where each bit
            indicates whether a shield count rate telemetry packet is missing from 
            the EDR. Each GRS_SCR EDR consists of information extracted from 16 
            telemetry packets in a complete observation. The least significant bit is 
            a flag corresponding to the first of 16 packets and the most significant 
            bit is a flag corresponding to the 16th packet. A bit value of 1 
            indicates that a given packet is missing from the EDR. For example, a
            value of 0 in this column indicates that the spectra from all 16 packets
            have been downloaded and included in the count rate spectra for this EDR. 
            A value of 3 indicates that the count rate information from the first and
            second packets are missing and therefore channels 0-2047 should be discounted
            from analysis of the GRS_SCR spectra. A value of three or greater would
            indicate the EDR contains no valid data, since the count rates are only
            contained in the first 2000 channels.
          </description>
        </Field_Binary>
        <Field_Binary>
          <name>bad_data_flag</name>
          <field_number>9</field_number>
          <field_location unit="byte">23</field_location>
          <data_type>UnsignedMSB2</data_type>
          <field_length unit="byte">2</field_length>
          <description>
            Intended for use as a bit-string bad data flag to indicate
            specific problems associated with the data. Values are expected to be 
            assigned to specific bits as problems are identified during the course of
            the mission. Currently no values have been assigned and will default to a
            value of zero.
          </description>
        </Field_Binary>
        <Group_Field_Binary>
          <group_number>1</group_number>
          <repetitions>16384</repetitions>
          <fields>1</fields>
          <groups>0</groups>
          <group_location unit="byte">25</group_location>
          <group_length unit="byte">32768</group_length>
          <Field_Binary>
            <name>shield_count_spectra</name>
            <field_number>1</field_number>
            <field_location unit="byte">1</field_location>
            <data_type>UnsignedMSB2</data_type>
            <field_length unit="byte">2</field_length>
            <description>
              High-time-resolution counter of the total event rate in 
              the shield detector. Counter operates at a 10-ms cadence for the duration 
              of the accumulation period, resulting in a series of measurements that 
              populate the 16384 channel spectra. When fewer than 16384 channels are 
              required, the remainder are set to zero. When more than 16384 channels 
              are required, the last channel represents the sum of all measurements 
              made after the array is filled. For all cases, the first approximately 
              fifty channels are zero due to signal processing deadtime in the GRS 
              electronics. The use of a 16384-channel array is the result of a flight 
              software change to retask a defunct GRS packet into a shield rate counter 
              without changing the format of the packet itself.
            </description>
          </Field_Binary>
        </Group_Field_Binary>
      </Record_Binary>
    </Table_Binary>
  </File_Area_Observational>
  <File_Area_Observational_Supplemental>
    <File>
      <file_name>grs_scr2015114zzz.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>
