Skip to content

Commit

Permalink
amica tests (load test fails), partial NIRS driver
Browse files Browse the repository at this point in the history
  • Loading branch information
jrcain-usgs committed Feb 16, 2023
1 parent c97d246 commit cca7b77
Show file tree
Hide file tree
Showing 20 changed files with 12,253 additions and 2,840 deletions.
84 changes: 81 additions & 3 deletions ale/drivers/hayabusa_drivers.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,34 @@
from ale.base.data_naif import NaifSpice
from ale.base.label_isis import IsisLabel
from ale.base.type_sensor import Framer
from ale.base.type_distortion import RadialDistortion
from ale.base.type_distortion import RadialDistortion, NoDistortion
from ale.base.base import Driver

class HayabusaAmicaIsisLabelNaifSpiceDriver(Framer, IsisLabel, NaifSpice, RadialDistortion, Driver):

@property
def instrument_id(self):
"""
Returns the ID of the instrument
Returns
-------
: str
Name of the instrument
"""
lookup_table = {'AMICA': 'HAYABUSA_AMICA'}
return lookup_table[super().instrument_id]

@property
def sensor_model_version(self):
"""
The ISIS Sensor model number for HiRise in ISIS. This is likely just 1
Returns
-------
: int
ISIS sensor model version
"""
return 1

@property
Expand All @@ -41,7 +57,7 @@ def spacecraft_clock_start_count(self):
: str
Spacecraft clock start count
"""
return self.label['IsisCube']['Instrument']['SpacecraftClockStartCount'].value
return str(self.label['IsisCube']['Instrument']['SpacecraftClockStartCount'].value)

@property
def spacecraft_clock_stop_count(self):
Expand All @@ -54,4 +70,66 @@ def spacecraft_clock_stop_count(self):
: str
Spacecraft clock stop count
"""
return self.label['IsisCube']['Instrument']['SpacecraftClockStopCount'].value
return str(self.label['IsisCube']['Instrument']['SpacecraftClockStopCount'].value)


class HayabusaNirsIsisLabelNaifSpiceDriver(Framer, IsisLabel, NaifSpice, NoDistortion, Driver):

@property
def instrument_id(self):
"""
Returns the ID of the instrument
Returns
-------
: str
Name of the instrument
"""
lookup_table = {'NIRS': 'HAYABUSA_NIRS'}
return lookup_table[super().instrument_id]

@property
def sensor_model_version(self):
"""
The ISIS Sensor model number for HiRise in ISIS. This is likely just 1
Returns
-------
: int
ISIS sensor model version
"""
return 1

@property
def sensor_name(self):
"""
Returns the name of the instrument
Returns
-------
: str
Name of the sensor
"""
return self.instrument_id

@property
def exposure_duration(self):
"""
Returns the exposure duration of the instrument
Returns
-------
: str
Exposure Duration
"""

"""
print("** DEBUG EXPOSURE DURATION **")
print("Total Integration Time: " + str(self.label['IsisCube']['Instrument']['TotalIntegrationTime']))
print("Ephemeris Start Time: " + str(self.ephemeris_start_time))
print("Start Time TIMOUT: " + str(spice.timout(self.ephemeris_start_time, "MON DD, YYYY HR:MN:SC.####", 65)))
ephemeris_stop_time = spice.scs2e(self.spacecraft_id, self.spacecraft_clock_stop_count)
print("Stop Time TIMOUT: " + str(spice.timout(ephemeris_stop_time, "MON DD, YYYY HR:MN:SC.####", 65)))
"""

return self.label['IsisCube']['Instrument']['TotalIntegrationTime'].value
Loading

0 comments on commit cca7b77

Please sign in to comment.