Skip to content
Snippets Groups Projects
Commit f4437662 authored by Kelvin Rodriguez's avatar Kelvin Rodriguez Committed by GitHub
Browse files

Updated Dawn FC tests (#341)

parent ad614ca6
No related branches found
No related tags found
No related merge requests found
{
"IsisCameraVersion": 2,
"NaifKeywords": {
"BODY2000001_RADII": [
482.0,
482.0,
446.0
],
"BODY_FRAME_CODE": 10101,
"BODY_CODE": 2000001,
"TKFRAME_-203126_SPEC": "ANGLES",
"INS-203126_FOV_FRAME": "DAWN_FC2",
"INS-203126_PIXEL_SIZE": [
14.004,
13.995
],
"INS-203126_FOV_CLASS_SPEC": "ANGLES",
"TKFRAME_-203126_RELATIVE": "DAWN_FC2",
"INS-203126_ITRANSL": [
0.0,
0.0,
71.42857142857143
],
"INS-203126_IFOV": [
9.3238e-05,
9.3179e-05
],
"INS-203126_FOV_REF_VECTOR": [
1.0,
0.0,
0.0
],
"INS-203126_ITRANSS": [
0.0,
71.38370167323397,
0.0
],
"FRAME_-203126_NAME": "DAWN_FC2_FILTER_6",
"INS-203126_BANDCENTER": 829.0,
"TKFRAME_-203126_UNITS": "DEGREES",
"FRAME_-203126_CLASS_ID": -203126.0,
"INS-203126_TRANSX": [
0.0,
0.0140088,
0.0
],
"INS-203126_TRANSY": [
0.0,
0.0,
0.014
],
"INS-203126_FOV_ANGLE_UNITS": "DEGREES",
"INS-203126_PIXEL_LINES": 1024.0,
"INS-203126_FOV_REF_ANGLE": 2.7351859,
"TKFRAME_-203126_ANGLES": [
0.0,
0.0,
0.0
],
"FRAME_-203126_CENTER": -203.0,
"INS-203126_CCD_CENTER": [
511.5,
511.5
],
"INS-203126_FOV_ANGULAR_SIZE": [
0.095476,
0.095416
],
"INS-203126_F/RATIO": 7.5,
"INS-203126_FOCAL_LENGTH": 150.08,
"INS-203126_FOV_CROSS_ANGLE": 2.733467,
"INS-203126_BANDWIDTH": 36.0,
"INS-203126_BORESIGHT": [
0.0,
0.0,
150.08
],
"INS-203126_RAD_DIST_COEFF": 9.2e-06,
"INS-203126_PIXEL_SAMPLES": 1024.0,
"INS-203126_FOV_SHAPE": "RECTANGLE",
"FRAME_-203126_CLASS": 4.0,
"INS-203126_EFF_WAVELENGTH": 829.0,
"TKFRAME_-203126_AXES": [
1.0,
2.0,
3.0
],
"BODY2000001_GM": 62.6325,
"BODY2000001_PM": [
170.65,
952.1532,
0.0
],
"BODY2000001_POLE_DEC": [
66.764,
0.0,
0.0
],
"BODY2000001_POLE_RA": [
291.418,
0.0,
0.0
]
},
"detector_sample_summing": 1,
"detector_line_summing": 1,
"focal_length_model": {
"focal_length": 150.08
},
"detector_center": {
"line": 512.0,
"sample": 512.0
},
"starting_detector_line": 0,
"starting_detector_sample": 0,
"focal2pixel_lines": [
0.0,
0.0,
71.40816909454442
],
"focal2pixel_samples": [
0.0,
71.40816909454442,
0.0
],
"optical_distortion": {
"dawnfc": {
"coefficients": [
9.2e-06
]
}
},
"image_lines": 1024,
"image_samples": 1024,
"name_platform": "DAWN",
"name_sensor": "FRAMING CAMERA 2",
"reference_height": {
"maxheight": 1000,
"minheight": -1000,
"unit": "m"
},
"name_model": "USGS_ASTRO_FRAME_SENSOR_MODEL",
"center_ephemeris_time": 488002614.62294483,
"radii": {
"semimajor": 482.0,
"semiminor": 446.0,
"unit": "km"
},
"InstrumentPointing": {
"TimeDependentFrames": [
-203120,
-203000,
1
],
"CkTableStartTime": 488002614.62294483,
"CkTableEndTime": 488002614.62294483,
"CkTableOriginalSize": 1,
"EphemerisTimes": [
488002614.62294483
],
"Quaternions": [
[
0.5213647259158684,
-0.17475033868107043,
0.13616771930072985,
-0.8240749322251953
]
],
"AngularVelocity": [
[
-2.0163095864499935e-05,
2.0665280555081777e-08,
3.996105121476586e-06
]
],
"ConstantFrames": [
-203126,
-203120
],
"ConstantRotation": [
1.0,
0.0,
0.0,
0.0,
1.0,
0.0,
0.0,
0.0,
1.0
]
},
"BodyRotation": {
"TimeDependentFrames": [
10101,
1
],
"CkTableStartTime": 488002614.62294483,
"CkTableEndTime": 488002614.62294483,
"CkTableOriginalSize": 1,
"EphemerisTimes": [
488002614.62294483
],
"Quaternions": [
[
-0.7323907260895571,
0.1890116253358707,
-0.06950386369161242,
0.6504211272382237
]
],
"AngularVelocity": [
[
2.770977343153026e-05,
-7.064167352871139e-05,
0.00017673919183794291
]
]
},
"InstrumentPosition": {
"SpkTableStartTime": 488002614.62294483,
"SpkTableEndTime": 488002614.62294483,
"SpkTableOriginalSize": 1,
"EphemerisTimes": [
488002614.62294483
],
"Positions": [
[
-678.145360419934,
2026.1409618562566,
-4375.770027129584
]
],
"Velocities": [
[
0.01836093913952242,
-0.10035442890342972,
-0.04929136913284714
]
]
},
"SunPosition": {
"SpkTableStartTime": 488002614.62294483,
"SpkTableEndTime": 488002614.62294483,
"SpkTableOriginalSize": 1,
"EphemerisTimes": [
488002614.62294483
],
"Positions": [
[
-184987783.06715,
343341745.2043138,
199532284.61700404
]
],
"Velocities": [
[
-15.334993792176247,
-7.083164572551847,
-0.21518329562060534
]
]
}
}
...@@ -7,53 +7,11 @@ import json ...@@ -7,53 +7,11 @@ import json
import unittest import unittest
from unittest.mock import patch from unittest.mock import patch
from conftest import get_image_label, get_image_kernels, convert_kernels, compare_dicts from conftest import get_image_label, get_image_kernels, get_isd, convert_kernels, compare_dicts
import ale import ale
from ale.drivers.dawn_drivers import DawnFcPds3NaifSpiceDriver from ale.drivers.dawn_drivers import DawnFcPds3NaifSpiceDriver
@pytest.fixture()
def usgscsm_compare_dict():
return {
'radii': {
'semimajor': 482.0,
'semiminor': 446.0,
'unit': 'km'},
'sensor_position': {
'positions': [[257924.25395483, 15116.92833465, -4862688.37323513]],
'velocities': [[-104.55513399, -85.04943875, -5.79043523]],
'unit': 'm'},
'sun_position': {
'positions': [[3.60779830e+11, 2.46614935e+11, 3.05966427e+10]],
'velocities': [[ 4.74251599e+07, -6.93781387e+07, 1.94478534e+02]],
'unit': 'm'},
'sensor_orientation': {
'quaternions': [[0.00184844, 0.02139268, -0.27802966, -0.96033246]]},
'detector_sample_summing': 1,
'detector_line_summing': 1,
'focal_length_model': {
'focal_length': 150.08},
'detector_center': {
'line': 512.0,
'sample': 512.0},
'starting_detector_line': 0,
'starting_detector_sample': 0,
'focal2pixel_lines': [0.0, 0.0, 71.40816909454442],
'focal2pixel_samples': [0.0, 71.40816909454442, 0.0],
'optical_distortion': {
'dawnfc': {
'coefficients': [9.2e-06]}},
'image_lines': 1024,
'image_samples': 1024,
'name_platform': 'DAWN',
'name_sensor': 'FRAMING CAMERA 2',
'reference_height': {
'maxheight': 1000,
'minheight': -1000,
'unit': 'm'},
'name_model': 'USGS_ASTRO_FRAME_SENSOR_MODEL',
'center_ephemeris_time': 488002614.62294483}
@pytest.fixture(scope="module", autouse=True) @pytest.fixture(scope="module", autouse=True)
def test_kernels(): def test_kernels():
kernels = get_image_kernels('FC21A0038582_15170161546F6F') kernels = get_image_kernels('FC21A0038582_15170161546F6F')
...@@ -62,12 +20,14 @@ def test_kernels(): ...@@ -62,12 +20,14 @@ def test_kernels():
for kern in binary_kernels: for kern in binary_kernels:
os.remove(kern) os.remove(kern)
def test_dawn_load(test_kernels, usgscsm_compare_dict): def test_load(test_kernels):
label_file = get_image_label('FC21A0038582_15170161546F6F') label_file = get_image_label('FC21A0038582_15170161546F6F')
usgscsm_isd = ale.load(label_file, props={'kernels': test_kernels}, formatter='usgscsm') compare_dict = get_isd("dawnfc")
assert compare_dicts(usgscsm_isd, usgscsm_compare_dict) == []
isd_str = ale.loads(label_file, props={'kernels': test_kernels})
isd_obj = json.loads(isd_str)
print(json.dumps(isd_obj, indent=2))
assert compare_dicts(isd_obj, compare_dict) == []
# ========= Test pds3label and naifspice driver ========= # ========= Test pds3label and naifspice driver =========
class test_pds3_naif(unittest.TestCase): class test_pds3_naif(unittest.TestCase):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment