From 09df8d2017556d0f1591f6745085cb9abb3cb678 Mon Sep 17 00:00:00 2001 From: acpaquette Date: Fri, 21 Oct 2022 11:05:08 -0700 Subject: [PATCH] Msl Focal2Pixel Fix (#492) * Fixed value order for focal2pixel_samples vector * Updated driver test --- ale/drivers/msl_drivers.py | 2 +- tests/pytests/test_msl_drivers.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ale/drivers/msl_drivers.py b/ale/drivers/msl_drivers.py index 25ef1d8..e826e56 100644 --- a/ale/drivers/msl_drivers.py +++ b/ale/drivers/msl_drivers.py @@ -105,7 +105,7 @@ class MslMastcamPds3NaifSpiceDriver(Cahvor, Framer, Pds3Label, NaifSpice, NoDist : list focal plane to detector samples """ - return [1/self.pixel_size, 0, 0] + return [0, 0, 1/self.pixel_size] @property def sensor_model_version(self): diff --git a/tests/pytests/test_msl_drivers.py b/tests/pytests/test_msl_drivers.py index 7b58c1a..986dbd2 100644 --- a/tests/pytests/test_msl_drivers.py +++ b/tests/pytests/test_msl_drivers.py @@ -43,6 +43,6 @@ class test_mastcam_pds_naif(unittest.TestCase): def test_focal2pixel_samples(self): with patch('ale.drivers.msl_drivers.spice.bods2c', new_callable=PropertyMock, return_value=-76220) as bods2c, \ patch('ale.drivers.msl_drivers.spice.gdpool', new_callable=PropertyMock, return_value=[100]) as gdpool: - np.testing.assert_allclose(self.driver.focal2pixel_samples, [137.96844341513602, 0, 0]) + np.testing.assert_allclose(self.driver.focal2pixel_samples, [0, 0, 137.96844341513602]) bods2c.assert_called_with('MSL_MASTCAM_RIGHT') gdpool.assert_called_with('INS-76220_FOCAL_LENGTH', 0, 1) -- GitLab