Skip to content
Snippets Groups Projects
Commit e3d720c1 authored by acpaquette's avatar acpaquette Committed by GitHub
Browse files

Revert "Minirf Fixes (#563)"

This reverts commit 695d3129.
parent 695d3129
No related branches found
No related tags found
No related merge requests found
...@@ -38,9 +38,6 @@ release. ...@@ -38,9 +38,6 @@ release.
### Added ### Added
- Mariner10 IsisLabelNaifSpice driver, tests, and test data [#547](https://github.com/DOI-USGS/ale/pull/547) - Mariner10 IsisLabelNaifSpice driver, tests, and test data [#547](https://github.com/DOI-USGS/ale/pull/547)
### Fixed
- Fixed LRO MiniRF drivers naif keywords focal to pixel and pixel to focal translations to be correct. [#563](https://github.com/DOI-USGS/ale/pull/563)
## [0.9.1] - 2023-06-05 ## [0.9.1] - 2023-06-05
### Changed ### Changed
......
...@@ -814,21 +814,19 @@ class LroMiniRfIsisLabelNaifSpiceDriver(Radar, NaifSpice, IsisLabel, Driver): ...@@ -814,21 +814,19 @@ class LroMiniRfIsisLabelNaifSpiceDriver(Radar, NaifSpice, IsisLabel, Driver):
: float : float
start time start time
""" """
return spice.str2et(self.utc_start_time.strftime("%Y-%m-%d %H:%M:%S.%f")) - self.line_exposure_duration return spice.str2et(self.utc_start_time.strftime("%Y-%m-%d %H:%M:%S.%f"))
@property @property
def ephemeris_stop_time(self): def ephemeris_stop_time(self):
""" """
Returns the stop ephemeris time for the image. This is computed from Returns the stop ephemeris time for the image.
the start time plus the line exposure per line, plus the line exposure
removed from the start time, plus the line exposure for the final line.
Returns Returns
------- -------
: float : float
stop time stop time
""" """
return self.ephemeris_start_time + (self.image_lines * self.line_exposure_duration) + (self.line_exposure_duration * 2) return spice.str2et(self.utc_stop_time.strftime("%Y-%m-%d %H:%M:%S.%f"))
@property @property
def look_direction(self): def look_direction(self):
...@@ -848,6 +846,7 @@ class LroMiniRfIsisLabelNaifSpiceDriver(Radar, NaifSpice, IsisLabel, Driver): ...@@ -848,6 +846,7 @@ class LroMiniRfIsisLabelNaifSpiceDriver(Radar, NaifSpice, IsisLabel, Driver):
Returns the Naif ID code for the sensor reference frame Returns the Naif ID code for the sensor reference frame
We replace this with the target frame ID because the sensor operates We replace this with the target frame ID because the sensor operates
entirely in the target reference frame entirely in the target reference frame
Returns Returns
------- -------
: int : int
...@@ -855,28 +854,7 @@ class LroMiniRfIsisLabelNaifSpiceDriver(Radar, NaifSpice, IsisLabel, Driver): ...@@ -855,28 +854,7 @@ class LroMiniRfIsisLabelNaifSpiceDriver(Radar, NaifSpice, IsisLabel, Driver):
""" """
return self.target_frame_id return self.target_frame_id
@property
def naif_keywords(self):
"""
Adds the correct TRANSX/Y and ITRANS/L values for use in ISIS. By default
these values are placeholders in the ISIS iaks and need to be computed manully
from the ground range resolution. See RadarGroundRangeMap.cpp in ISIS for
the calculations.
Returns
-------
: dict
An updated dictionary of NAIF keywords with the correct TRANSX/Y and ITRANSS/L
values computed
"""
naif_keywords = super().naif_keywords
ground_range_resolution = self.label['IsisCube']['Instrument']["ScaledPixelHeight"]
icode = "INS" + str(self.ikid)
naif_keywords[icode + "_TRANSX"] = [-1.0 * ground_range_resolution, ground_range_resolution, 0.0]
naif_keywords[icode + "_TRANSY"] = [0.0, 0.0, 0.0]
naif_keywords[icode + "_ITRANSS"] = [1.0, 1.0 / ground_range_resolution, 0.0]
naif_keywords[icode + "_ITRANSL"] = [0.0, 0.0, 0.0]
return naif_keywords
class LroLrocWacIsisLabelIsisSpiceDriver(PushFrame, IsisLabel, IsisSpice, RadialDistortion, Driver): class LroLrocWacIsisLabelIsisSpiceDriver(PushFrame, IsisLabel, IsisSpice, RadialDistortion, Driver):
@property @property
......
Source diff could not be displayed: it is too large. Options to address this: view the blob.
...@@ -261,20 +261,12 @@ class test_miniRf(unittest.TestCase): ...@@ -261,20 +261,12 @@ class test_miniRf(unittest.TestCase):
def test_ephmeris_start_time(self): def test_ephmeris_start_time(self):
with patch('ale.drivers.lro_drivers.spice.str2et', return_value=12345) as str2et: with patch('ale.drivers.lro_drivers.spice.str2et', return_value=12345) as str2et:
assert self.driver.ephemeris_start_time == 12344.995295578527 assert self.driver.ephemeris_start_time == 12345
def test_ephmeris_stop_time(self): def test_ephmeris_stop_time(self):
with patch('ale.drivers.lro_drivers.spice.str2et', return_value=12345) as str2et: with patch('ale.drivers.lro_drivers.spice.str2et', return_value=12345) as str2et:
assert self.driver.ephemeris_stop_time == 12348.297799453276 assert self.driver.ephemeris_stop_time == 12345
@patch('ale.base.data_naif.NaifSpice.naif_keywords', new_callable=PropertyMock, return_value={})
def test_naif_keywords(self, naif_keywords):
with patch("ale.base.data_naif.spice.bods2c", return_value=12345) as bods2c:
print(self.driver.naif_keywords["INS12345_ITRANSL"])
np.testing.assert_array_almost_equal(self.driver.naif_keywords["INS12345_ITRANSL"], [0.0, 0.0, 0.0])
np.testing.assert_array_almost_equal(self.driver.naif_keywords["INS12345_ITRANSS"], [1.0, 0.13333333333333, 0])
np.testing.assert_array_almost_equal(self.driver.naif_keywords["INS12345_TRANSX"], [-7.5, 7.5, 0])
np.testing.assert_array_almost_equal(self.driver.naif_keywords["INS12345_TRANSY"], [0, 0, 0])
# ========= Test WAC isislabel and naifspice driver ========= # ========= Test WAC isislabel and naifspice driver =========
class test_wac_isis_naif(unittest.TestCase): class test_wac_isis_naif(unittest.TestCase):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment