Skip to content
Snippets Groups Projects
Unverified Commit f45a876f authored by acpaquette's avatar acpaquette Committed by GitHub
Browse files

Chandrayaan Driver (#483)

* Initial IsisLabel NaifSpice Chandrayaan driver

* Added chandrayaan tests
parent 4f3b906d
Branches
Tags
No related merge requests found
Showing
with 12765 additions and 2 deletions
import spiceypy as spice
from ale.base import Driver
from ale.base.data_naif import NaifSpice
from ale.base.label_isis import IsisLabel
from ale.base.type_distortion import NoDistortion
from ale.base.type_sensor import LineScanner
class Chandrayaan1M3IsisLabelNaifSpiceDriver(LineScanner, IsisLabel, NaifSpice, NoDistortion, Driver):
@property
def instrument_id(self):
"""
Returns the instrument id for chandrayaan moon mineralogy mapper
Returns
-------
: str
Frame Reference for chandrayaan moon mineralogy mapper
"""
inst_id_lookup = {
"M3" : "CHANDRAYAAN-1_M3"
}
return inst_id_lookup[super().instrument_id]
@property
def ikid(self):
"""
Returns the ikid/frame code from the ISIS label. This is attached
via chan1m3 on ingestion into an ISIS cube
Returns
-------
: int
ikid for chandrayaan moon mineralogy mapper
"""
return spice.namfrm(self.instrument_id)
@property
def sensor_model_version(self):
"""
The ISIS Sensor model number for Chandrayaan1M3 in ISIS. This is likely just 1
Returns
-------
: int
ISIS sensor model version
"""
return 1
\ No newline at end of file
......@@ -275,7 +275,7 @@ def get_kernels_from_isis_pvl(kernel_group, expand=True, format_as="list"):
if not "DataDirectory" in isisprefs:
warnings.warn("No IsisPreferences file found, is your ISISROOT env var set?")
kernels = [expandvars(expandvars(k, dict_to_lower(isisprefs['DataDirectory']))) for k in kernels]
kernels = [expandvars(expandvars(k, isisprefs['DataDirectory'], case_sensitive=False)) for k in kernels]
# Ensure that the ISIS Addendum kernel is last in case it overrides
# some values from the default Instrument kernel
kernels = sorted(kernels, key=lambda x: "Addendum" in x)
......@@ -287,7 +287,7 @@ def get_kernels_from_isis_pvl(kernel_group, expand=True, format_as="list"):
for kern_list in mk_paths:
for index, kern in enumerate(mk_paths[kern_list]):
if kern is not None:
mk_paths[kern_list][index] = expandvars(expandvars(kern, dict_to_lower(isisprefs['DataDirectory'])))
mk_paths[kern_list][index] = expandvars(expandvars(kern, isisprefs['DataDirectory'], case_sensitive=False))
return mk_paths
else:
raise Exception(f'{format_as} is not a valid return format')
......
Object = IsisCube
Object = Core
StartByte = 65537
Format = Tile
TileSamples = 304
TileLines = 5
Group = Dimensions
Samples = 608
Lines = 5
Bands = 3
End_Group
Group = Pixels
Type = Real
ByteOrder = Lsb
Base = 0.0
Multiplier = 1.0
End_Group
End_Object
Group = Instrument
SpacecraftName = CHANDRAYAAN-1
MissionId = CH1
InstrumentHostName = "CHANDRAYAAN-1 ORBITER"
InstrumentHostId = CH1-ORB
InstrumentName = "MOON MINERALOGY MAPPER"
InstrumentId = M3
TargetName = MOON
MissionPhaseName = "PRIMARY MISSION"
StartTime = 2009-06-30T08:34:35.424411
StopTime = 2009-06-30T08:34:35.678811
SpacecraftClockStartCount = 12/1759056.764
SpacecraftClockStopCount = 12/1759057.019
OrbitNumber = 2804
InstrumentModeId = TARGET
SpatialSumming = 1
LineExposureDuration = 50.88
SpacecraftYawDirection = FORWARD
OrbitLimbDirection = ASCENDING
SampleDisplayDirection = UNKNOWN
LineDisplayDirection = UNKNOWN
ProductType = CALIBRATED_IMAGE
End_Group
Group = Archive
DataSetId = CH1-ORB-L-M3-4-L1B-RADIANCE-V3.0
ProducerInstitutionName = "JET PROPULSION LABORATORY"
ProductId = M3T20090630T083407_V03_RDN
SourceProductId = M3T20090630T083407_V01_L0.IMG
ProductType = CALIBRATED_IMAGE
ProductCreationTime = 2009-05-10T18:01:10
ProductVersionType = ACTUAL
ProductVersionId = 3.0
SoftwareName = m3t_l1b_v07.exe
SoftwareVersionId = 07
Description = "M3 Level 1B data product which contains pixel
located, radiometrically-calibrated data."
End_Group
Group = BandBin
Center = (446.02, 456.00, 465.98, 475.96, 485.95, 495.93, 505.91,
515.89, 525.87, 535.85, 545.83, 555.81, 565.79, 575.77,
585.76, 595.74, 605.72, 615.70, 625.68, 635.66, 645.64,
655.62, 665.60, 675.58, 685.56, 695.55, 705.53, 715.51,
725.49, 735.47, 745.45, 755.43, 765.41, 775.39, 785.37,
795.36, 805.34, 815.32, 825.30, 835.28, 845.26, 855.24,
865.22, 875.20, 885.18, 895.17, 905.15, 915.13, 925.11,
935.09, 945.07, 955.05, 965.03, 975.01, 984.99, 994.97,
1004.96, 1014.94, 1024.92, 1034.90, 1044.88, 1054.86,
1064.84, 1074.82, 1084.80, 1094.78, 1104.77, 1114.75,
1124.73, 1134.71, 1144.69, 1154.67, 1164.65, 1174.63,
1184.61, 1194.59, 1204.58, 1214.56, 1224.54, 1234.52,
1244.50, 1254.48, 1264.46, 1274.44, 1284.42, 1294.40,
1304.38, 1314.37, 1324.35, 1334.33, 1344.31, 1354.29,
1364.27, 1374.25, 1384.23, 1394.21, 1404.19, 1414.18,
1424.16, 1434.14, 1444.12, 1454.10, 1464.08, 1474.06,
1484.04, 1494.02, 1504.00, 1513.99, 1523.97, 1533.95,
1543.93, 1553.91, 1563.89, 1573.87, 1583.85, 1593.83,
1603.81, 1613.80, 1623.78, 1633.76, 1643.74, 1653.72,
1663.70, 1673.68, 1683.66, 1693.64, 1703.62, 1713.60,
1723.59, 1733.57, 1743.55, 1753.53, 1763.51, 1773.49,
1783.47, 1793.45, 1803.43, 1813.41, 1823.40, 1833.38,
1843.36, 1853.34, 1863.32, 1873.30, 1883.28, 1893.26,
1903.24, 1913.22, 1923.21, 1933.19, 1943.17, 1953.15,
1963.13, 1973.11, 1983.09, 1993.07, 2003.05, 2013.03,
2023.01, 2033.00, 2042.98, 2052.96, 2062.94, 2072.92,
2082.90, 2092.88, 2102.86, 2112.84, 2122.82, 2132.81,
2142.79, 2152.77, 2162.75, 2172.73, 2182.71, 2192.69,
2202.67, 2212.65, 2222.63, 2232.62, 2242.60, 2252.58,
2262.56, 2272.54, 2282.52, 2292.50, 2302.48, 2312.46,
2322.44, 2332.42, 2342.41, 2352.39, 2362.37, 2372.35,
2382.33, 2392.31, 2402.29, 2412.27, 2422.25, 2432.23,
2442.22, 2452.20, 2462.18, 2472.16, 2482.14, 2492.12,
2502.10, 2512.08, 2522.06, 2532.04, 2542.03, 2552.01,
2561.99, 2571.97, 2581.95, 2591.93, 2601.91, 2611.89,
2621.87, 2631.85, 2641.83, 2651.82, 2661.80, 2671.78,
2681.76, 2691.74, 2701.72, 2711.70, 2721.68, 2731.66,
2741.64, 2751.63, 2761.61, 2771.59, 2781.57, 2791.55,
2801.53, 2811.51, 2821.49, 2831.47, 2841.45, 2851.44,
2861.42, 2871.40, 2881.38, 2891.36, 2901.34, 2911.32,
2921.30, 2931.28, 2941.26, 2951.25, 2961.23, 2971.21,
2981.19, 2991.17)
Width = (12.31, 12.30, 12.30, 12.29, 12.29, 12.28, 12.28, 12.27,
12.27, 12.26, 12.26, 12.26, 12.25, 12.25, 12.25, 12.24,
12.24, 12.24, 12.24, 12.23, 12.23, 12.23, 12.23, 12.23,
12.22, 12.22, 12.22, 12.22, 12.22, 12.22, 12.22, 12.22,
12.22, 12.22, 12.22, 12.22, 12.22, 12.22, 12.22, 12.22,
12.22, 12.23, 12.23, 12.23, 12.23, 12.23, 12.23, 12.24,
12.24, 12.24, 12.24, 12.24, 12.25, 12.25, 12.25, 12.26,
12.26, 12.26, 12.26, 12.27, 12.27, 12.27, 12.28, 12.28,
12.29, 12.29, 12.29, 12.30, 12.30, 12.31, 12.31, 12.31,
12.32, 12.32, 12.33, 12.33, 12.34, 12.34, 12.35, 12.35,
12.36, 12.36, 12.37, 12.37, 12.38, 12.38, 12.39, 12.39,
12.40, 12.40, 12.41, 12.41, 12.42, 12.42, 12.43, 12.43,
12.44, 12.45, 12.45, 12.46, 12.46, 12.47, 12.47, 12.48,
12.48, 12.49, 12.50, 12.50, 12.51, 12.51, 12.52, 12.52,
12.53, 12.53, 12.54, 12.55, 12.55, 12.56, 12.56, 12.57,
12.57, 12.58, 12.58, 12.59, 12.59, 12.60, 12.60, 12.61,
12.61, 12.62, 12.62, 12.63, 12.63, 12.64, 12.64, 12.65,
12.65, 12.66, 12.66, 12.67, 12.67, 12.68, 12.68, 12.68,
12.69, 12.69, 12.70, 12.70, 12.70, 12.71, 12.71, 12.71,
12.72, 12.72, 12.72, 12.73, 12.73, 12.73, 12.74, 12.74,
12.74, 12.74, 12.75, 12.75, 12.75, 12.75, 12.76, 12.76,
12.76, 12.76, 12.76, 12.76, 12.76, 12.76, 12.77, 12.77,
12.77, 12.77, 12.77, 12.77, 12.77, 12.77, 12.77, 12.77,
12.77, 12.77, 12.76, 12.76, 12.76, 12.76, 12.76, 12.76,
12.75, 12.75, 12.75, 12.75, 12.74, 12.74, 12.74, 12.74,
12.73, 12.73, 12.72, 12.72, 12.72, 12.71, 12.71, 12.70,
12.70, 12.69, 12.69, 12.68, 12.67, 12.67, 12.66, 12.65,
12.65, 12.64, 12.63, 12.63, 12.62, 12.61, 12.60, 12.59,
12.58, 12.58, 12.57, 12.56, 12.55, 12.54, 12.53, 12.52,
12.51, 12.50, 12.48, 12.47, 12.46, 12.45, 12.44, 12.42,
12.41, 12.40, 12.38, 12.37, 12.36, 12.34, 12.33, 12.31,
12.30, 12.28, 12.27, 12.25, 12.23, 12.22, 12.20, 12.18)
FilterNumber = (5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107,
108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131,
132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155,
156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,
168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,
180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203,
204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215,
216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227,
228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251,
252, 253, 254, 255, 256, 257, 258, 259, 260)
OriginalBand = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129,
130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141,
142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153,
154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165,
166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189,
190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201,
202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213,
214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225,
226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237,
238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
250, 251, 252, 253, 254, 255, 256)
End_Group
Group = Kernels
NaifFrameCode = -86520
LeapSecond = $base/kernels/lsk/naif0012.tls
TargetAttitudeShape = ($base/kernels/pck/pck00009.tpc,
$chandrayaan1/kernels/pck/moon_080317.tf,
$chandrayaan1/kernels/pck/moon_assoc_me.tf)
TargetPosition = (Table,
$Chandrayaan1/kernels/tspk/moon_pa_de421_1900-
-2050.bpc,
$Chandrayaan1/kernels/tspk/de421.bsp)
InstrumentPointing = (Table,
$chandrayaan1/kernels/ck/M3T20090630T083407_V-
03_L1B_nadir-jig_2016-04-29.bc)
Instrument = Null
SpacecraftClock = $chandrayaan1/kernels/sclk/aig_ch1_sclk_compl-
ete_biased_m1p816.tsc
InstrumentPosition = (Table,
$chandrayaan1/kernels/spk/M3T20090630T083407_-
V03_L1B_nadir-jig_2016-04-29.bsp)
InstrumentAddendum = $chandrayaan1/kernels/iak/m3Addendum005.ti
ShapeModel = Null
InstrumentPositionQuality = Reconstructed
InstrumentPointingQuality = Reconstructed
CameraVersion = 1
Source = isis
End_Group
Group = RadiometricCalibration
Units = W/m2/um/sr
SolarDistance = 1.01711556761 <AU>
DetectorTemperature = 161.99
SpectralCalibrationFileName = M3T20070912_RDN_SPC.TAB
RadGainFactorFileName = M3T20070912_RDN_GAIN.TAB
GlobalBandpassFileName = M3T20070912_RDN_SPC.TAB
End_Group
End_Object
Object = Label
Bytes = 65536
End_Object
Object = Table
Name = UtcFile
StartByte = 117804
Bytes = 250
Records = 5
ByteOrder = Lsb
Group = Field
Name = LineNumber
Type = Integer
Size = 1
End_Group
Group = Field
Name = UtcTime
Type = Text
Size = 26
End_Group
Group = Field
Name = Year
Type = Text
Size = 4
End_Group
Group = Field
Name = Ddoy
Type = Text
Size = 16
End_Group
End_Object
Object = Table
Name = InstrumentPointing
StartByte = 121420
Bytes = 280
Records = 7
ByteOrder = Lsb
TimeDependentFrames = (-86000, 1)
ConstantFrames = (-86520, -86000)
ConstantRotation = (1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0)
CkTableStartTime = 299622941.60815
CkTableEndTime = 299622941.86255
CkTableOriginalSize = 6
FrameTypeCode = 3
Description = "Created by spiceinit"
Kernels = $chandrayaan1/kernels/ck/M3T20090630T083407_V03_L1B_n-
adir-jig_2016-04-29.bc
Group = Field
Name = J2000Q0
Type = Double
Size = 1
End_Group
Group = Field
Name = J2000Q1
Type = Double
Size = 1
End_Group
Group = Field
Name = J2000Q2
Type = Double
Size = 1
End_Group
Group = Field
Name = J2000Q3
Type = Double
Size = 1
End_Group
Group = Field
Name = ET
Type = Double
Size = 1
End_Group
End_Object
Object = Table
Name = InstrumentPosition
StartByte = 121700
Bytes = 168
Records = 3
ByteOrder = Lsb
CacheType = HermiteSpline
SpkTableStartTime = 299622941.60815
SpkTableEndTime = 299622941.86255
SpkTableOriginalSize = 6.0
Description = "Created by spiceinit"
Kernels = $chandrayaan1/kernels/spk/M3T20090630T083407_V03_L1B-
_nadir-jig_2016-04-29.bsp
Group = Field
Name = J2000X
Type = Double
Size = 1
End_Group
Group = Field
Name = J2000Y
Type = Double
Size = 1
End_Group
Group = Field
Name = J2000Z
Type = Double
Size = 1
End_Group
Group = Field
Name = J2000XV
Type = Double
Size = 1
End_Group
Group = Field
Name = J2000YV
Type = Double
Size = 1
End_Group
Group = Field
Name = J2000ZV
Type = Double
Size = 1
End_Group
Group = Field
Name = ET
Type = Double
Size = 1
End_Group
End_Object
Object = Table
Name = BodyRotation
StartByte = 126444
Bytes = 128
Records = 2
ByteOrder = Lsb
TimeDependentFrames = (31006, 1)
ConstantFrames = (31001, 31007, 31006)
ConstantRotation = (0.99999987325471, -3.29285422375571e-04,
3.80869618671387e-04, 3.29286000210947e-04,
0.99999994578431, -1.45444093783627e-06,
-3.80869119096078e-04, 1.57985578682691e-06,
0.99999992746811)
CkTableStartTime = 299622941.60815
CkTableEndTime = 299622941.86255
CkTableOriginalSize = 2
FrameTypeCode = 6
Description = "Created by spiceinit"
Kernels = ($Chandrayaan1/kernels/tspk/moon_pa_de421_1900-2050.b-
pc, $Chandrayaan1/kernels/tspk/de421.bsp,
$base/kernels/pck/pck00009.tpc,
$chandrayaan1/kernels/pck/moon_080317.tf,
$chandrayaan1/kernels/pck/moon_assoc_me.tf)
SolarLongitude = 156.75392732777
Group = Field
Name = J2000Q0
Type = Double
Size = 1
End_Group
Group = Field
Name = J2000Q1
Type = Double
Size = 1
End_Group
Group = Field
Name = J2000Q2
Type = Double
Size = 1
End_Group
Group = Field
Name = J2000Q3
Type = Double
Size = 1
End_Group
Group = Field
Name = AV1
Type = Double
Size = 1
End_Group
Group = Field
Name = AV2
Type = Double
Size = 1
End_Group
Group = Field
Name = AV3
Type = Double
Size = 1
End_Group
Group = Field
Name = ET
Type = Double
Size = 1
End_Group
End_Object
Object = Table
Name = SunPosition
StartByte = 132013
Bytes = 112
Records = 2
ByteOrder = Lsb
CacheType = Linear
SpkTableStartTime = 299622941.60815
SpkTableEndTime = 299622941.86255
SpkTableOriginalSize = 2.0
Description = "Created by spiceinit"
Kernels = ($Chandrayaan1/kernels/tspk/moon_pa_de421_1900-2050.-
bpc, $Chandrayaan1/kernels/tspk/de421.bsp)
Group = Field
Name = J2000X
Type = Double
Size = 1
End_Group
Group = Field
Name = J2000Y
Type = Double
Size = 1
End_Group
Group = Field
Name = J2000Z
Type = Double
Size = 1
End_Group
Group = Field
Name = J2000XV
Type = Double
Size = 1
End_Group
Group = Field
Name = J2000YV
Type = Double
Size = 1
End_Group
Group = Field
Name = J2000ZV
Type = Double
Size = 1
End_Group
Group = Field
Name = ET
Type = Double
Size = 1
End_Group
End_Object
Object = History
Name = IsisCube
StartByte = 132125
Bytes = 6290
End_Object
Object = OriginalLabel
Name = IsisCube
StartByte = 102017
Bytes = 15787
End_Object
Object = NaifKeywords
BODY_CODE = 301
BODY301_RADII = (1737.4, 1737.4, 1737.4)
BODY_FRAME_CODE = 31001
INS-86520_SWAP_OBSERVER_TARGET = TRUE
INS-86520_LIGHTTIME_CORRECTION = NONE
INS-86520_LT_SURFACE_CORRECT = TRUE
INS-86520_FOCAL_LENGTH = 39.63
INS-86520_PIXEL_PITCH = 0.027
CLOCK_ET_-86_12/1759056.764_COMPUTED = b7af9b1de2dbb141
INS-86520_TRANSX = (-0.64, -4.00552916405788e-05,
0.026999970288384)
INS-86520_TRANSY = (-0.052, -0.026999970288384,
-4.00552916405788e-05)
INS-86520_ITRANSS = (-1.9610889460164,
-0.054945530371164, -37.036996280362)
INS-86520_ITRANSL = (23.700820451852, 37.036996280362,
-0.054945530371164)
INS-86520_BORESIGHT_SAMPLE = 304.5
INS-86520_BORESIGHT_LINE = 0.0
INS-86520_PP = (0.0, 0.0)
INS-86520_OD_K = (3.79921103637315e-04,
2.13226448051461e-04,
-4.01862878758592e-08)
INS-86520_DECENTER = (0.004047, -5.0e-06)
End_Object
End
DAFETF NAIF DAF ENCODED TRANSFER FILE
'DAF/SPK '
'2'
'6'
'SPKMERGE '
BEGIN_ARRAY 1 45
'DE-0421LE-0421 '
'11DBDFAA0F64A6^8'
'11DBE09C712F66^8'
'12D'
'3'
'1'
'2'
45
'11DE0C4^8'
'2A3^5'
'-44C655EC7D4CE4^5'
'18737329B73619^5'
'38AB5F3AC33BB6^4'
'-3D791031631184^3'
'-2761D9F5B73A52^2'
'2B0823651F9A0E^1'
'-13390FF9CDD736^0'
'EA3EB1AAB55D18^-2'
'AE8E1E2D74E53^-3'
'-2976598D9FDCFC^-3'
'267073E0CCDB56^-4'
'-9034C4A66F41D^-6'
'-15F0CD6F81075A^-6'
'-322B4F150AD34^5'
'-1DBFCB3A501AEE^5'
'2840CD833A9032^4'
'37EDAFA5A6B50A^3'
'-347A5585D9B7E^2'
'-6FBF6D3135CF28^0'
'E8651D8325BD88^-1'
'-177C253615205A^-1'
'20FE7F65118FA6^-2'
'-C79802C00F862^-4'
'-16FD004FB86B43^-4'
'2730329338E7C6^-5'
'-2438F1587DBE58^-6'
'-1EA481376CF099^5'
'-C681D497CF0208^4'
'18BD823B34531B^4'
'15FE09A61FF9AE^3'
'-1D3C86CA4CDE03^2'
'5A9411DBCC54F4^-1'
'575ADB93F078C4^-1'
'-A3871F311F4F7^-2'
'111FA51DA46ABA^-2'
'-9C31918F08F808^-4'
'-7E3A8902B2D09^-5'
'126B5AF7D93081^-5'
'-13ADA15A18F077^-6'
'11DB694^8'
'546^5'
'29^2'
'1^1'
END_ARRAY 1 45
BEGIN_ARRAY 2 39
'DE-0421LE-0421 '
'11DBDFAA0F64A6^8'
'11DBE09C712F66^8'
'A'
'0'
'1'
'2'
39
'11E0AF4^8'
'A8C^5'
'-6FED0B1E876ADC^5'
'-1564C572FC4594^4'
'15F8AA1895B348^2'
'3F77EE92D55ECA^-1'
'-5920933C673B5C^-1'
'3BCB5332E7517E^-2'
'20182BC3CB807E^-2'
'C9B30B36BEB47^-4'
'-D35DB5FA13F1A8^-4'
'-14FCD966F60C8A^-4'
'4994491D44E77^-5'
'80D363A7D4A41^5'
'-13745A8A35EAC6^4'
'-11A367BCB53711^2'
'3F4F10946C49D4^0'
'-249D1C13B01A4E^-1'
'-AF82071D404138^-2'
'3A4AAF20E509B4^-3'
'4A819E0846410C^-3'
'41357B5874D384^-4'
'-1D498798AA3A1E^-4'
'-42B9386D319EC^-5'
'3771F277FA63A6^5'
'-7F5441CB636A^3'
'-82A3823E03CC5^1'
'20539465F88908^0'
'-B83C4DFF3DED7^-2'
'-63B96AB87EDC68^-2'
'-160399C01FFDEF^-3'
'267DBBAF3AE16^-3'
'38BF699C36D0A4^-4'
'-D6CFD3A4F85608^-5'
'-2B45F54F99FE3E^-5'
'11D6234^8'
'1518^6'
'23^2'
'1^1'
END_ARRAY 2 39
BEGIN_ARRAY 3 45
'DE-0421LE-0421 '
'11DBDFAA0F64A6^8'
'11DBE09C712F66^8'
'3'
'0'
'1'
'2'
45
'11E0AF4^8'
'A8C^5'
'1DADBEA52255F4^7'
'12D654C3DBEE5C^7'
'-22D54DA3A94FC8^5'
'-3A04290A86DDC6^4'
'3351AF92CD2C74^2'
'2D80F925EABEA^1'
'-18BBDA72665837^-1'
'-3BC1D99869476E^-3'
'213204D1200D22^-3'
'-1FDB3C9E7AD00A^-4'
'-317E71B7A0F936^-5'
'88858F0EF24CC^-6'
'-5028CA2578DBD8^-6'
'-8110C95F3F4A^7'
'3AD667FD616D^6'
'95E4B34ECE4928^5'
'-B6150B16915C58^3'
'-DB171C5DC446^2'
'8FE5639B6EA7C8^0'
'57BADCCFEA91E8^-1'
'12039D4CB1E22F^-2'
'-166F721090DA87^-3'
'-6E135F46227798^-4'
'FE1DDDCC42D208^-5'
'-147F896B6A1D7F^-5'
'3AD74E1265499C^-6'
'-37F4806D984DF^7'
'198236357C1A2C^6'
'40FB961ADBFE14^5'
'-4EEF68F29A486^3'
'-5EFB06AF436F4C^2'
'3E64E955F03A8C^0'
'258A3E7D24491E^-1'
'7D017554B1EECC^-3'
'-36BCCCFCB3211C^-4'
'-34F5DB600178BC^-4'
'51A65B4B6A9838^-5'
'-575F600626B66C^-6'
'1065B4BB725948^-6'
'11D6234^8'
'1518^6'
'29^2'
'1^1'
END_ARRAY 3 45
TOTAL_ARRAYS 3
~NAIF/SPC BEGIN COMMENTS~
; ../sliced_kernels/chan1m32isisTEMP.forwardAscending_0.bsp LOG FILE
; Created 2022-08-12/16:51:29.00.
;
; BEGIN SPKMERGE COMMANDS
LEAPSECONDS_KERNEL = /Volumes/pkgs/isis3/isis_data//base/kernels/lsk/naif0012.tls
SPK_KERNEL = ../sliced_kernels/chan1m32isisTEMP.forwardAscending_0.bsp
SOURCE_SPK_KERNEL = /Volumes/pkgs/isis3/isis_data//chandrayaan1/kernels/tspk/de421.bsp
INCLUDE_COMMENTS = NO
BODIES = 3, 10, 301
BEGIN_TIME = 2009 JUN 30 08:24:07.876
END_TIME = 2009 JUN 30 08:28:10.258
; END SPKMERGE COMMANDS
~NAIF/SPC END COMMENTS~
\begindata
FRAME_CH1_SPACECRAFT = -86000
FRAME_-86000_NAME = 'CH1_SPACECRAFT'
FRAME_-86000_CLASS = 3
FRAME_-86000_CLASS_ID = -86000
FRAME_-86000_CENTER = -86
CK_-86000_SCLK = -86
CK_-86000_SPK = -86
FRAME_CHANDRAYAAN-1_M3 = -86520
FRAME_-86520_NAME = 'CHANDRAYAAN-1_M3'
FRAME_-86520_CLASS = 4
FRAME_-86520_CLASS_ID = -86520
FRAME_-86520_CENTER = -86
TKFRAME_-86520_RELATIVE = 'CH1_SPACECRAFT'
TKFRAME_-86520_SPEC = 'ANGLES'
TKFRAME_-86520_ANGLES = ( 0.0 0.0 0.0 )
TKFRAME_-86520_AXES = ( 1, 2, 3 )
TKFRAME_-86520_UNITS = 'DEGREES'
INS-86520_PLATFORM_ID = ( -86000 )
INS-86520_PIXEL_PITCH = 0.027
INS-86520_FOCAL_LENGTH = 39.63
INS-86520_BORESIGHT_SAMPLE = 304.5
INS-86520_BORESIGHT_LINE = 0.0
INS-86520_TRANSX = ( -0.64, -0.0000400552916405788, 0.0269999702883839)
INS-86520_TRANSY = ( -0.052, -0.0269999702883839, -0.0000400552916405788)
INS-86520_ITRANSS = ( -1.96108894601637, -0.0549455303711644, -37.036996280362 )
INS-86520_ITRANSL = ( 23.7008204518524, 37.036996280362, -0.0549455303711644 )
INS-86520_PP = ( 0.0, 0.0 )
INS-86520_OD_K = ( 0.000379921103637315, 0.000213226448051461, -4.01862878758592E-08 )
INS-86520_DECENTER = ( 0.004047, -0.000005 )
\begintext
These are the parameters required for writing c-kernels. For
the Chandrayaan1 spacecraft the ck frame is CH1_SPACECRAFT (-86000),
and the ck reference frame is J2000 (1).
\begindata
INS-86520_CK_FRAME_ID=-86000
INS-86520_CK_REFERENCE_ID=1
\begintext
These parameters control the light time, stelar aberation, and observer swap
The parameters are set for best results with the low altitude of Chan-1
\begindata
INS-86520_SWAP_OBSERVER_TARGET = 'TRUE'
INS-86520_LIGHTTIME_CORRECTION = 'NONE'
INS-86520_LT_SURFACE_CORRECT = 'TRUE'
This diff is collapsed.
KPL/FK
SPICE Lunar ME Reference Frame/Body Association Kernel
=====================================================================
Original file name: moon_assoc_me.tf
Creation date: 2007 February 13 17:24
Created by: Nat Bachman (NAIF/JPL)
Last updated: 2008 March 18 22:15
Purpose of update:
Documentation now refers to DE421 kernels. Deprecated SPICE
routines and their replacements are noted.
Overview
=====================================================================
In the SPICE system, the default body-fixed reference frame
associated with the Moon is named
IAU_MOON
The IAU_MOON reference frame is implemented via approximate formulas
provided by the IAU report [1] and is not suitable for high-accuracy
work.
This kernel directs the SPICE system to associate the lunar "mean
Earth" reference frame
MOON_ME
with the Moon.
When this kernel is loaded via FURNSH, the SPICE frame system
routines CNMFRM and CIDFRM, which identify the reference frame
associated with a specified body, will indicate that the MOON_ME
frame is associated with the Moon. In addition, higher-level SPICE
geometry routines that rely on the CNMFRM or CIDFRM routines will
use the MOON_ME frame where applicable. As of the release date of
this kernel, these SPICE routines are:
ET2LST
LSPCN
Any code that calls these routines to obtain results
involving lunar body-fixed frames are affected. Within SPICE, the
only higher-level system that is affected is the dynamic frame
system.
The deprecated (as of the N0062 SPICE Toolkit release) routines
ILLUM
SRFXPT
SUBPT
SUBSOL
also make use of this kernel; however NAIF recommends that
users instead call the following routines which, respectively,
supersede those listed above:
ILUMIN
SINCPT
SUBPNT
SUBSLR
The newer routines don't make use of frame association kernels;
these routines accept the name of the target body-fixed
frame as an input argument.
Note: to direct SPICE to associate the lunar principal axis frame
MOON_PA
with the Moon, load the kernel
moon_assoc_pa.tf
rather than this one.
Using this kernel
=====================================================================
This kernel must be loaded together with a lunar frame specification
kernel and a binary lunar PCK. Below an example meta-kernel that
loads these files and a small program illustrating use of the
meta-kernel are shown. The names of the kernels used here are
current as of the release date of this kernel, but should not be
assumed to be current at later dates.
Example meta-kernel
-------------------
To use the meta-kernel shown below, the '@' characters must be
replaced with backslash '\' characters. Backslashes cannot be
used in this comment block because they would confuse the SPICE
text kernel parser.
KPL/FK
@begintext
Kernels to load are:
Lunar kernels
-------------
Binary lunar PCK: moon_pa_de421_1900-2050.bpc
Lunar FK: moon_080317.tf
Frame association kernel: moon_assoc_me.tf
Additional kernels to support sub-point computation
---------------------------------------------------
Text PCK for lunar radii: pck00008.tpc
Leapseconds kernel (for
time conversion): naif0008.tls
Planetary ephemeris (for
sub-Earth computation): de421.bsp
@begindata
KERNELS_TO_LOAD = ( 'moon_pa_de421_1900-2050.bpc'
'moon_080317.tf'
'moon_assoc_me.tf'
'pck00008.tpc'
'naif0008.tls'
'de421.bsp' )
@begintext
End of kernel
Example code
------------
Find the geometric (without light time and stellar aberration
corrections) sub-Earth point on the Moon at a given UTC time,
using the MOON_ME reference frame. Display the name of the
body-fixed lunar frame used for the computation.
PROGRAM EX
IMPLICIT NONE
DOUBLE PRECISION DPR
INTEGER FILEN
PARAMETER ( FILEN = 255 )
INTEGER FRNMLN
PARAMETER ( FRNMLN = 32 )
INTEGER TIMLEN
PARAMETER ( TIMLEN = 50 )
CHARACTER*(FRNMLN) FRNAME
CHARACTER*(FILEN) META
CHARACTER*(TIMLEN) TIMSTR
DOUBLE PRECISION ALT
DOUBLE PRECISION ET
DOUBLE PRECISION LAT
DOUBLE PRECISION LON
DOUBLE PRECISION RADIUS
DOUBLE PRECISION SPOINT ( 3 )
INTEGER FRCODE
LOGICAL FOUND
C
C Obtain name of meta-kernel; load kernel.
C
CALL PROMPT ( 'Enter meta-kernel name > ', META )
CALL FURNSH ( META )
C
C Obtain input time and convert to seconds past J2000 TDB.
C
CALL PROMPT ( 'Enter observation time > ', TIMSTR )
CALL STR2ET ( TIMSTR, ET )
C
C Find the closest point on the Moon to the center
C of the Earth at ET.
C
CALL SUBPT ( 'Near point', 'MOON', ET, 'NONE',
. 'EARTH', SPOINT, ALT )
.
C
C Express the sub-observer point in latitudinal
C coordinates.
C
CALL RECLAT ( SPOINT, RADIUS, LON, LAT )
C
C Look up the name of the lunar body-fixed frame.
C
CALL CNMFRM ( 'MOON', FRCODE, FRNAME, FOUND )
C
C Always check the "found" flag. Signal an error if we
C don't find a frame name.
C
IF ( .NOT. FOUND ) THEN
CALL SETMSG ( 'No body-fixed frame found for the Moon.' )
CALL SIGERR ( 'SPICE(NOFRAME)' )
END IF
WRITE(*,*) 'Lunar body-fixed frame is ', FRNAME
WRITE(*,*) 'Sub-Earth planetocentric longitude (deg):',
. LON*DPR()
WRITE(*,*) 'Sub-Earth planetocentric latitude (deg):',
. LAT*DPR()
END
Example program output
----------------------
Numeric results and output formatting shown below should be
expected to differ somewhat across different computing platforms.
When the above example program is run using the example meta-kernel,
and the (arbitrary) date 2008 Mar 18 00:00:00 UTC is used
as the observation time, the output will be:
Lunar body-fixed frame is MOON_ME
Sub-Earth planetocentric longitude (deg): 5.05523767
Sub-Earth planetocentric latitude (deg): -1.65932776
References
=====================================================================
[1] Seidelmann, P.K., Abalakin, V.K., Bursa, M., Davies, M.E.,
Bergh, C. de, Lieske, J.H., Oberst, J., Simon, J.L.,
Standish, E.M., Stooke, P., and Thomas, P.C. (2002).
"Report of the IAU/IAG Working Group on Cartographic
Coordinates and Rotational Elements of the Planets and
Satellites: 2000," Celestial Mechanics and Dynamical
Astronomy, v.82, Issue 1, pp. 83-111.
Data
=====================================================================
The assignment below directs the SPICE system to associate the MOON_ME
reference frame with the Moon.
For further information, see the Frames Required Reading section
titled "Connecting an Object to its Body-fixed Frame."
\begindata
OBJECT_MOON_FRAME = 'MOON_ME'
\begintext
End of kernel
=====================================================================
File added
KPL/LSK
LEAPSECONDS KERNEL FILE
===========================================================================
Modifications:
--------------
2016, Jul. 14 NJB Modified file to account for the leapsecond that
will occur on December 31, 2016.
2015, Jan. 5 NJB Modified file to account for the leapsecond that
will occur on June 30, 2015.
2012, Jan. 5 NJB Modified file to account for the leapsecond that
will occur on June 30, 2012.
2008, Jul. 7 NJB Modified file to account for the leapsecond that
will occur on December 31, 2008.
2005, Aug. 3 NJB Modified file to account for the leapsecond that
will occur on December 31, 2005.
1998, Jul 17 WLT Modified file to account for the leapsecond that
will occur on December 31, 1998.
1997, Feb 22 WLT Modified file to account for the leapsecond that
will occur on June 30, 1997.
1995, Dec 14 KSZ Corrected date of last leapsecond from 1-1-95
to 1-1-96.
1995, Oct 25 WLT Modified file to account for the leapsecond that
will occur on Dec 31, 1995.
1994, Jun 16 WLT Modified file to account for the leapsecond on
June 30, 1994.
1993, Feb. 22 CHA Modified file to account for the leapsecond on
June 30, 1993.
1992, Mar. 6 HAN Modified file to account for the leapsecond on
June 30, 1992.
1990, Oct. 8 HAN Modified file to account for the leapsecond on
Dec. 31, 1990.
Explanation:
------------
The contents of this file are used by the routine DELTET to compute the
time difference
[1] DELTA_ET = ET - UTC
the increment to be applied to UTC to give ET.
The difference between UTC and TAI,
[2] DELTA_AT = TAI - UTC
is always an integral number of seconds. The value of DELTA_AT was 10
seconds in January 1972, and increases by one each time a leap second
is declared. Combining [1] and [2] gives
[3] DELTA_ET = ET - (TAI - DELTA_AT)
= (ET - TAI) + DELTA_AT
The difference (ET - TAI) is periodic, and is given by
[4] ET - TAI = DELTA_T_A + K sin E
where DELTA_T_A and K are constant, and E is the eccentric anomaly of the
heliocentric orbit of the Earth-Moon barycenter. Equation [4], which ignores
small-period fluctuations, is accurate to about 0.000030 seconds.
The eccentric anomaly E is given by
[5] E = M + EB sin M
where M is the mean anomaly, which in turn is given by
[6] M = M + M t
0 1
where t is the number of ephemeris seconds past J2000.
Thus, in order to compute DELTA_ET, the following items are necessary.
DELTA_TA
K
EB
M0
M1
DELTA_AT after each leap second.
The numbers, and the formulation, are taken from the following sources.
1) Moyer, T.D., Transformation from Proper Time on Earth to
Coordinate Time in Solar System Barycentric Space-Time Frame
of Reference, Parts 1 and 2, Celestial Mechanics 23 (1981),
33-56 and 57-68.
2) Moyer, T.D., Effects of Conversion to the J2000 Astronomical
Reference System on Algorithms for Computing Time Differences
and Clock Rates, JPL IOM 314.5--942, 1 October 1985.
The variable names used above are consistent with those used in the
Astronomical Almanac.
\begindata
DELTET/DELTA_T_A = 32.184
DELTET/K = 1.657D-3
DELTET/EB = 1.671D-2
DELTET/M = ( 6.239996D0 1.99096871D-7 )
DELTET/DELTA_AT = ( 10, @1972-JAN-1
11, @1972-JUL-1
12, @1973-JAN-1
13, @1974-JAN-1
14, @1975-JAN-1
15, @1976-JAN-1
16, @1977-JAN-1
17, @1978-JAN-1
18, @1979-JAN-1
19, @1980-JAN-1
20, @1981-JUL-1
21, @1982-JUL-1
22, @1983-JUL-1
23, @1985-JUL-1
24, @1988-JAN-1
25, @1990-JAN-1
26, @1991-JAN-1
27, @1992-JUL-1
28, @1993-JUL-1
29, @1994-JUL-1
30, @1996-JAN-1
31, @1997-JUL-1
32, @1999-JAN-1
33, @2006-JAN-1
34, @2009-JAN-1
35, @2012-JUL-1
36, @2015-JUL-1
37, @2017-JAN-1 )
\begintext
This diff is collapsed.
{
"isis_camera_version": 1,
"image_lines": 5,
"image_samples": 608,
"name_platform": "CHANDRAYAAN-1",
"name_sensor": "MOON MINERALOGY MAPPER",
"reference_height": {
"maxheight": 1000,
"minheight": -1000,
"unit": "m"
},
"name_model": "USGS_ASTRO_LINE_SCANNER_SENSOR_MODEL",
"interpolation_method": "lagrange",
"line_scan_rate": [
[
0.5,
-0.12720000743865967,
0.05088
]
],
"starting_ephemeris_time": 299622941.60814995,
"center_ephemeris_time": 299622941.73534995,
"radii": {
"semimajor": 1737.4,
"semiminor": 1737.4,
"unit": "km"
},
"body_rotation": {
"time_dependent_frames": [
31006,
1
],
"ck_table_start_time": 299622941.60814995,
"ck_table_end_time": 299622941.86254996,
"ck_table_original_size": 2,
"ephemeris_times": [
299622941.60814995,
299622941.86254996
],
"quaternions": [
[
-0.9747735513065916,
0.19646555501476617,
-0.009172349392417702,
0.1055162422212761
],
[
-0.9747735156174205,
0.196465551731104,
-0.009172415802241563,
0.10551657226330902
]
],
"angular_velocities": [
[
6.124937754497467e-08,
-1.0239801705539717e-06,
2.4560118095097265e-06
],
[
6.12493776573662e-08,
-1.0239801709466094e-06,
2.456011809503279e-06
]
],
"constant_frames": [
31001,
31007,
31006
],
"constant_rotation": [
0.9999998732547144,
-0.00032928542237557133,
0.00038086961867138755,
0.00032928600021094723,
0.9999999457843062,
-1.4544409378362713e-06,
-0.00038086911909607826,
1.5798557868269087e-06,
0.9999999274681067
],
"reference_frame": 1
},
"instrument_pointing": {
"time_dependent_frames": [
-86000,
1
],
"ck_table_start_time": 299622941.60806996,
"ck_table_end_time": 299622941.86547,
"ck_table_original_size": 7,
"ephemeris_times": [
299622941.60806996,
299622941.65895,
299622941.70983,
299622941.76071,
299622941.81158996,
299622941.86247,
299622941.86547
],
"quaternions": [
[
-0.07932458945117579,
0.6686267050477891,
-0.7382516883292113,
0.04037800743484437
],
[
-0.07931136277253394,
0.6686270378355014,
-0.7382536542422642,
0.040362532235106274
],
[
-0.07929816903614584,
0.6686273679739351,
-0.7382556180070331,
0.0403470651326279
],
[
-0.07928500836507205,
0.6686276954564626,
-0.7382575796169487,
0.04033160615764239
],
[
-0.07927188089774231,
0.6686280202760814,
-0.7382595390631518,
0.0403161553584303
],
[
-0.07925878672648098,
0.6686283424269328,
-0.7382614963436729,
0.04030071272892822
],
[
-0.07925878672648098,
0.6686283424269328,
-0.7382614963436729,
0.04030071272892822
]
],
"angular_velocities": null,
"reference_frame": 1,
"constant_frames": [
-86520,
-86000
],
"constant_rotation": [
1.0,
0.0,
0.0,
0.0,
1.0,
0.0,
0.0,
0.0,
1.0
]
},
"naif_keywords": {
"BODY301_RADII": [
1737.4,
1737.4,
1737.4
],
"BODY_FRAME_CODE": 31001,
"BODY_CODE": 301,
"INS-86520_ITRANSS": [
-1.9610889460163698,
-0.054945530371164404,
-37.036996280362
],
"INS-86520_BORESIGHT_SAMPLE": 304.5,
"TKFRAME_-86520_RELATIVE": "CH1_SPACECRAFT",
"INS-86520_OD_K": [
0.000379921103637315,
0.000213226448051461,
-4.0186287875859195e-08
],
"FRAME_-86520_CLASS": 4.0,
"INS-86520_DECENTER": [
0.004047,
-5e-06
],
"INS-86520_CK_REFERENCE_ID": 1.0,
"INS-86520_PLATFORM_ID": -86000.0,
"TKFRAME_-86520_UNITS": "DEGREES",
"INS-86520_LT_SURFACE_CORRECT": "TRUE",
"INS-86520_SWAP_OBSERVER_TARGET": "TRUE",
"TKFRAME_-86520_ANGLES": [
0.0,
0.0,
0.0
],
"FRAME_-86520_CENTER": -86.0,
"INS-86520_LIGHTTIME_CORRECTION": "NONE",
"INS-86520_PIXEL_PITCH": 0.027,
"FRAME_-86520_NAME": "CHANDRAYAAN-1_M3",
"TKFRAME_-86520_AXES": [
1.0,
2.0,
3.0
],
"TKFRAME_-86520_SPEC": "ANGLES",
"INS-86520_TRANSX": [
-0.64,
-4.00552916405788e-05,
0.0269999702883839
],
"INS-86520_TRANSY": [
-0.052,
-0.0269999702883839,
-4.00552916405788e-05
],
"FRAME_-86520_CLASS_ID": -86520.0,
"INS-86520_CK_FRAME_ID": -86000.0,
"INS-86520_BORESIGHT_LINE": 0.0,
"INS-86520_FOCAL_LENGTH": 39.63,
"INS-86520_PP": [
0.0,
0.0
],
"INS-86520_ITRANSL": [
23.7008204518524,
37.036996280362,
-0.054945530371164404
],
"BODY301_POLE_RA": [
269.9949,
0.0031,
0.0
],
"BODY301_NUT_PREC_PM": [
3.561,
0.1208,
-0.0642,
0.0158,
0.0252,
-0.0066,
-0.0047,
-0.0046,
0.0028,
0.0052
],
"BODY301_NUT_PREC_RA": [
-3.8787000000000003,
-0.1204,
0.07,
-0.0172,
0.0,
0.0072,
0.0,
0.0,
0.0,
-0.0052
],
"BODY301_LONG_AXIS": 0.0,
"BODY301_NUT_PREC_DEC": [
1.5419,
0.0239,
-0.0278,
0.0068,
0.0,
-0.0029,
0.0009,
0.0,
0.0,
0.0008
],
"BODY301_POLE_DEC": [
66.5392,
0.013,
0.0
],
"BODY301_PM": [
38.3213,
13.17635815,
-1.3999999999999999e-12
]
},
"detector_sample_summing": 1,
"detector_line_summing": 1,
"focal_length_model": {
"focal_length": 39.63
},
"detector_center": {
"line": 0.0,
"sample": 304.5
},
"focal2pixel_lines": [
23.7008204518524,
37.036996280362,
-0.054945530371164404
],
"focal2pixel_samples": [
-1.9610889460163698,
-0.054945530371164404,
-37.036996280362
],
"optical_distortion": {
"radial": {
"coefficients": [
0.0,
0.0,
0.0
]
}
},
"starting_detector_line": 0,
"starting_detector_sample": 0,
"instrument_position": {
"spk_table_start_time": 299622941.60814995,
"spk_table_end_time": 299622941.86254996,
"spk_table_original_size": 6,
"ephemeris_times": [
299622941.60814995,
299622941.65902996,
299622941.70991,
299622941.76078993,
299622941.81166995,
299622941.86254996
],
"positions": [
[
87.43803283072197,
170.58382785758494,
1937.3684802589921
],
[
87.43510506145041,
170.5039141771109,
1937.376298445722
],
[
87.43218518920048,
170.42401232587338,
1937.3841107949745
],
[
87.42927324562292,
170.3441224440555,
1937.3919172883918
],
[
87.42636925235688,
170.26424439143332,
1937.3997179348762
],
[
87.42347324097756,
170.18437830744463,
1937.4075127164092
]
],
"velocities": [
[
-0.05762002410373986,
-1.5707459933015884,
0.1537165891795824
],
[
-0.05746510464914588,
-1.5705139595332909,
0.1536019506461352
],
[
-0.05730961271290819,
-1.5702809919216132,
0.15348712189335625
],
[
-0.05715359501832903,
-1.570047160550427,
0.1533721371829534
],
[
-0.0569969401442109,
-1.569812298292768,
0.1532569148111189
],
[
-0.056840025211490175,
-1.5695769708168128,
0.15314173131318826
]
],
"reference_frame": 1
},
"sun_position": {
"spk_table_start_time": 299622941.73534995,
"spk_table_end_time": 299622941.73534995,
"spk_table_original_size": 1,
"ephemeris_times": [
299622941.73534995
],
"positions": [
[
-22279396.272817865,
138086310.683749,
59901633.861951254
]
],
"velocities": [
[
-29.247063986944152,
-3.0931661850381134,
-1.3160268288136903
]
],
"reference_frame": 1
}
}
\ No newline at end of file
from cgi import test
import pytest
import ale
import os
import pvl
import numpy as np
from ale.drivers import co_drivers
from ale.formatters.formatter import to_isd
import unittest
from unittest.mock import PropertyMock, patch
import json
from conftest import get_image_label, get_image_kernels, get_isd, convert_kernels, compare_dicts, get_table_data
from ale.drivers.chandrayaan_drivers import Chandrayaan1M3IsisLabelNaifSpiceDriver
@pytest.fixture()
def m3_kernels(scope="module", autouse=True):
kernels = get_image_kernels("M3T20090630T083407_V03_RDN")
updated_kernels, binary_kernels = convert_kernels(kernels)
yield updated_kernels
for kern in binary_kernels:
os.remove(kern)
def test_chandrayaan_load(m3_kernels):
label_file = get_image_label("M3T20090630T083407_V03_RDN", label_type="isis")
compare_dict = get_isd("chandrayannM3")
isd_str = ale.loads(label_file, props={"kernels": m3_kernels}, verbose=True)
isd_obj = json.loads(isd_str)
x = compare_dicts(isd_obj, compare_dict)
assert x == []
# ========= Test chandrayaan isislabel and naifspice driver =========
class test_chandrayaan_isis_naif(unittest.TestCase):
def setUp(self):
label = get_image_label("M3T20090630T083407_V03_RDN", "isis")
self.driver = Chandrayaan1M3IsisLabelNaifSpiceDriver(label)
def test_instrument_id(self):
assert self.driver.instrument_id == "CHANDRAYAAN-1_M3"
def test_ikid_id(self):
assert self.driver.spacecraft_id == -86
def test_sensor_model_version(self):
assert self.driver.sensor_model_version == 1
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment