diff --git a/ale/drivers/selene_drivers.py b/ale/drivers/selene_drivers.py index aa5f6991f28994b374cc886c019f0b51eb5e7fd8..76c273ae1ca6124c3668454f33bfcfdebac446c9 100644 --- a/ale/drivers/selene_drivers.py +++ b/ale/drivers/selene_drivers.py @@ -298,6 +298,34 @@ class KaguyaTcPds3NaifSpiceDriver(LineScanner, Pds3Label, NaifSpice, Driver): """ return spice.gdpool('INS{}_DISTORTION_COEF_Y'.format(self.ikid), 0, 4).tolist() + @property + def boresight_x(self): + """ + Returns the x focal plane coordinate of the boresight. + Expects ikid to be defined. This should be the NAIF integer ID for the + sensor. + + Returns + ------- + : float + Boresight focal plane x coordinate + """ + return spice.gdpool('INS{}_BORESIGHT'.format(self.ikid), 0, 1)[0] + + @property + def boresight_y(self): + """ + Returns the y focal plane coordinate of the boresight. + Expects ikid to be defined. This should be the NAIF integer ID for the + sensor. + + Returns + ------- + : float + Boresight focal plane x coordinate + """ + return spice.gdpool('INS{}_BORESIGHT'.format(self.ikid), 1, 1)[0] + @property def line_exposure_duration(self): """ @@ -368,9 +396,11 @@ class KaguyaTcPds3NaifSpiceDriver(LineScanner, Pds3Label, NaifSpice, Driver): """ return { - "kaguyatc": { + "kaguyalism": { "x" : self._odkx, - "y" : self._odky + "y" : self._odky, + "boresight_x" : self.boresight_x, + "boresight_y" : self.boresight_y } } diff --git a/tests/pytests/test_kaguya_drivers.py b/tests/pytests/test_kaguya_drivers.py index a3577078b1e70f6c4de452e0cc9a5f0149bc12f5..9bdf7d422b1bdee80702d137f50afcba749f45e3 100644 --- a/tests/pytests/test_kaguya_drivers.py +++ b/tests/pytests/test_kaguya_drivers.py @@ -138,9 +138,11 @@ def test_load(test_kernels): 'focal2pixel_lines': [0, -142.85714285714286, 0], 'focal2pixel_samples': [0, 0, -142.85714285714286], 'optical_distortion': { - 'kaguyatc': { + 'kaguyalism': { 'x': [-0.0009649900000000001, 0.00098441, 8.5773e-06, -3.7438e-06], - 'y': [-0.0013796, 1.3502e-05, 2.7251e-06, -6.193800000000001e-06]}}, + 'y': [-0.0013796, 1.3502e-05, 2.7251e-06, -6.193800000000001e-06], + 'boresight_x' : -0.0725, + 'boresight_y' : 0.0214}}, 'image_lines': 400, 'image_samples': 3208, 'name_platform': 'SELENE-M',