Skip to content

Commit

Permalink
Hayabusa amica Ephemeris Fix (#592)
Browse files Browse the repository at this point in the history
* Fixed hayabusa ephemeris times

* Updated function doc string

* Added test for new property

* added changelog entry
  • Loading branch information
acpaquette authored Mar 1, 2024
1 parent 1d786e1 commit c9656f6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ release.
### Fixed

- 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)

## [0.10.0] - 2024-01-08

Expand Down
12 changes: 12 additions & 0 deletions ale/drivers/hayabusa_drivers.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@ def instrument_id(self):
"""
lookup_table = {'AMICA': 'HAYABUSA_AMICA'}
return lookup_table[super().instrument_id]

@property
def center_ephemeris_time(self):
"""
Returns the start ephemeris time plus half the exposure duration.
Returns
-------
: double
Center ephemeris time for an image
"""
return self.ephemeris_start_time + self.exposure_duration / 2

@property
def sensor_model_version(self):
Expand Down
5 changes: 5 additions & 0 deletions tests/pytests/test_hayabusa_drivers.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ def setUp(self):

def test_instrument_id(self):
assert self.driver.instrument_id == "HAYABUSA_AMICA"

def test_center_ephemeris_time(self):
with patch('ale.drivers.hayabusa_drivers.spice.scs2e', return_value=12345) as scs2e:
assert self.driver.center_ephemeris_time == 12345 + 0.0109
scs2e.assert_called_with(-130, '2457499394')

def test_sensor_model_version(self):
assert self.driver.sensor_model_version == 1
Expand Down

0 comments on commit c9656f6

Please sign in to comment.