Skip to content
Snippets Groups Projects
Commit d575b866 authored by Adam Paquette's avatar Adam Paquette Committed by Jesse Mapel
Browse files

Driver updates to get cassini, messenger, and viking working with isislabel isisspice data

parent 3b44dd96
No related branches found
No related tags found
No related merge requests found
...@@ -11,6 +11,7 @@ class IsisLabel(): ...@@ -11,6 +11,7 @@ class IsisLabel():
if isinstance(self._file, pvl.PVLModule): if isinstance(self._file, pvl.PVLModule):
self._label = self._file self._label = self._file
grammar = pvl.grammar.ISISGrammar() grammar = pvl.grammar.ISISGrammar()
grammar.comments+=(("#", "\n"), )
try: try:
self._label = pvl.loads(self._file, grammar=grammar) self._label = pvl.loads(self._file, grammar=grammar)
except Exception: except Exception:
......
...@@ -7,8 +7,10 @@ import pvl ...@@ -7,8 +7,10 @@ import pvl
import spiceypy as spice import spiceypy as spice
from ale.base import Driver from ale.base import Driver
from ale.base.data_naif import NaifSpice from ale.base.data_naif import NaifSpice
from ale.base.data_isis import IsisSpice
from ale.base.label_pds3 import Pds3Label from ale.base.label_pds3 import Pds3Label
from ale.base.type_distortion import RadialDistortion from ale.base.label_isis import IsisLabel
from ale.base.type_distortion import RadialDistortion, NoDistortion
from ale.base.type_sensor import Framer from ale.base.type_sensor import Framer
from ale.rotation import ConstantRotation from ale.rotation import ConstantRotation
...@@ -325,3 +327,16 @@ class CassiniIssPds3LabelNaifSpiceDriver(Framer, Pds3Label, NaifSpice, RadialDis ...@@ -325,3 +327,16 @@ class CassiniIssPds3LabelNaifSpiceDriver(Framer, Pds3Label, NaifSpice, RadialDis
self._frame_chain.add_edge(rotation=rotation) self._frame_chain.add_edge(rotation=rotation)
return self._frame_chain return self._frame_chain
class CassiniIssIsisLabelIsisSpiceDriver(Framer, IsisLabel, IsisSpice, NoDistortion, Driver):
@property
def sensor_name(self):
"""
Returns the name of the instrument
Returns
-------
: str
Name of the sensor
"""
return self.label['IsisCube']['Instrument']['SpacecraftName']
...@@ -10,6 +10,7 @@ from ale.base.data_naif import NaifSpice ...@@ -10,6 +10,7 @@ from ale.base.data_naif import NaifSpice
from ale.base.label_pds3 import Pds3Label from ale.base.label_pds3 import Pds3Label
from ale.base.label_isis import IsisLabel from ale.base.label_isis import IsisLabel
from ale.base.type_sensor import Framer from ale.base.type_sensor import Framer
from ale.base.type_distortion import NoDistortion
from ale.base.data_isis import IsisSpice from ale.base.data_isis import IsisSpice
ID_LOOKUP = { ID_LOOKUP = {
...@@ -18,7 +19,7 @@ ID_LOOKUP = { ...@@ -18,7 +19,7 @@ ID_LOOKUP = {
} }
class MessengerMdisIsisLabelIsisSpiceDriver(Framer, IsisLabel, IsisSpice, Driver): class MessengerMdisIsisLabelIsisSpiceDriver(Framer, IsisLabel, IsisSpice, NoDistortion, Driver):
@property @property
def spacecraft_name(self): def spacecraft_name(self):
""" """
...@@ -72,8 +73,7 @@ class MessengerMdisIsisLabelIsisSpiceDriver(Framer, IsisLabel, IsisSpice, Driver ...@@ -72,8 +73,7 @@ class MessengerMdisIsisLabelIsisSpiceDriver(Framer, IsisLabel, IsisSpice, Driver
return ID_LOOKUP[super().instrument_id] return ID_LOOKUP[super().instrument_id]
class MessengerMdisPds3NaifSpiceDriver(Framer, Pds3Label, NaifSpice, NoDistortion, Driver):
class MessengerMdisPds3NaifSpiceDriver(Framer, Pds3Label, NaifSpice, Driver):
""" """
Driver for reading MDIS PDS3 labels. Requires a Spice mixin to acquire addtional Driver for reading MDIS PDS3 labels. Requires a Spice mixin to acquire addtional
ephemeris and instrument data located exclusively in spice kernels. ephemeris and instrument data located exclusively in spice kernels.
...@@ -249,7 +249,7 @@ class MessengerMdisPds3NaifSpiceDriver(Framer, Pds3Label, NaifSpice, Driver): ...@@ -249,7 +249,7 @@ class MessengerMdisPds3NaifSpiceDriver(Framer, Pds3Label, NaifSpice, Driver):
return spice.gdpool('INS{}_PIXEL_PITCH'.format(self.ikid), 0, 1) return spice.gdpool('INS{}_PIXEL_PITCH'.format(self.ikid), 0, 1)
class MessengerMdisIsisLabelNaifSpiceDriver(IsisLabel, NaifSpice, Framer, Driver): class MessengerMdisIsisLabelNaifSpiceDriver(IsisLabel, NaifSpice, Framer, NoDistortion, Driver):
""" """
Driver for reading MDIS ISIS3 Labels. These are Labels that have been ingested Driver for reading MDIS ISIS3 Labels. These are Labels that have been ingested
into ISIS from PDS EDR images. Any SPCIE data attached by the spiceinit application into ISIS from PDS EDR images. Any SPCIE data attached by the spiceinit application
......
...@@ -2,8 +2,10 @@ import spiceypy as spice ...@@ -2,8 +2,10 @@ import spiceypy as spice
import ale import ale
from ale.base.data_naif import NaifSpice from ale.base.data_naif import NaifSpice
from ale.base.data_isis import IsisSpice
from ale.base.label_isis import IsisLabel from ale.base.label_isis import IsisLabel
from ale.base.type_sensor import Framer from ale.base.type_sensor import Framer
from ale.base.type_distortion import NoDistortion
from ale.base.base import Driver from ale.base.base import Driver
class VikingIsisLabelNaifSpiceDriver(Framer, IsisLabel, NaifSpice, Driver): class VikingIsisLabelNaifSpiceDriver(Framer, IsisLabel, NaifSpice, Driver):
...@@ -80,3 +82,16 @@ class VikingIsisLabelNaifSpiceDriver(Framer, IsisLabel, NaifSpice, Driver): ...@@ -80,3 +82,16 @@ class VikingIsisLabelNaifSpiceDriver(Framer, IsisLabel, NaifSpice, Driver):
offset2 = 1.0 / 64.0 * 4.48 offset2 = 1.0 / 64.0 * 4.48
return ephemeris_start_time + offset1 + offset2 return ephemeris_start_time + offset1 + offset2
class VikingIsisLabelIsisSpiceDriver(Framer, IsisLabel, IsisSpice, NoDistortion, Driver):
@property
def sensor_name(self):
"""
Returns the name of the instrument
Returns
-------
: str
Name of the sensor
"""
return self.label['IsisCube']['Instrument']['SpacecraftName']
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment