Commit c82fbf0b authored by Jesse Mapel's avatar Jesse Mapel Committed by AustinSanders
Browse files

Adds simple light time correction (#219)

* Added light time property to data_naif

* Changed default to LT+S to match ISIS. Updated LRO to NONE
parent 5137b54f
Loading
Loading
Loading
Loading
+21 −2
Original line number Diff line number Diff line
@@ -26,6 +26,25 @@ class NaifSpice():
    def metakernel(self):
        pass

    @property
    def light_time_correction(self):
        """
        Returns the type of light time correciton and abberation correction to
        use in NAIF calls.

        This defaults to light time correction and abberation correction (LT+S),
        concrete drivers should override this if they need to either not use
        light time correction or use a different type of light time correction.

        Returns
        -------
        : str
          The light time and abberation correction string for use in NAIF calls.
          See https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/req/abcorr.html
          for the different options available.
        """
        return 'LT+S'

    @property
    def odtx(self):
        """
@@ -254,7 +273,7 @@ class NaifSpice():
        sun_state, _ = spice.spkezr("SUN",
                                     self.center_ephemeris_time,
                                     self.reference_frame,
                                     'NONE',
                                     self.light_time_correction,
                                     self.target_name)

        return [sun_state[:4].tolist()], [sun_state[3:6].tolist()], [self.center_ephemeris_time]
@@ -283,7 +302,7 @@ class NaifSpice():
                state, _ = spice.spkezr(self.spacecraft_name,
                                        time,
                                        self.reference_frame,
                                        'NONE',
                                        self.light_time_correction,
                                        self.target_name,)
                pos.append(state[:3])
                vel.append(state[3:])
+19 −0
Original line number Diff line number Diff line
@@ -142,3 +142,22 @@ class LroLrocPds3LabelNaifSpiceDriver(NaifSpice, Pds3Label, LineScanner, Driver)
          Radial distortion coefficients. There is only one coefficient for LROC NAC l/r
        """
        return spice.gdpool('INS{}_OD_K'.format(self.ikid), 0, 1).tolist()

    @property
    def light_time_correction(self):
        """
        Returns the type of light time correciton and abberation correction to
        use in NAIF calls.

        LROC is specifically set to not use light time correction because it is
        so close to the surface of the moon that light time correction to the
        center of the body is incorrect.

        Returns
        -------
        : str
          The light time and abberation correction string for use in NAIF calls.
          See https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/req/abcorr.html
          for the different options available.
        """
        return 'NONE'