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
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ class IsisLabel():
            if isinstance(self._file, pvl.PVLModule):
                self._label = self._file
            grammar = pvl.grammar.ISISGrammar()
            grammar.comments+=(("#", "\n"), )
            try:
                self._label = pvl.loads(self._file, grammar=grammar)
            except Exception:
+16 −1
Original line number Diff line number Diff line
@@ -7,8 +7,10 @@ import pvl
import spiceypy as spice
from ale.base import Driver
from ale.base.data_naif import NaifSpice
from ale.base.data_isis import IsisSpice
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.rotation import ConstantRotation
@@ -325,3 +327,16 @@ class CassiniIssPds3LabelNaifSpiceDriver(Framer, Pds3Label, NaifSpice, RadialDis
                self._frame_chain.add_edge(rotation=rotation)

        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']
+4 −4
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@ from ale.base.data_naif import NaifSpice
from ale.base.label_pds3 import Pds3Label
from ale.base.label_isis import IsisLabel
from ale.base.type_sensor import Framer
from ale.base.type_distortion import NoDistortion
from ale.base.data_isis import IsisSpice

ID_LOOKUP = {
@@ -18,7 +19,7 @@ ID_LOOKUP = {
}


class MessengerMdisIsisLabelIsisSpiceDriver(Framer, IsisLabel, IsisSpice, Driver):
class MessengerMdisIsisLabelIsisSpiceDriver(Framer, IsisLabel, IsisSpice, NoDistortion, Driver):
    @property
    def spacecraft_name(self):
        """
@@ -72,8 +73,7 @@ class MessengerMdisIsisLabelIsisSpiceDriver(Framer, IsisLabel, IsisSpice, Driver
        return ID_LOOKUP[super().instrument_id]



class MessengerMdisPds3NaifSpiceDriver(Framer, Pds3Label, NaifSpice, Driver):
class MessengerMdisPds3NaifSpiceDriver(Framer, Pds3Label, NaifSpice, NoDistortion, Driver):
    """
    Driver for reading MDIS PDS3 labels. Requires a Spice mixin to acquire addtional
    ephemeris and instrument data located exclusively in spice kernels.
@@ -249,7 +249,7 @@ class MessengerMdisPds3NaifSpiceDriver(Framer, Pds3Label, NaifSpice, Driver):
        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
    into ISIS from PDS EDR images. Any SPCIE data attached by the spiceinit application
+15 −0
Original line number Diff line number Diff line
@@ -2,8 +2,10 @@ import spiceypy as spice

import ale
from ale.base.data_naif import NaifSpice
from ale.base.data_isis import IsisSpice
from ale.base.label_isis import IsisLabel
from ale.base.type_sensor import Framer
from ale.base.type_distortion import NoDistortion
from ale.base.base import Driver

class VikingIsisLabelNaifSpiceDriver(Framer, IsisLabel, NaifSpice, Driver):
@@ -80,3 +82,16 @@ class VikingIsisLabelNaifSpiceDriver(Framer, IsisLabel, NaifSpice, Driver):
        offset2 = 1.0 / 64.0 * 4.48

        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']