Skip to content

Commit

Permalink
Minirf Fixes (#563)
Browse files Browse the repository at this point in the history
* Fixes LRO minirf driver

* Reverted gitignore

* Reverted sensor_frame_id override

* Added naifkeyword test for minirf

* Added changelog entry

* Updated minirf json

* Lunar orbiter high camera (#553)

* skeleton class for LO

* lo center time and ikid

* detector center line/sample dummy values

* LO driver (processes cube w/o error)

* lo test data

* lunar orbiter tests

* removed old comment

* removed geotransform and projection from ISD

* Clementine LWIR, NIR, and HIRES Drivers (#565)

* Clementine Drivers

* Added missing kernels

* Combined to one driver

* Updated doc strings

* MSL Nadir Pointing (#564)

* Enabled nadir pointing in MSL/CAHVOR driver

* Removed commented out position changes

* Fix MSL test

* More msl fiddling

* Update for MSL Nadir pointing rotation in the cahvor mixin

* Fixed msl tests and added nadir test

* Updated ALE version in CmakeList.txt (#555)

* Ale Path Expansion Fixes (#551)

* Fixed expandvar function to expand paths completely

* Made expandvars fail if it can't expand a variable

* fixed typo

---------

Co-authored-by: Jacob Cain <[email protected]>
Co-authored-by: Amy Stamile <[email protected]>
Co-authored-by: Kelvin <[email protected]>
  • Loading branch information
4 people authored Sep 29, 2023
1 parent c041a59 commit 695d312
Show file tree
Hide file tree
Showing 4 changed files with 8,175 additions and 8,142 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ release.
## [Unreleased]

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

Expand Down
30 changes: 26 additions & 4 deletions ale/drivers/lro_drivers.py
Original file line number Diff line number Diff line change
Expand Up @@ -814,19 +814,21 @@ def ephemeris_start_time(self):
: float
start time
"""
return spice.str2et(self.utc_start_time.strftime("%Y-%m-%d %H:%M:%S.%f"))
return spice.str2et(self.utc_start_time.strftime("%Y-%m-%d %H:%M:%S.%f")) - self.line_exposure_duration

@property
def ephemeris_stop_time(self):
"""
Returns the stop ephemeris time for the image.
Returns the stop ephemeris time for the image. This is computed from
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
-------
: float
stop time
"""
return spice.str2et(self.utc_stop_time.strftime("%Y-%m-%d %H:%M:%S.%f"))
return self.ephemeris_start_time + (self.image_lines * self.line_exposure_duration) + (self.line_exposure_duration * 2)

@property
def look_direction(self):
Expand All @@ -846,15 +848,35 @@ def sensor_frame_id(self):
Returns the Naif ID code for the sensor reference frame
We replace this with the target frame ID because the sensor operates
entirely in the target reference frame
Returns
-------
: int
Naif ID code for the sensor frame
"""
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):
@property
Expand Down
Loading

0 comments on commit 695d312

Please sign in to comment.