<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_1L00.sch" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<?xml-model href="https://pds.nasa.gov/pds4/mission/vikinglander/v1/PDS4_VIKINGLANDER_1L00_1000.sch"  schematypens="http://purl.oclc.org/dsdl/schematron"?>

<Product_Ancillary xmlns="http://pds.nasa.gov/pds4/pds/v1" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xmlns:vikinglander="http://pds.nasa.gov/pds4/mission/vikinglander/v1"
  xsi:schemaLocation="http://pds.nasa.gov/pds4/pds/v1 https://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_1L00.xsd
  http://pds.nasa.gov/pds4/mission/vikinglander/v1 https://pds.nasa.gov/pds4/mission/vikinglander/v1/PDS4_VIKINGLANDER_1L00_1000.xsd">
  <Identification_Area>
    <logical_identifier>urn:nasa:pds:vl_image_raw:calib:gainoff</logical_identifier>
    <version_id>1.0</version_id>
    <title>Viking Lander Calibration File: gainoff</title>
    <information_model_version>1.21.0.0</information_model_version>
    <product_class>Product_Ancillary</product_class>
    <Modification_History>
      <Modification_Detail>
        <modification_date>2024-05-13</modification_date>
        <version_id>1.0</version_id>
        <description>Initial version.</description>
      </Modification_Detail>
    </Modification_History>
  </Identification_Area>
  <Context_Area>
    <Time_Coordinates>
      <start_date_time>1976-07-20Z</start_date_time>
      <stop_date_time>1982-11-05Z</stop_date_time>
    </Time_Coordinates>
    <Investigation_Area>
      <name>Viking</name>
      <type>Mission</type>
      <Internal_Reference>
        <lid_reference>urn:nasa:pds:context:investigation:mission.viking</lid_reference>
        <reference_type>ancillary_to_investigation</reference_type>
      </Internal_Reference>
    </Investigation_Area>
    <Observing_System>
      <Observing_System_Component>
        <name>Viking Lander 1</name>
        <type>Host</type>
        <Internal_Reference>
          <lid_reference>urn:nasa:pds:context:instrument_host:spacecraft.vl1</lid_reference>
          <reference_type>is_instrument_host</reference_type>
        </Internal_Reference>
      </Observing_System_Component>
      <Observing_System_Component>
        <name>Camera 1 for VL1</name>
        <type>Instrument</type>
        <Internal_Reference>
          <lid_reference>urn:nasa:pds:context:instrument:cam1.vl1</lid_reference>
          <reference_type>is_instrument</reference_type>
        </Internal_Reference>
      </Observing_System_Component>
      <Observing_System_Component>
        <name>Camera 2 for VL1</name>
        <type>Instrument</type>
        <Internal_Reference>
          <lid_reference>urn:nasa:pds:context:instrument:cam2.vl1</lid_reference>
          <reference_type>is_instrument</reference_type>
        </Internal_Reference>
      </Observing_System_Component>
    </Observing_System>
    <Observing_System>
      <Observing_System_Component>
        <name>Viking Lander 2</name>
        <type>Host</type>
        <Internal_Reference>
          <lid_reference>urn:nasa:pds:context:instrument_host:spacecraft.vl2</lid_reference>
          <reference_type>is_instrument_host</reference_type>
        </Internal_Reference>
      </Observing_System_Component>
      <Observing_System_Component>
        <name>Camera 1 for VL2</name>
        <type>Instrument</type>
        <Internal_Reference>
          <lid_reference>urn:nasa:pds:context:instrument:cam1.vl2</lid_reference>
          <reference_type>is_instrument</reference_type>
        </Internal_Reference>
      </Observing_System_Component>
      <Observing_System_Component>
        <name>Camera 2 for VL2</name>
        <type>Instrument</type>
        <Internal_Reference>
          <lid_reference>urn:nasa:pds:context:instrument:cam2.vl2</lid_reference>
          <reference_type>is_instrument</reference_type>
        </Internal_Reference>
      </Observing_System_Component>
    </Observing_System>
  </Context_Area>  
  <File_Area_Ancillary>
    <File>
      <file_name>gainoff.tab</file_name>
      <creation_date_time>1997-07-01</creation_date_time>
    </File>
    <Table_Character>
      <offset unit="byte">0</offset>
      <records>4</records>
      <description>The data in this table are used to compute the
        photosensor array output voltage from an image digital number
        (DN). The data are taken from Huck et al., Radiometric
        Performance of the Viking Mars Lander Cameras, NASA TM X-72692,
        1975. Voltage is computed as follows:
        
        v = (2**GN)*(DN/4)/Kg + K1*OFN - K2
        
        where v = voltage in units of volts, GN = gain number from the PDS
        image label, DN = digital number from the image, Kg = gain constant,
        K1 = offset constant 1, OFN = offset number from the PDS image
        label, and K2 = offset constant 2. The digital number is divided
        by 4 because the original data returned from the spacecraft were
        6-bits in length and then converted to 8-bits by multiplying by 4.
        The constants in this table vary by a small amount as a function of
        gain, offset, and temperature. These small variations are discussed in
        Wolf et al., Viking Lander Camera Radiometry Calibration Report, 
        JPL Pub. 77-62, 1977.</description>
      <record_delimiter>Carriage-Return Line-Feed</record_delimiter>
      <Record_Character>
        <fields>6</fields>
        <groups>0</groups>
        <record_length unit="byte">40</record_length>
        <Field_Character>
          <name>lander_number</name>
          <field_number>1</field_number>
          <field_location unit="byte">1</field_location>
          <data_type>ASCII_Integer</data_type>
          <field_length unit="byte">2</field_length>
          <description>The Viking Lander number, either 1 or 2.</description>
        </Field_Character>
        <Field_Character>
          <name>camera_number</name>
          <field_number>2</field_number>
          <field_location unit="byte">4</field_location>
          <data_type>ASCII_Integer</data_type>
          <field_length unit="byte">2</field_length>
          <description>The camera number on one of the Viking Landers,
            either 1 or 2.</description>
        </Field_Character>
        <Field_Character>
          <name>instrument_serial_number</name>
          <field_number>3</field_number>
          <field_location unit="byte">8</field_location>
          <data_type>ASCII_String</data_type>
          <field_length unit="byte">5</field_length>
          <description>The manufacturer's serial
            number assigned to an instrument. It is used to
            uniquely identify an instrument in tracing its
            components or determining its calibration history.</description>
        </Field_Character>
        <Field_Character>
          <name>gain_constant</name>
          <field_number>4</field_number>
          <field_location unit="byte">15</field_location>
          <data_type>ASCII_Real</data_type>
          <field_length unit="byte">8</field_length>
          <description>The value for Kg in the DN to voltage
            equation for Viking Lander image data.</description>
        </Field_Character>
        <Field_Character>
          <name>offset_constant_1</name>
          <field_number>5</field_number>
          <field_location unit="byte">24</field_location>
          <data_type>ASCII_Real</data_type>
          <field_length unit="byte">8</field_length>
          <description>The value for K1 in the DN to voltage 
            equation for Viking Lander image data.</description>
        </Field_Character>
        <Field_Character>
          <name>offset_constant_2</name>
          <field_number>6</field_number>
          <field_location unit="byte">33</field_location>
          <data_type>ASCII_Real</data_type>
          <field_length unit="byte">6</field_length>
          <description>The value for K2 in the DN to voltage
            equation for Viking Lander image data.</description>
        </Field_Character>
      </Record_Character>
    </Table_Character>
  </File_Area_Ancillary>
  <File_Area_Ancillary>
    <File>
      <file_name>gainoff.lbl</file_name>
    </File>
    <Stream_Text>
      <offset unit="byte">0</offset>
      <parsing_standard_id>PDS3</parsing_standard_id>
      <record_delimiter>Carriage-Return Line-Feed</record_delimiter>
    </Stream_Text>
  </File_Area_Ancillary>
</Product_Ancillary>
