Skip to content

Commit

Permalink
Hayabusa NIRS (#532)
Browse files Browse the repository at this point in the history
* Changed hirise comment

* Added NIRS driver

* added nirs test isd

* Added NIRS Tests

* added NIRS test kernels

* added NIRS changelog entry

* remove projection/geotransform in truth ISD
  • Loading branch information
jrcain-usgs authored May 26, 2023
1 parent 9cc9e60 commit 8aa3b10
Show file tree
Hide file tree
Showing 17 changed files with 10,141 additions and 5 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,5 @@ release.
- Msi IsisLabelNaifSpice Driver [#511](https://github.com/DOI-USGS/ale/pull/511)
- MGS MOC WAC IsisLabelNaifSpice driver, tests, and test data [#516](https://github.com/DOI-USGS/ale/pull/516)
- Chandrayaan1_mrffr IsisLabelNaifSpice driver, tests and test data [#519](https://github.com/DOI-USGS/ale/pull/519)
- MGS MOC Narrow Angle IsisLabelNaifSpice driver, tests, and test data [#517](https://github.com/DOI-USGS/ale/pull/517)
- MGS MOC Narrow Angle IsisLabelNaifSpice driver, tests, and test data [#517](https://github.com/DOI-USGS/ale/pull/517)
- Hayabusa NIRS IsisLabelNaifSpice driver, tests and test data [#532](https://github.com/DOI-USGS/ale/pull/532)
70 changes: 68 additions & 2 deletions ale/drivers/hayabusa_drivers.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import spiceypy as spice
from ale.base.data_naif import NaifSpice
from ale.base.label_isis import IsisLabel
from ale.base.type_sensor import Framer
Expand All @@ -22,7 +23,7 @@ def instrument_id(self):
@property
def sensor_model_version(self):
"""
The ISIS Sensor model number for HiRise in ISIS. This is likely just 1
The ISIS Sensor model number for Hayabusa Amica in ISIS. This is likely just 1
Returns
-------
Expand All @@ -41,4 +42,69 @@ def sensor_name(self):
: str
Name of the sensor
"""
return self.instrument_id
return self.instrument_id

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 Hayabusa Nirs 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 ephemeris_stop_time(self):
"""
Returns the exposure duration of the instrument
Returns
-------
: str
Exposure Duration
"""

return spice.scs2e(self.spacecraft_id, self.spacecraft_clock_stop_count)

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

return self.ephemeris_stop_time - self.ephemeris_start_time
151 changes: 151 additions & 0 deletions tests/pytests/data/2392975548_lvl3_0/2392975548_lvl3_0.ale_0.xsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
DAFETF NAIF DAF ENCODED TRANSFER FILE
'DAF/SPK '
'2'
'6'
'SPKMERGE '
BEGIN_ARRAY 1 33
'ITOKAWA '
'AC1FE9B5AB9B2^7'
'AC1FFCFB61E0C^7'
'1EE6B7'
'A'
'1'
'2'
33
'AC164C^7'
'2A3^5'
'-96164580E2F96^7'
'-98AFDA22EDFAC8^5'
'7F8792164BF8^4'
'8E57FFDE00C6^2'
'-23C2C8BC^0'
'-18BFAFA64^-1'
'-2E9FC^-3'
'-199848^-5'
'E^-7'
'3265DFC23373^7'
'-480F9DC9F93DDC^6'
'-2ACF5A5F69F^4'
'7ABC039D108^2'
'FE2237B8^0'
'CCCE755^-2'
'-11C8C^-3'
'-507E4^-5'
'-68^-7'
'1ACE10954DD2DE^7'
'-1FD5B586354A57^6'
'-16C533CA1634^4'
'3291BBCE2D5^2'
'7247BDBD8^0'
'66BB89F8^-2'
'-692A^-4'
'-231B4^-5'
'-28^-7'
'ABEC1C^7'
'546^5'
'1D^2'
'1^1'
END_ARRAY 1 33
BEGIN_ARRAY 2 16
'HAYABUSA Traj. by HJSC; with NAIF mods '
'AC1FE9B5AB9B2^7'
'AC1FFCFB61E0C^7'
'-82'
'1EE6B7'
'1'
'9'
16
'FD0D130C3E5CF8^1'
'-32CEAB825B452A^1'
'-1C8AE979EBDB0B^1'
'18997317907C75^-3'
'-11922DF762C049^-4'
'-DDCD8152470B9^-5'
'10C1B09DB1E9EB^2'
'-337AB8D362FE0C^1'
'-1D12A714AB578D^1'
'160C4781A00001^-3'
'-5E8A965C^-5'
'-74440DFD^-5'
'AC164E001A362^7'
'AC2018B41E4B28^7'
'1^1'
'2^1'
END_ARRAY 2 16
BEGIN_ARRAY 3 39
'DE-0403LE-0403 '
'AC1FE9B5AB9B2^7'
'AC1FFCFB61E0C^7'
'A'
'0'
'1'
'2'
39
'ACA9F4^7'
'A8C^5'
'95D530B0708338^5'
'-954848CD8FCCC8^3'
'-1237A4B9E50726^2'
'27BC5CD97A7B14^0'
'-A008B2350BB548^-2'
'-D2B620BE6E8188^-3'
'1CCEE01A24443C^-3'
'-2DD8F01365A4FA^-4'
'36287C4B50D55A^-5'
'-1FE65DFD04A91B^-6'
'-6A58460956428^-7'
'36DF7F7552069^5'
'1C5529660F3CE4^4'
'-A946527ED81378^1'
'9A0E242217DF6^-1'
'16FE20CDC8E56B^-1'
'-1292E9468DA1ED^-2'
'BAEA14DDB07C4^-4'
'6342B3BBC0991C^-5'
'-2DB7DC8B183E78^-5'
'628F2A73E43B98^-6'
'-B29DC397F7128^-7'
'1327760ADD39C3^5'
'C31C168F8BEC^3'
'-42418DABAB8A8^1'
'E630651E16D2E^-2'
'BD018994D52C78^-2'
'-878B623FBBAAB^-3'
'35FD3ECDACEEC2^-4'
'81103383568628^-5'
'-1E099CC4A97B08^-5'
'38632AEF23BA6^-6'
'-544DDE19114234^-7'
'AC0134^7'
'1518^6'
'23^2'
'1^1'
END_ARRAY 3 39
TOTAL_ARRAYS 3
~NAIF/SPC BEGIN COMMENTS~

; Created 2023-05-05/16:06:04.00.
;
; BEGIN SPKMERGE COMMANDS

LEAPSECONDS_KERNEL = ~/remotedata/isis_data/base/kernels/lsk/naif0012.tls

SPK_KERNEL = ~/data/isistestdata/hayabusa/nirs/out/2392975548_lvl3_0.ale_0.bsp
SOURCE_SPK_KERNEL = ~/remotedata/isis_data/hayabusa/kernels/tspk/sb_25143_140.bsp
INCLUDE_COMMENTS = NO
BODIES = 2025143
BEGIN_TIME = 2005 SEP 20 10:55:23.172
END_TIME = 2005 SEP 20 11:00:31.529
SOURCE_SPK_KERNEL = ~/remotedata/isis_data/hayabusa/kernels/spk/hay_osbj_050911_051118_v1n.bsp
INCLUDE_COMMENTS = NO
BODIES = -130
BEGIN_TIME = 2005 SEP 20 10:55:23.172
END_TIME = 2005 SEP 20 11:00:31.529
SOURCE_SPK_KERNEL = ~/remotedata/isis_data/hayabusa/kernels/tspk/de403s.bsp
INCLUDE_COMMENTS = NO
BODIES = 10
BEGIN_TIME = 2005 SEP 20 10:55:23.172
END_TIME = 2005 SEP 20 11:00:31.529

; END SPKMERGE COMMANDS
~NAIF/SPC END COMMENTS~
Loading

0 comments on commit 8aa3b10

Please sign in to comment.