Skip to content
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
13 changes: 5 additions & 8 deletions oops/backplane/limb.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def limb_altitude(self, event_key, zmin=None, zmax=None, scaled=False):
radius = body.surface.radii.max()
if zmin is not None:
zmin = zmin * radius
if zmin is not None:
if zmax is not None:
zmax = zmax * radius

key = ('limb_altitude', event_key, zmin, zmax)
Expand Down Expand Up @@ -78,7 +78,7 @@ def _fill_limb_intercepts(self, event_key):
'squashed'), event.coord1)
self.register_backplane(('latitude', event_key, 'squashed'), event.coord2)
self.register_backplane(('limb_altitude', event_key, None, None),
event.coord3)
event.coord3)

#===============================================================================
def limb_longitude(self, event_key, reference='iau', direction='west',
Expand Down Expand Up @@ -170,6 +170,7 @@ def limb_clock_angle(self, event_key):
array.
"""

# Create the clock angle backplane
(event_key,
backplane_key) = self._event_and_backplane_keys(event_key, LIMB_BACKPLANES,
default='LIMB')
Expand All @@ -182,20 +183,16 @@ def limb_clock_angle(self, event_key):
if key in self.backplanes:
return self.get_backplane(key)

# Make sure the limb event is defined
default_key = ('limb_clock_angle', event_key)
if default_key not in self.backplanes:
self._fill_limb_intercepts(event_key)

surface = Backplane.get_surface(event_key[1])
event = self.get_surface_event(event_key)

polar_surface = PolarLimb(surface.ground, limits=surface.limits)
event = polar_surface.apply_coords_to_event(event, obs=self.obs_event,
axes=2,
derivs=self.ALL_DERIVS)
clock_angle = event.coord2

return self.register_backplane(key, event.coord2)
return self.register_backplane(key, clock_angle)

################################################################################

Expand Down
10 changes: 7 additions & 3 deletions oops/hosts/galileo/ssi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ def from_file(filespec,
label = pdsparser.Pds3Label(filespec).as_dict()

# Load the data array
local_path = filespec.retrieve()
vic = vicar.VicarImage.from_file(local_path)
vic = vicar.VicarImage.from_file(filespec)
vicar_dict = vic.as_dict()

# Get image metadata
Expand Down Expand Up @@ -210,6 +209,8 @@ def __init__(self, meta_dict):
self.target = meta_dict['TARGET_NAME']

# Telemetry mode
if 'TELEMETRY_FORMAT_ID' not in meta_dict:
meta_dict['TELEMETRY_FORMAT_ID'] = 'NONE'
self.mode = meta_dict['TELEMETRY_FORMAT_ID']

# Window
Expand Down Expand Up @@ -365,9 +366,12 @@ def initialize(planets=None, asof=None,
SSI.fovs['HCM'] = fov_full # Inference based on inspection
# hmmm, actually C0248807700R.img is 800x200
# maybe this is just a cropped full fov
SSI.fovs['NONE'] = fov_full # Inference based on inspection

# Construct the SpiceFrame
_ = oops.frame.SpiceFrame("GLL_SCAN_PLATFORM")
# SSI images are spaced as closely as 1 unit in the file name, which
# corresponds to 80 clock ticks. Therefore, we use a tolerance of +/-40
_ = oops.frame.SpiceType1Frame("GLL_SCAN_PLATFORM", -77, 40)

# Load kernels
Galileo.load_kernels()
Expand Down