Loading plio/data/data.db (56 KiB) File changed.No diff preview for this file type. View original file View changed file plio/examples/CTX/ctx.pvl 0 → 100644 +72 −0 Original line number Diff line number Diff line Object = IsisCube Object = Core StartByte = 65537 Format = Tile TileSamples = 1000 TileLines = 1024 Group = Dimensions Samples = 5000 Lines = 7168 Bands = 1 End_Group Group = Pixels Type = SignedWord ByteOrder = Lsb Base = 0.0 Multiplier = 1.0 End_Group End_Object Group = Instrument SpacecraftName = Mars_Reconnaissance_Orbiter InstrumentId = CTX TargetName = Mars MissionPhaseName = PSP StartTime = 2008-09-17T05:08:10.820 SpacecraftClockCount = 0906095311:038 OffsetModeId = 196/190/181 LineExposureDuration = 1.877 <MSEC> FocalPlaneTemperature = 293.4 <K> SampleBitModeId = SQROOT SpatialSumming = 1 SampleFirstPixel = 0 End_Group Group = Archive DataSetId = MRO-M-CTX-2-EDR-L0-V1.0 ProductId = B01_010045_1878_XN_07N205W ProducerId = MRO_CTX_TEAM ProductCreationTime = 2009-04-13T19:24:46 OrbitNumber = 10045 End_Group Group = BandBin FilterName = BroadBand Center = 0.65 <micrometers> Width = 0.15 <micrometers> End_Group Group = Kernels NaifFrameCode = -74021 LeapSecond = $base/kernels/lsk/naif0012.tls TargetAttitudeShape = $base/kernels/pck/pck00009.tpc TargetPosition = (Table, $base/kernels/spk/de405.bsp) InstrumentPointing = (Table, $mro/kernels/ck/mro_sc_psp_080916_080922.bc, $mro/kernels/fk/mro_v15.tf) Instrument = Null SpacecraftClock = $mro/kernels/sclk/MRO_SCLKSCET.00064.65536.tsc InstrumentPosition = (Table, $mro/kernels/spk/mro_psp8.bsp) InstrumentAddendum = $mro/kernels/iak/mroctxAddendum005.ti ShapeModel = $base/dems/molaMarsPlanetaryRadius0005.cub InstrumentPositionQuality = Reconstructed InstrumentPointingQuality = Reconstructed CameraVersion = 1 End_Group End_Object Object = Label Bytes = 65536 End_Object plio/io/io_db.py +4 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,10 @@ class Translations(Base): # pragma: no cover self.instrument = instrument self.translation = translation def __repr__(self): return 'Mission: {}\nInstrument: {}\nTranslation: {}'.format(self.mission, self.instrument, self.translation) class StringToMission(Base): # pragma: no cover """ Loading plio/io/isis_serial_number.py +1 −0 Original line number Diff line number Diff line Loading @@ -82,6 +82,7 @@ def generate_serial_number(label): # Sort the keys to ensure proper iteration order keys = sorted(translation.keys()) for k in keys: try: group = translation[k] Loading plio/io/tests/test_isis_serial_numbers.py +16 −9 Original line number Diff line number Diff line import os import sys import unittest from plio.examples import get_path sys.path.insert(0, os.path.abspath('..')) import pytest from plio.io import isis_serial_number from plio.examples import get_path @pytest.fixture def apollo_lbl(): return get_path('Test_PVL.lbl') class TestIsisSerials(unittest.TestCase): @pytest.fixture def ctx_lbl(): return get_path('ctx.pvl') def test_generate_serial_number(self): label = get_path('Test_PVL.lbl') @pytest.mark.parametrize("label, expected", [(apollo_lbl(), 'APOLLO15/METRIC/1971-07-31T14:02:27.179'), (ctx_lbl(),'MRO/CTX/0906095311:038') ]) def test_generate_serial_number(label, expected): serial = isis_serial_number.generate_serial_number(label) self.assertEqual('APOLLO15/METRIC/1971-07-31T14:02:27.179', serial) No newline at end of file assert serial == expected No newline at end of file Loading
plio/data/data.db (56 KiB) File changed.No diff preview for this file type. View original file View changed file
plio/examples/CTX/ctx.pvl 0 → 100644 +72 −0 Original line number Diff line number Diff line Object = IsisCube Object = Core StartByte = 65537 Format = Tile TileSamples = 1000 TileLines = 1024 Group = Dimensions Samples = 5000 Lines = 7168 Bands = 1 End_Group Group = Pixels Type = SignedWord ByteOrder = Lsb Base = 0.0 Multiplier = 1.0 End_Group End_Object Group = Instrument SpacecraftName = Mars_Reconnaissance_Orbiter InstrumentId = CTX TargetName = Mars MissionPhaseName = PSP StartTime = 2008-09-17T05:08:10.820 SpacecraftClockCount = 0906095311:038 OffsetModeId = 196/190/181 LineExposureDuration = 1.877 <MSEC> FocalPlaneTemperature = 293.4 <K> SampleBitModeId = SQROOT SpatialSumming = 1 SampleFirstPixel = 0 End_Group Group = Archive DataSetId = MRO-M-CTX-2-EDR-L0-V1.0 ProductId = B01_010045_1878_XN_07N205W ProducerId = MRO_CTX_TEAM ProductCreationTime = 2009-04-13T19:24:46 OrbitNumber = 10045 End_Group Group = BandBin FilterName = BroadBand Center = 0.65 <micrometers> Width = 0.15 <micrometers> End_Group Group = Kernels NaifFrameCode = -74021 LeapSecond = $base/kernels/lsk/naif0012.tls TargetAttitudeShape = $base/kernels/pck/pck00009.tpc TargetPosition = (Table, $base/kernels/spk/de405.bsp) InstrumentPointing = (Table, $mro/kernels/ck/mro_sc_psp_080916_080922.bc, $mro/kernels/fk/mro_v15.tf) Instrument = Null SpacecraftClock = $mro/kernels/sclk/MRO_SCLKSCET.00064.65536.tsc InstrumentPosition = (Table, $mro/kernels/spk/mro_psp8.bsp) InstrumentAddendum = $mro/kernels/iak/mroctxAddendum005.ti ShapeModel = $base/dems/molaMarsPlanetaryRadius0005.cub InstrumentPositionQuality = Reconstructed InstrumentPointingQuality = Reconstructed CameraVersion = 1 End_Group End_Object Object = Label Bytes = 65536 End_Object
plio/io/io_db.py +4 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,10 @@ class Translations(Base): # pragma: no cover self.instrument = instrument self.translation = translation def __repr__(self): return 'Mission: {}\nInstrument: {}\nTranslation: {}'.format(self.mission, self.instrument, self.translation) class StringToMission(Base): # pragma: no cover """ Loading
plio/io/isis_serial_number.py +1 −0 Original line number Diff line number Diff line Loading @@ -82,6 +82,7 @@ def generate_serial_number(label): # Sort the keys to ensure proper iteration order keys = sorted(translation.keys()) for k in keys: try: group = translation[k] Loading
plio/io/tests/test_isis_serial_numbers.py +16 −9 Original line number Diff line number Diff line import os import sys import unittest from plio.examples import get_path sys.path.insert(0, os.path.abspath('..')) import pytest from plio.io import isis_serial_number from plio.examples import get_path @pytest.fixture def apollo_lbl(): return get_path('Test_PVL.lbl') class TestIsisSerials(unittest.TestCase): @pytest.fixture def ctx_lbl(): return get_path('ctx.pvl') def test_generate_serial_number(self): label = get_path('Test_PVL.lbl') @pytest.mark.parametrize("label, expected", [(apollo_lbl(), 'APOLLO15/METRIC/1971-07-31T14:02:27.179'), (ctx_lbl(),'MRO/CTX/0906095311:038') ]) def test_generate_serial_number(label, expected): serial = isis_serial_number.generate_serial_number(label) self.assertEqual('APOLLO15/METRIC/1971-07-31T14:02:27.179', serial) No newline at end of file assert serial == expected No newline at end of file