<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_1B00.sch" schematypens="http://purl.oclc.org/dsdl/schematron"?>

<Product_Observational xmlns="http://pds.nasa.gov/pds4/pds/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_1B00.xsd">
    <Identification_Area>
      <logical_identifier>urn:nasa:pds:kaguya_grs_spectra:data_ephemerides:kgrs_ephemerides</logical_identifier>
      <version_id>1.0</version_id>
      <title>Kaguya Gamma-Ray Spectrometer Corrected Spectra</title>
      <information_model_version>1.11.0.0</information_model_version>
      <product_class>Product_Observational</product_class>
      <Modification_History>
        <Modification_Detail>
          <modification_date>2019-09-30</modification_date>
          <version_id>1.0</version_id>
          <description>First release.</description>
        </Modification_Detail>
      </Modification_History>
    </Identification_Area>
    <Observation_Area>
      <Time_Coordinates>
        <start_date_time>2007-12-14T04:15:35Z</start_date_time>
        <stop_date_time>2009-05-28T07:43:22Z</stop_date_time>
      </Time_Coordinates>
      <Primary_Result_Summary>
        <purpose>Science</purpose>
        <processing_level>Derived</processing_level>
        <description>
	  This document describes the methods used to calculate ephemerides, pointing, and geometry (EPG) 
	  data that accompany gamma-ray spectra acquired by the JAXA/SELENE (Kaguya) mission to the Moon. 
	  The data are part of the Kaguya gamma-ray spectrometer (KGRS) calibrated spectra archived at the 
	  Planetary Data System’s Geosciences Node. The EPG data file includes the position and orientation 
	  of the spacecraft in a fixed lunar reference frame along with the solid angle subtended by the 
	  Moon. The EPG data are needed for the following analysis tasks: selection of valid data (e.g. 
	  entries that meet pointing and altitude criteria), geometry/altitude corrections, and mapping. 
	  The methods used to determine the parameters recorded in the data set are described here. The 
	  energy-dependent, efficiency-area product of KGRS accompanies the EPG data in the label file. 
	  A description of the methods used to calculate the efficiency-area product and experimental 
	  validation is described.
        </description>
        </Primary_Result_Summary>
        <Investigation_Area>
          <name>Kaguya</name>
          <type>Mission</type>
          <Internal_Reference>
            <lid_reference>urn:nasa:pds:context:investigation:mission.kaguya</lid_reference>
            <reference_type>data_to_investigation</reference_type>
          </Internal_Reference>
        </Investigation_Area>
        <Observing_System>
          <name>Kaguya</name>
          <Observing_System_Component>
            <name>Kaguya</name>
            <type>Spacecraft</type>
            <Internal_Reference>
              <lid_reference>urn:nasa:pds:context:instrument_host:spacecraft.kaguya</lid_reference>
              <reference_type>is_instrument_host</reference_type>
            </Internal_Reference>
          </Observing_System_Component>
          <Observing_System_Component>
            <name>GRS</name>
            <type>Instrument</type>
            <Internal_Reference>
              <lid_reference>urn:nasa:pds:context:instrument:kaguya.grs</lid_reference>
              <reference_type>is_instrument</reference_type>
            </Internal_Reference>
          </Observing_System_Component>            
        </Observing_System>
        <Target_Identification>
          <name>Moon</name>
          <type>Satellite</type>
          <Internal_Reference>
            <lid_reference>urn:nasa:pds:context:target:satellite.earth.moon</lid_reference>
            <reference_type>collection_to_target</reference_type>
          </Internal_Reference>
        </Target_Identification>
    </Observation_Area>
    <Reference_List>
		<Internal_Reference>
			<lid_reference>urn:nasa:pds:kaguya_grs_spectra:document:kgrs_ephemerides_doc</lid_reference>
			<reference_type>data_to_document</reference_type>
		</Internal_Reference>
    </Reference_List>
    <File_Area_Observational>
      <File>
        <file_name>kgrs_ephemerides.csv</file_name>
        <creation_date_time>2019-08-22T00:00:00Z</creation_date_time>
      </File>
      <Table_Delimited>
        <offset unit="byte">0</offset>
        <parsing_standard_id>PDS DSV 1</parsing_standard_id>
        <description>
             This archive consists of three spectrum files (each corresponding to one KGRS epoch) and one unified
             EPG file. The spectrum files contain a time series of corrected and calibrated pulse height spectra
             acquired by KGRS's HPGe detector in the lunar orbit. In the spectrum files, each row contains the
             spacecraft clock (sclk) ticks and UTC time corresponding to the end of the accumulation interval
             (17 s), with the two sets of the 8192-channel HPGe spectra accumulated. In the EPG file, each row
             starts with sclk recorded at the end of the accumulation interval to match spacecraft positions,
             pointing, and correction factors with the corrected spectra. Note that the UTC time and ephemeris time
             included in the EPG file correspond to the midpoint of the accumulation interval.
        </description>
        <records>1333699</records>
	    <record_delimiter>Carriage-Return Line-Feed</record_delimiter>
	    <field_delimiter>Comma</field_delimiter>
        <Record_Delimited>
          <fields>11</fields>
          <groups>3</groups>
          <Field_Delimited>
            <name>sclk</name>
            <field_number>1</field_number>
            <data_type>ASCII_Integer</data_type>
            <unit>seconds</unit>
            <description>
	      Spacecraft clock (sclk) ticks at the end of the accumulation interval in seconds. The origin
	      of the sclk is Jan 6, 1980, 0:0:0. Each spectrum, scaler value, and ephemeris have a unique
	      sclk value, which can be used as an identifier. Kaguya's sclk is also known as a time index
	      (TI).
			</description>
          </Field_Delimited>
                  <Field_Delimited>
            <name>utc_mid</name>
            <field_number>2</field_number>
            <data_type>ASCII_String</data_type>
            <description>UTC time at the midpoint of the accumulation interval in seconds</description>
          </Field_Delimited>
                  <Field_Delimited>
            <name>et_mid</name>
            <field_number>3</field_number>
            <data_type>ASCII_Real</data_type>
                        <unit>seconds</unit>
            <description>Ephemeris time at the midpoint of the accumulation interval in seconds</description>
          </Field_Delimited>
                  <Group_Field_Delimited>
            <group_number>1</group_number>
            <repetitions>3</repetitions>
            <fields>1</fields>
            <groups>0</groups>
                    <Field_Delimited>
              <name>position</name>
              <field_number>1</field_number>
              <data_type>ASCII_Real</data_type>
                          <unit>kilometers</unit>
              <description>
		Spacecraft position (x, y, z) in km at the midpoint epoch time for each measurement in the 
		Mean Earth/Polar Axis (ME) fixed lunar reference frame
	      </description>
            </Field_Delimited>
          </Group_Field_Delimited>
                  <Field_Delimited>
            <name>body_center_distance</name>
            <field_number>4</field_number>
            <data_type>ASCII_Real</data_type>
                        <unit>kilometers</unit>
            <description>Distance from the spacecraft to body center in km</description>
          </Field_Delimited>
		  <Field_Delimited>
            <name>latitude</name>
            <field_number>5</field_number>
            <data_type>ASCII_Real</data_type>
		        <unit>degrees</unit>
            <description>Spacecraft latitude in degrees at the midpoint epoch time for each measurement</description>
          </Field_Delimited>
		  <Field_Delimited>
            <name>longitude</name>
            <field_number>6</field_number>
            <data_type>ASCII_Real</data_type>
		        <unit>degrees</unit>
            <description>Spacecraft longitude in degrees at the midpoint epoch time for each measurement</description>
          </Field_Delimited>
		  <Field_Delimited>
            <name>subsatellite_distance</name>
            <field_number>7</field_number>
            <data_type>ASCII_Real</data_type>
		        <unit>kilometers</unit>
            <description>Distance in km from the spacecraft to the shape model in the direction of body center</description>
          </Field_Delimited>
		  <Field_Delimited>
            <name>equivalent_altitude</name>
            <field_number>8</field_number>
            <data_type>ASCII_Real</data_type>
		        <unit>kilometers</unit>
            <description>
	      Equivalent altitude of the spacecraft in km for a sphere of the same volume as the Moon 
	      (with a radius, R of 1737.4 km) that gives the same SOLID_ANGLE as determined from the shape 
	      model: EQUIVALENT_ALTITUDE = R ( 1/ sqrt{ 1 - [ 1 - SOLID_ANGLE/(2*PI) ]^2} - 1)
	    </description>
          </Field_Delimited>
		  <Field_Delimited>
            <name>solid_angle</name>
            <field_number>9</field_number>
            <data_type>ASCII_Real</data_type>
		        <unit>steradian</unit>
            <description>Solid angle in sr subtended by the shape model at the spacecraft</description>
          </Field_Delimited>
		  <Field_Delimited>
            <name>solid_angle_uncertainty</name>
            <field_number>10</field_number>
            <data_type>ASCII_Real</data_type>
		        <unit>steradian</unit>
            <description>Monte Carlo statistical uncertainty in SOLID_ANGLE in sr</description>
          </Field_Delimited>
		  <Field_Delimited>
            <name>solid_angle_reference</name>
            <field_number>11</field_number>
            <data_type>ASCII_Real</data_type>
		        <unit>steradian</unit>
            <description>
	      Solid angle in sr subtended by the reference sphere (with a radius of 1737.4 km) at the 
	      spacecraft
	    </description>
          </Field_Delimited>
		  <Group_Field_Delimited>
            <group_number>2</group_number>
            <repetitions>3</repetitions>
            <fields>1</fields>
            <groups>0</groups>	  
		    <Field_Delimited>
              <name>pointing</name>
              <field_number>1</field_number>
              <data_type>ASCII_Real</data_type>
		          <unit>degrees</unit>
              <description>
		Cosines of the angles between the direction to body center in the instrument fixed frame
		and the x-, y-, and z-axes of the instrument coordinate system
	      </description>
            </Field_Delimited>
          </Group_Field_Delimited>
		  <Group_Field_Delimited>
            <group_number>3</group_number>
            <repetitions>5</repetitions>
            <fields>1</fields>
            <groups>0</groups>	  
		    <Field_Delimited>
              <name>instrument_response_function</name>
              <field_number>1</field_number>
              <data_type>ASCII_Real</data_type>
              <description>
                Coefficients for efficiency-area product (epsilon-A, in cm2), which is expressed as
                log(epsilon-A) = sum( c[i] x {log(E)}^i ), where i is the order of the fitted polynomial (0-4)
                and photon energy (E) has units of MeV.
	      </description>
            </Field_Delimited>
          </Group_Field_Delimited> 
        </Record_Delimited>
      </Table_Delimited>
    </File_Area_Observational>
</Product_Observational>
