Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hayabusa amica Ephemeris Fix #592

Merged
merged 4 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading