From 6618a199aadfc103cc0f6371902302491e644e71 Mon Sep 17 00:00:00 2001 From: acpaquette Date: Mon, 4 Mar 2024 12:27:42 -0700 Subject: [PATCH] Lo fix (#593) * Fixed abberation correction setting in lo driver * Updated doc string * Updated tests to reflect driver changes * Added changelog entry --- CHANGELOG.md | 7 +------ ale/drivers/lo_drivers.py | 18 +++++++++++++++++- tests/pytests/data/isds/lohighcamera_isd.json | 12 ++++++------ tests/pytests/test_lo_drivers.py | 3 +++ 4 files changed, 27 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6aa47023b..4764ffd32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,7 @@ release. - Fixed landed sensors to correctly project locally [#590](https://github.com/DOI-USGS/ale/pull/590) - Fixed Hayabusa amica center time computation to match ISIS [#592](https://github.com/DOI-USGS/ale/pull/592) +- Set Lunar Oribter abberation correction to None as it is in ISIS [#593](https://github.com/DOI-USGS/ale/pull/593) ## [0.10.0] - 2024-01-08 @@ -94,9 +95,3 @@ release. - Chandrayaan1_mrffr IsisLabelNaifSpice driver, tests and test data [#519](https://github.com/DOI-USGS/ale/pull/519) - MGS MOC Narrow Angle IsisLabelNaifSpice driver, tests, and test data [#517](https://github.com/DOI-USGS/ale/pull/517) - Hayabusa NIRS IsisLabelNaifSpice driver, tests and test data [#532](https://github.com/DOI-USGS/ale/pull/532) -<<<<<<< HEAD - - - -======= ->>>>>>> 2c73f7da6ab8efbe056fff9c160e4458fec2f982 diff --git a/ale/drivers/lo_drivers.py b/ale/drivers/lo_drivers.py index 7150982c6..20335059c 100644 --- a/ale/drivers/lo_drivers.py +++ b/ale/drivers/lo_drivers.py @@ -133,7 +133,23 @@ def focal2pixel_samples(self): @property def focal2pixel_lines(self): return self.naif_keywords[f"INS{self.ikid}_ITRANSL"] - + + @property + def light_time_correction(self): + """ + Returns the type of light time correction and abberation correction to + use in NAIF calls. + + ISIS has set this to NONE for all Lunar Orbitor data + + 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' @property def naif_keywords(self): diff --git a/tests/pytests/data/isds/lohighcamera_isd.json b/tests/pytests/data/isds/lohighcamera_isd.json index d5a1e36d1..21adbdc04 100644 --- a/tests/pytests/data/isds/lohighcamera_isd.json +++ b/tests/pytests/data/isds/lohighcamera_isd.json @@ -272,16 +272,16 @@ ], "positions": [ [ - -202.57206189209032, - -1605.7463485204432, - -747.2111184246384 + -202.58035757681012, + -1605.896036328766, + -747.2850588815566 ] ], "velocities": [ [ - 1.7869560397439908, - 0.0574339083382552, - -0.6936285545554077 + 1.7876792439637956, + 0.057532310037451954, + -0.6938631425196607 ] ], "reference_frame": 1 diff --git a/tests/pytests/test_lo_drivers.py b/tests/pytests/test_lo_drivers.py index 50010ad76..0aa4da4a2 100644 --- a/tests/pytests/test_lo_drivers.py +++ b/tests/pytests/test_lo_drivers.py @@ -97,6 +97,9 @@ def test_focal2pixel_lines(self): ] namfrm.assert_called_with("LO3_HIGH_RESOLUTION_CAMERA") + def test_light_time_correction(self): + self.driver.light_time_correction == "NONE" + def test_naif_keywords(self): with patch('ale.drivers.lo_drivers.LoHighCameraIsisLabelNaifSpiceDriver.ikid', new_callable=PropertyMock) as ikid, \ patch('ale.base.data_naif.spice.bodvrd', return_value=[1737.4, 1737.4, 1737.4]) as bodvrd: