diff --git a/docs/getting-started/csm-stack/csm-sandbox-isd-file.json b/docs/getting-started/csm-stack/csm-sandbox-isd-file.json new file mode 100644 index 00000000..5c0e04ed --- /dev/null +++ b/docs/getting-started/csm-stack/csm-sandbox-isd-file.json @@ -0,0 +1,1805 @@ +{ + "isis_camera_version": 1, + "image_lines": 7168, + "image_samples": 5000, + "name_platform": "Mars_Reconnaissance_Orbiter", + "name_sensor": "CONTEXT CAMERA", + "reference_height": { + "maxheight": 1000, + "minheight": -1000, + "unit": "m" + }, + "name_model": "USGS_ASTRO_LINE_SCANNER_SENSOR_MODEL", + "interpolation_method": "lagrange", + "line_scan_rate": [ + [ + 0.5, + -6.727167993783951, + 0.001877 + ] + ], + "starting_ephemeris_time": 216723482.23715055, + "center_ephemeris_time": 216723488.96431854, + "radii": { + "semimajor": 3396.19, + "semiminor": 3376.2, + "unit": "km" + }, + "body_rotation": { + "time_dependent_frames": [ + 10014, + 1 + ], + "ck_table_start_time": 216723482.23715055, + "ck_table_end_time": 216723495.69148654, + "ck_table_original_size": 2, + "ephemeris_times": [ + 216723482.23715055, + 216723495.69148654 + ], + "quaternions": [ + [ + 0.10322096802462885, + 0.21057794395739954, + -0.23865888549575248, + 0.9423610229910075 + ], + [ + 0.10367030824810212, + 0.21046411879337973, + -0.23875926957773558, + 0.94231169635051 + ] + ], + "angular_velocities": [ + [ + 3.162409191665966e-05, + -2.880180746335177e-05, + 5.6521289497897486e-05 + ], + [ + 3.1624091916621627e-05, + -2.8801807463773895e-05, + 5.652128949770364e-05 + ] + ], + "reference_frame": 1 + }, + "instrument_pointing": { + "time_dependent_frames": [ + -74000, + 1 + ], + "ck_table_start_time": 216723482.2044586, + "ck_table_end_time": 216723495.7060404, + "ck_table_original_size": 123, + "ephemeris_times": [ + 216723482.2044586, + 216723482.3053335, + 216723482.4067465, + 216723482.6044755, + 216723482.80459154, + 216723483.00447655, + 216723483.20450258, + 216723483.3053435, + 216723483.40685153, + 216723483.6045736, + 216723483.8045156, + 216723484.00454557, + 216723484.20453858, + 216723484.30542347, + 216723484.40691456, + 216723484.60457358, + 216723484.80457148, + 216723485.00459453, + 216723485.2046655, + 216723485.30558047, + 216723485.4069545, + 216723485.60465547, + 216723485.70543048, + 216723485.8046535, + 216723485.90548953, + 216723486.00472757, + 216723486.10551855, + 216723486.20472154, + 216723486.30589053, + 216723486.40697452, + 216723486.50547954, + 216723486.6047605, + 216723486.70557055, + 216723486.80514452, + 216723486.90556857, + 216723487.00472757, + 216723487.10552654, + 216723487.2047455, + 216723487.3059325, + 216723487.40704247, + 216723487.5055785, + 216723487.60481855, + 216723487.70562658, + 216723487.8051525, + 216723487.90556544, + 216723488.0048265, + 216723488.1055655, + 216723488.20479053, + 216723488.30600244, + 216723488.40714246, + 216723488.50572652, + 216723488.60480255, + 216723488.7056355, + 216723488.80516547, + 216723488.9056105, + 216723489.0048005, + 216723489.10562748, + 216723489.20490152, + 216723489.3061635, + 216723489.4071185, + 216723489.50561947, + 216723489.60487348, + 216723489.70564348, + 216723489.80522448, + 216723489.9056595, + 216723490.00494748, + 216723490.10574847, + 216723490.20488948, + 216723490.30612844, + 216723490.40721446, + 216723490.50572044, + 216723490.60496348, + 216723490.70573848, + 216723490.8053555, + 216723490.90580553, + 216723491.00496548, + 216723491.1059355, + 216723491.20495552, + 216723491.30618054, + 216723491.4072445, + 216723491.5057625, + 216723491.6050265, + 216723491.70583048, + 216723491.80537143, + 216723491.9058365, + 216723492.0049825, + 216723492.10577944, + 216723492.20499447, + 216723492.3062004, + 216723492.40735248, + 216723492.5059575, + 216723492.60503045, + 216723492.70581642, + 216723492.80539146, + 216723492.9058365, + 216723493.0051035, + 216723493.1058314, + 216723493.20516244, + 216723493.30634144, + 216723493.40737644, + 216723493.50588146, + 216723493.60505548, + 216723493.7058654, + 216723493.80542246, + 216723493.9058924, + 216723494.0051525, + 216723494.1059225, + 216723494.20513347, + 216723494.30635443, + 216723494.4073935, + 216723494.50594643, + 216723494.6051075, + 216723494.70595354, + 216723494.80554253, + 216723494.90596944, + 216723495.00512546, + 216723495.10594848, + 216723495.2051405, + 216723495.30640748, + 216723495.40744045, + 216723495.50595644, + 216723495.6052555, + 216723495.7060404 + ], + "quaternions": [ + [ + 0.456640138636656, + -0.7472386448995298, + 0.3598256028471857, + -0.32193124559487757 + ], + [ + 0.4566213564973416, + -0.7472550856757947, + 0.3598458485279944, + -0.3218970938349029 + ], + [ + 0.4566020294023815, + -0.7472718049494286, + 0.35986628448321384, + -0.3218628489986018 + ], + [ + 0.456562693787863, + -0.747305741333531, + 0.35990650978809496, + -0.32179487227621195 + ], + [ + 0.4565226995378405, + -0.747340174140307, + 0.3599470048343836, + -0.3217263474342356 + ], + [ + 0.45648324028418547, + -0.7473733414142417, + 0.35998851942220594, + -0.3216588344304722 + ], + [ + 0.45644479202828087, + -0.7474066418864216, + 0.36002924963410654, + -0.32159042725526527 + ], + [ + 0.4564255652063203, + -0.7474231347261916, + 0.36004965790290777, + -0.3215565346034245 + ], + [ + 0.45640597946793365, + -0.7474400124106441, + 0.3600698581791281, + -0.32152248285983814 + ], + [ + 0.4563652435025804, + -0.7474744549187807, + 0.360111090022015, + -0.3214540505419995 + ], + [ + 0.45632658268931614, + -0.7475068077097476, + 0.3601524567631877, + -0.32138735234310833 + ], + [ + 0.45628679008255674, + -0.7475417924464186, + 0.3601929783503571, + -0.32131705850958464 + ], + [ + 0.45624733529504313, + -0.7475753229328335, + 0.3602337399989251, + -0.32124937065219145 + ], + [ + 0.4562277174786899, + -0.7475920324875944, + 0.36025475269469176, + -0.32121478161214617 + ], + [ + 0.45620821766650993, + -0.7476080829945337, + 0.3602754252541649, + -0.3211819333846711 + ], + [ + 0.4561679508700253, + -0.7476417563961714, + 0.36031763324252486, + -0.321113387865401 + ], + [ + 0.45612889551191454, + -0.7476755415872517, + 0.36035795711756086, + -0.32104494690517865 + ], + [ + 0.456090059320801, + -0.7477090909380806, + 0.36039855808085336, + -0.32097640481901346 + ], + [ + 0.45604952387356584, + -0.7477432802263493, + 0.3604388794024121, + -0.3209090725831332 + ], + [ + 0.45602945481056867, + -0.7477606995540185, + 0.3604596184323907, + -0.3208737072856481 + ], + [ + 0.4560099918434995, + -0.7477776336592756, + 0.3604800722737012, + -0.3208389244330761 + ], + [ + 0.4559718755719765, + -0.74781022248869, + 0.36052096519184373, + -0.3207711855605666 + ], + [ + 0.4559519299410028, + -0.7478271756451552, + 0.36054190951152143, + -0.3207364719445716 + ], + [ + 0.4559322028487961, + -0.7478438278046622, + 0.3605625726245542, + -0.32070245842880324 + ], + [ + 0.45591190928360353, + -0.7478613437554115, + 0.3605821878655698, + -0.32066840705596295 + ], + [ + 0.4558923648213978, + -0.7478781948281128, + 0.3606026745737251, + -0.3206338542457316 + ], + [ + 0.45587220246989113, + -0.7478950520941643, + 0.3606233319425211, + -0.3205999665112153 + ], + [ + 0.45585222882082266, + -0.7479118329971433, + 0.3606437687483768, + -0.32056622967010884 + ], + [ + 0.45583197429503386, + -0.7479284822643583, + 0.36066505752037525, + -0.320532233810969 + ], + [ + 0.4558126091806532, + -0.7479455434331493, + 0.36068531624689, + -0.32049716381630755 + ], + [ + 0.45579328367048316, + -0.7479621569090569, + 0.3607057187164182, + -0.3204629134207296 + ], + [ + 0.4557736857211812, + -0.7479785974939444, + 0.36072608376528864, + -0.32042948925852616 + ], + [ + 0.4557550206581357, + -0.7479949741882661, + 0.36074591613700785, + -0.3203954801873277 + ], + [ + 0.45573512528341154, + -0.7480120406435168, + 0.3607665449476456, + -0.3203607071439529 + ], + [ + 0.4557150870703595, + -0.7480291039610074, + 0.36078714650344584, + -0.3203261680875422 + ], + [ + 0.4556958373070098, + -0.7480457122343332, + 0.36080747439580885, + -0.32029187109417884 + ], + [ + 0.45567696156758625, + -0.7480620644049726, + 0.36082767643029046, + -0.3202577749510867 + ], + [ + 0.45565720362341966, + -0.7480789397050367, + 0.36084803705485324, + -0.3202235264772606 + ], + [ + 0.45563852786720466, + -0.7480946869743251, + 0.36086879411768846, + -0.320189919697417 + ], + [ + 0.45561928543963964, + -0.7481111685977067, + 0.3608889863861923, + -0.32015603330250214 + ], + [ + 0.45560059436548983, + -0.7481273271087379, + 0.3609096741880222, + -0.3201215517962572 + ], + [ + 0.4555808630520944, + -0.7481441668690242, + 0.3609302822035942, + -0.3200870415824364 + ], + [ + 0.4555604973963479, + -0.7481611391342737, + 0.3609501188050491, + -0.3200539873770031 + ], + [ + 0.4555411767692865, + -0.7481779616018986, + 0.3609701678731271, + -0.3200195493193002 + ], + [ + 0.45552171570148015, + -0.7481944473104388, + 0.36099128070068454, + -0.31998489151253134 + ], + [ + 0.4555018612056386, + -0.7482110766736915, + 0.3610119397024719, + -0.3199509627634421 + ], + [ + 0.45548374165299077, + -0.7482275459677691, + 0.36103094089264515, + -0.31991680209550255 + ], + [ + 0.45546438225185554, + -0.7482443384825368, + 0.3610512177916122, + -0.3198822041939197 + ], + [ + 0.45544410387681994, + -0.7482619045271623, + 0.3610713335166255, + -0.31984728010372404 + ], + [ + 0.45542446086410726, + -0.7482785140284776, + 0.3610916894265162, + -0.3198134107836557 + ], + [ + 0.45540421502699957, + -0.7482956457467274, + 0.36111269194104145, + -0.31977844081680223 + ], + [ + 0.4553849825651385, + -0.7483124192678219, + 0.3611329202182119, + -0.319743732946175 + ], + [ + 0.4553653991104654, + -0.7483286740490691, + 0.3611541149086426, + -0.3197096404137411 + ], + [ + 0.4553457140042298, + -0.7483453686570658, + 0.3611744582923832, + -0.31967561781390513 + ], + [ + 0.45532722919264484, + -0.7483619607440507, + 0.36119459088218925, + -0.31964035662681356 + ], + [ + 0.45530768157497065, + -0.7483786799849512, + 0.36121496224379285, + -0.31960603482103156 + ], + [ + 0.4552885893065431, + -0.748394898885115, + 0.3612362893875506, + -0.3195711485718169 + ], + [ + 0.4552692059264602, + -0.7484116182823105, + 0.3612564118526967, + -0.3195368596116233 + ], + [ + 0.45524953439279564, + -0.7484286738228176, + 0.36127643661684417, + -0.3195022973006557 + ], + [ + 0.45522995315149223, + -0.7484452563390243, + 0.36129688010030514, + -0.319468233862286 + ], + [ + 0.4552099763542914, + -0.7484617648531097, + 0.3613180270427388, + -0.31943410480791923 + ], + [ + 0.4551905833728282, + -0.7484785809575754, + 0.3613380595606517, + -0.31939967653299495 + ], + [ + 0.4551703214103341, + -0.7484952185367758, + 0.3613592959028556, + -0.3193655360232063 + ], + [ + 0.45515072932603245, + -0.7485119357487026, + 0.36137950567642574, + -0.31933140859109554 + ], + [ + 0.45513088688389625, + -0.7485286853611572, + 0.3614000079745778, + -0.319297223964993 + ], + [ + 0.45511107270360224, + -0.7485455862246484, + 0.361420344315428, + -0.3192628252100319 + ], + [ + 0.4550923796369421, + -0.748562136137978, + 0.3614404540171302, + -0.3192279006240271 + ], + [ + 0.45507300738438716, + -0.7485787527643931, + 0.3614606178416314, + -0.31919371956443815 + ], + [ + 0.45505251132675345, + -0.7485952549311788, + 0.36148237737115796, + -0.31915959499885643 + ], + [ + 0.4550329890251559, + -0.7486122198831673, + 0.3615024792548562, + -0.3191248668358849 + ], + [ + 0.45501498803279583, + -0.7486282608907642, + 0.36152192866114585, + -0.31909086912400064 + ], + [ + 0.45499557636354593, + -0.7486447988948106, + 0.3615421219991119, + -0.319056867341439 + ], + [ + 0.4549740096750962, + -0.7486618566705051, + 0.36156366526190586, + -0.3190231823068882 + ], + [ + 0.45495438591675463, + -0.7486785542665721, + 0.361583937988942, + -0.318989004363525 + ], + [ + 0.4549328290019078, + -0.7486959273406629, + 0.3616052195782649, + -0.31895484735865154 + ], + [ + 0.4549130847241942, + -0.7487140109131725, + 0.3616248424972863, + -0.3189183100698999 + ], + [ + 0.4548951836750157, + -0.74873336523074, + 0.36164219054277924, + -0.31887873193260374 + ], + [ + 0.4548796372163559, + -0.7487520007997217, + 0.3616559843281759, + -0.3188415059931003 + ], + [ + 0.45486490737769636, + -0.7487687725607209, + 0.36166827035777, + -0.3188091960571559 + ], + [ + 0.45484677011943714, + -0.7487867628062077, + 0.3616841553030155, + -0.3187747972485595 + ], + [ + 0.45482648889774774, + -0.7488042740261207, + 0.36170631948004395, + -0.31873745096138545 + ], + [ + 0.4548050825715886, + -0.7488184126435743, + 0.3617331229461349, + -0.3187043606803093 + ], + [ + 0.4547831451453082, + -0.7488313530173739, + 0.36176096674752667, + -0.31867365527731606 + ], + [ + 0.45475999904787734, + -0.7488478308320458, + 0.3617860080639206, + -0.31863953598586464 + ], + [ + 0.45474065919486395, + -0.748865176115428, + 0.36180463360593185, + -0.3186052227724885 + ], + [ + 0.4547233983904105, + -0.7488818640548048, + 0.3618205465543661, + -0.3185725611806149 + ], + [ + 0.4547075561458967, + -0.7488989112778274, + 0.36183519140325493, + -0.31853846444798617 + ], + [ + 0.4546908452261272, + -0.748916235178227, + 0.36185256418808254, + -0.3185018520268449 + ], + [ + 0.4546683339372774, + -0.7489344882715929, + 0.3618732839839008, + -0.3184675253943092 + ], + [ + 0.4546441301195779, + -0.7489494416647386, + 0.3618976752310446, + -0.318439195829053 + ], + [ + 0.4546191294785708, + -0.7489637196527715, + 0.36192573720888177, + -0.31840941333735506 + ], + [ + 0.4545964846423287, + -0.7489791687624296, + 0.3619524834900092, + -0.3183749999704617 + ], + [ + 0.454578041208784, + -0.7489935631304201, + 0.3619762856300481, + -0.31834040818195936 + ], + [ + 0.45456112146887767, + -0.7490096619024552, + 0.3619942681017558, + -0.3183062410434332 + ], + [ + 0.4545441381421994, + -0.7490275306477677, + 0.36201082074038576, + -0.31826961915826146 + ], + [ + 0.4545259794486974, + -0.7490450552800195, + 0.3620280575331991, + -0.31823470069351883 + ], + [ + 0.4545069087475502, + -0.7490603507404017, + 0.3620476616368588, + -0.3182036322116628 + ], + [ + 0.45448470778641425, + -0.7490750082967373, + 0.36207225751667754, + -0.3181728503036005 + ], + [ + 0.45445900656610677, + -0.7490910634248247, + 0.3620987158726776, + -0.3181416508591267 + ], + [ + 0.4544348850872224, + -0.7491066390249232, + 0.3621233624731543, + -0.3181113781927374 + ], + [ + 0.45441231363589535, + -0.74912238321268, + 0.36214501685919137, + -0.3180818934643774 + ], + [ + 0.45439375112141067, + -0.7491388930304925, + 0.362164583336402, + -0.3180472487974578 + ], + [ + 0.45437829601355045, + -0.7491557465022807, + 0.3621819888740458, + -0.3180098088576414 + ], + [ + 0.45436179187036285, + -0.7491718028922971, + 0.3622004610923178, + -0.31797452385996394 + ], + [ + 0.454342162949133, + -0.7491873749528783, + 0.3622211743220185, + -0.31794228572289124 + ], + [ + 0.45431986068474656, + -0.7492034972067305, + 0.36224463807665896, + -0.3179094307272236 + ], + [ + 0.4542966304866743, + -0.7492188364973339, + 0.3622703913812724, + -0.3178771304993413 + ], + [ + 0.45427333198969067, + -0.7492328653370841, + 0.3622965552173353, + -0.31784754115679353 + ], + [ + 0.45425181736783327, + -0.7492481003313397, + 0.36231900415261187, + -0.31781678652607265 + ], + [ + 0.45423160987697075, + -0.7492651308893313, + 0.36233887493639877, + -0.3177828628667591 + ], + [ + 0.4542131813055781, + -0.7492819445848032, + 0.36235557254176204, + -0.3177505192685193 + ], + [ + 0.45419551343306186, + -0.749297779452735, + 0.36237338113093615, + -0.31771812339275063 + ], + [ + 0.4541788858328354, + -0.7493122546608613, + 0.3623951432992162, + -0.3176829312252102 + ], + [ + 0.45415842814933743, + -0.7493275181851032, + 0.36241972907385517, + -0.3176481270360497 + ], + [ + 0.4541360562007137, + -0.7493419148060991, + 0.362446719247262, + -0.3176153536592457 + ], + [ + 0.45411192679797074, + -0.7493567114151589, + 0.3624729102700571, + -0.3175850536742052 + ], + [ + 0.45408839266097106, + -0.7493722903330804, + 0.362497618773112, + -0.3175537411452631 + ], + [ + 0.4540684618075558, + -0.749387808241867, + 0.36251910227350387, + -0.3175210943181318 + ], + [ + 0.454050717448486, + -0.7494024598539241, + 0.36253942941684686, + -0.3174886789595969 + ], + [ + 0.45403241632233227, + -0.749418808242374, + 0.3625581061786371, + -0.3174549329042543 + ], + [ + 0.45401258205372097, + -0.7494358705982285, + 0.3625764426794499, + -0.31742207612499823 + ], + [ + 0.45399083967056, + -0.7494512599909227, + 0.3625986326222471, + -0.3173914901406702 + ], + [ + 0.45396775712326876, + -0.7494664635818342, + 0.36262209598063394, + -0.31736179821336435 + ] + ], + "angular_velocities": [ + [ + 0.0008284355176041257, + 0.00028156816625015703, + -0.00037071945420561543 + ], + [ + 0.0008076292041395989, + 0.00028711281130822884, + -0.0003765528933676166 + ], + [ + 0.0008314107522713597, + 0.0003002748835591952, + -0.0003703957759088028 + ], + [ + 0.0008194393057436881, + 0.0002849073497955121, + -0.0003583646279068296 + ], + [ + 0.0008305944308944097, + 0.0002941430476649775, + -0.0003780184467424188 + ], + [ + 0.0008236348736230714, + 0.0002884179955573279, + -0.0003625412166783253 + ], + [ + 0.0008238112777380349, + 0.0002965398355973657, + -0.0003822450763260586 + ], + [ + 0.0008167030007172122, + 0.0002877765133920373, + -0.00038198400484761697 + ], + [ + 0.0008272026576631349, + 0.0002964078336821772, + -0.0003485043250619498 + ], + [ + 0.000824788050369862, + 0.00027886345599300737, + -0.0003789092187829667 + ], + [ + 0.0008180763540195826, + 0.0002588849790410663, + -0.0003896647735181266 + ], + [ + 0.000815578650852642, + 0.00027225847040727416, + -0.00036260427323030165 + ], + [ + 0.0008748727475195253, + 0.0003401269728363629, + -0.000361614389228097 + ], + [ + 0.0007973430784484889, + 0.00026087210338126773, + -0.00039838879694052655 + ], + [ + 0.0008176274529243625, + 0.00026936148092348926, + -0.0003372107984912778 + ], + [ + 0.0008310747783066661, + 0.0003122183563092626, + -0.00038540865460711727 + ], + [ + 0.0007908032717888537, + 0.00024085507676483288, + -0.00036765711515575317 + ], + [ + 0.0008223059119192621, + 0.0002891361620007028, + -0.0003878629912045412 + ], + [ + 0.0008326042402785032, + 0.0002968473560857624, + -0.00035707536747184076 + ], + [ + 0.0008353532717339436, + 0.00030152695281388995, + -0.0003942557398823345 + ], + [ + 0.0008198437372680991, + 0.00030214768854295557, + -0.0003580845861949739 + ], + [ + 0.0008382775776130693, + 0.0003161387569807311, + -0.0003636796586363387 + ], + [ + 0.0008458433093168714, + 0.000296104848117408, + -0.0003754463555626162 + ], + [ + 0.0008035605910563771, + 0.0002734985897722747, + -0.00036991558333449953 + ], + [ + 0.0008249735935091151, + 0.00028772908518019755, + -0.0003684427473217841 + ], + [ + 0.000828081726297735, + 0.00030649326041739096, + -0.0003808701493822806 + ], + [ + 0.0008398604254809611, + 0.00028032618302582037, + -0.0003613836724606046 + ], + [ + 0.0008122895060650513, + 0.00028336466213926863, + -0.00036703333457234206 + ], + [ + 0.0008192223817561644, + 0.0002905507710405357, + -0.00036908236868957677 + ], + [ + 0.0008370336552659891, + 0.00032841784460676545, + -0.0003819893294267565 + ], + [ + 0.0008123057426698327, + 0.00026170981272149785, + -0.0003697160447571764 + ], + [ + 0.0008171567127441739, + 0.00029509505259140524, + -0.0003604600490390176 + ], + [ + 0.000831856775538787, + 0.0002923320477802323, + -0.00036946895976634834 + ], + [ + 0.000840820187286992, + 0.00030368006674472717, + -0.0003803086277125283 + ], + [ + 0.0008164667986496671, + 0.0002965038913965085, + -0.00036671083374982533 + ], + [ + 0.0008177282166200292, + 0.00029432605807559677, + -0.0003805516382583414 + ], + [ + 0.000845984417323328, + 0.00030482195511569865, + -0.00037197473009003315 + ], + [ + 0.0008078839322938146, + 0.0002800080267958628, + -0.00036482123645885877 + ], + [ + 0.0008032183771847939, + 0.00029483108293730395, + -0.00035719346758674467 + ], + [ + 0.0008206640645891383, + 0.00028449998620370953, + -0.00038036344033322327 + ], + [ + 0.0008263165963715256, + 0.0003068385213585787, + -0.00039097850141850475 + ], + [ + 0.0008328527367235485, + 0.00028076370526589593, + -0.0003588921742493985 + ], + [ + 0.0008139284198698938, + 0.0002898696033689808, + -0.00036649483048306186 + ], + [ + 0.0008248994690885696, + 0.0003118778171671006, + -0.0003709702185573396 + ], + [ + 0.0008280852598956251, + 0.0002837154423610581, + -0.00036976134169145256 + ], + [ + 0.0008234323306663676, + 0.00028121955192407066, + -0.00037260071675854255 + ], + [ + 0.0008166057194485616, + 0.0003088512703252143, + -0.0003720785430287514 + ], + [ + 0.000827908045119948, + 0.0002926895204224929, + -0.00037485809523140603 + ], + [ + 0.0008342238158170842, + 0.0002943698977547006, + -0.00036081522434546853 + ], + [ + 0.000805903198924602, + 0.0002772446389217614, + -0.0003743294279805358 + ], + [ + 0.0008085424516403292, + 0.0003025267187226294, + -0.0003720286607969407 + ], + [ + 0.0008327490517247634, + 0.0003047015110316522, + -0.00037718173302339885 + ], + [ + 0.0008245016645695057, + 0.00028377915544223087, + -0.0003699175445401428 + ], + [ + 0.0008202058058464492, + 0.00029299532642431607, + -0.00036577390632641557 + ], + [ + 0.0008135159482168758, + 0.0003058724344947461, + -0.0003738882607318055 + ], + [ + 0.0008324080620261484, + 0.000281999604597826, + -0.0003692561064905256 + ], + [ + 0.0008058995597943713, + 0.00029247880948603385, + -0.00036367881547441275 + ], + [ + 0.0008318136144826703, + 0.00030091845627458995, + -0.00037377535437023305 + ], + [ + 0.0008197410939530373, + 0.00030309988385632345, + -0.0003711849497096575 + ], + [ + 0.0008219327497874884, + 0.0002733213049265433, + -0.0003712273696806712 + ], + [ + 0.0008237538381744462, + 0.0002979147974210058, + -0.00036502573562759817 + ], + [ + 0.0008165150291448509, + 0.000302846880313833, + -0.0003703967992096621 + ], + [ + 0.0008292040847646482, + 0.0002972746969279191, + -0.0003704069861328698 + ], + [ + 0.0008132799139205916, + 0.00028698017520720025, + -0.00036402453015059216 + ], + [ + 0.0008253318496541396, + 0.0002885622727877157, + -0.000369935367422562 + ], + [ + 0.0008326369391794861, + 0.00030066910329222307, + -0.0003677734182064654 + ], + [ + 0.0008163910195285257, + 0.00028822080668128097, + -0.00037554355543554076 + ], + [ + 0.0008177432288828616, + 0.00030035175861706486, + -0.000362646029637537 + ], + [ + 0.0008173678125829892, + 0.0003012384403904263, + -0.00037330877981162406 + ], + [ + 0.0008349950442340525, + 0.00030715062985823535, + -0.0003664755724223134 + ], + [ + 0.0008073397586641641, + 0.00028267613234821354, + -0.0003684794392917264 + ], + [ + 0.0008245203165710986, + 0.00029838839100905344, + -0.0003680184653961316 + ], + [ + 0.0008133838693461562, + 0.00029587581743997673, + -0.00037484793909224113 + ], + [ + 0.0008312443445758551, + 0.0002879405338223687, + -0.00036239930462508596 + ], + [ + 0.0008250141085148566, + 0.00028957647253117694, + -0.00037041275559548053 + ], + [ + 0.0008742619462582408, + 0.000392615152288348, + -0.00036877013222107717 + ], + [ + 0.0008373051713591601, + 0.00048206551162206486, + -0.0003500219641961991 + ], + [ + 0.000681989817282503, + 0.00039474679083431933, + -0.0002725183618565618 + ], + [ + 0.0007158145506706544, + 0.00034543817526316433, + -0.00023371115125090842 + ], + [ + 0.0008548049926009917, + 0.00036274855665096906, + -0.0003764656204383837 + ], + [ + 0.0008768613545429926, + 0.0002750772615558659, + -0.00046784970394770427 + ], + [ + 0.0008423362949784143, + 9.927978694295868e-05, + -0.00045976373733320694 + ], + [ + 0.0009171767724015186, + 0.00013113169140583172, + -0.0004418290367055779 + ], + [ + 0.0008887809692087299, + 0.0003103955078945967, + -0.00039571852123857637 + ], + [ + 0.0007678716451314924, + 0.00029504215613696677, + -0.0003348764533452674 + ], + [ + 0.0007280526463691514, + 0.00035660914612411186, + -0.0002746135938286882 + ], + [ + 0.0007284168588866204, + 0.0003863941176976926, + -0.0003593740305007743 + ], + [ + 0.0008383101303134392, + 0.00037323474952690805, + -0.00036330412268435785 + ], + [ + 0.0008599923888509543, + 0.00016144125163348923, + -0.0003382362759809217 + ], + [ + 0.0008576369279462083, + 8.3712660690515e-05, + -0.0003827915818864177 + ], + [ + 0.0009306134829680422, + 0.0001767566544447699, + -0.0004520266854153438 + ], + [ + 0.000867820572584718, + 0.00023665270121756672, + -0.0004628274430121455 + ], + [ + 0.0007623912998876203, + 0.0002855702851926947, + -0.0003767855096346316 + ], + [ + 0.0007612127570684362, + 0.00037096372178290946, + -0.00033453322839030973 + ], + [ + 0.0008021336950334106, + 0.00040990782655568614, + -0.0003376276461139422 + ], + [ + 0.0007855673512065376, + 0.0002829460860943991, + -0.0003287246514671598 + ], + [ + 0.0007983299095803279, + 0.0001909787109615118, + -0.00038119274996902246 + ], + [ + 0.0008923812227933077, + 0.00014902502310015493, + -0.00042078234943485906 + ], + [ + 0.0009273447233314929, + 0.0001672869036474789, + -0.00040991202138663374 + ], + [ + 0.0008305788147943557, + 0.00014025460687711305, + -0.00034625145120930565 + ], + [ + 0.0007990961524683548, + 0.0002502620489924781, + -0.00034048323518839994 + ], + [ + 0.0008082929267075054, + 0.00037338795825740787, + -0.00040017970233756215 + ], + [ + 0.0007541124360754454, + 0.00040233523907099166, + -0.0003855488270738814 + ], + [ + 0.0007782302392832677, + 0.0002844725073945692, + -0.00036662541769734794 + ], + [ + 0.0008369021182147499, + 0.00024121674958703338, + -0.00037630924589535667 + ], + [ + 0.0008989131334523979, + 0.00019860948553139768, + -0.0004069341549486171 + ], + [ + 0.0008755101659818697, + 0.00010383686766911543, + -0.00042727143805204945 + ], + [ + 0.0008391358388512614, + 0.00014844202564022165, + -0.0003951799796032418 + ], + [ + 0.0008324009650474255, + 0.00025361283208415213, + -0.0003714594323615589 + ], + [ + 0.0008267975014290774, + 0.0003254895199165755, + -0.0003366391288235988 + ], + [ + 0.0007580330060659925, + 0.00029518997664478345, + -0.00029465271066631617 + ], + [ + 0.000755050237648724, + 0.0002975797599534989, + -0.0003733722512354457 + ], + [ + 0.0008463605058286069, + 0.00028625557557330724, + -0.0004357813379743785 + ], + [ + 0.0008611741477692213, + 0.00020747302757289547, + -0.00045207237445313135 + ], + [ + 0.0008706038905026095, + 0.00010457498710468946, + -0.00043143891724527596 + ], + [ + 0.0008937911985791525, + 0.0001661799521245531, + -0.0003830932851856362 + ], + [ + 0.0008466287831170897, + 0.00022359014803794325, + -0.00039454566047296245 + ], + [ + 0.00077912975214439, + 0.0002731253250502648, + -0.0003641215848306847 + ], + [ + 0.0007656391398204732, + 0.00030130217252869243, + -0.0003530139146045894 + ], + [ + 0.0008064139699115475, + 0.00031342287935684336, + -0.0003500631876206988 + ], + [ + 0.0008253227761703705, + 0.00024418621128260217, + -0.0003405440768151482 + ], + [ + 0.0008311712684086134, + 0.00015005010372866735, + -0.00038063474334725926 + ], + [ + 0.0008837111794567322, + 0.0001672829877960586, + -0.00044149514141971684 + ] + ], + "reference_frame": 1, + "constant_frames": [ + -74021, + -74000 + ], + "constant_rotation": [ + 0.9999995608798441, + -1.5196024192803497e-05, + 0.0009370214510594062, + 1.527655207535669e-05, + 0.9999999961910578, + -8.593317911879532e-05, + -0.0009370201416476768, + 8.594745584079714e-05, + 0.9999995573030465 + ] + }, + "naif_keywords": { + "BODY499_PM": [ + 176.63, + 350.89198226, + 0 + ], + "BODY499_POLE_DEC": [ + 52.8865, + -0.0609, + 0 + ], + "BODY499_POLE_RA": [ + 317.68143, + -0.1061, + 0 + ], + "BODY499_RADII": [ + 3396.19, + 3396.19, + 3376.2 + ], + "BODY_CODE": 499, + "BODY_FRAME_CODE": 10014, + "FRAME_-74021_CENTER": -74, + "FRAME_-74021_CLASS": 4, + "FRAME_-74021_CLASS_ID": -74021, + "FRAME_-74021_NAME": "MRO_CTX", + "INS-74021_BORESIGHT_LINE": 0.430442527, + "INS-74021_BORESIGHT_SAMPLE": 2543.46099, + "INS-74021_CK_FRAME_ID": -74000, + "INS-74021_CK_REFERENCE_ID": -74900, + "INS-74021_FOCAL_LENGTH": 352.9271664, + "INS-74021_ITRANSL": [ + 0, + 142.85714285714, + 0 + ], + "INS-74021_ITRANSS": [ + 0, + 0, + 142.85714285714 + ], + "INS-74021_OD_K": [ + -0.007343392592005451, + 2.83758786362417e-05, + 1.28419891240271e-08 + ], + "INS-74021_PIXEL_PITCH": 0.007, + "INS-74021_TRANSX": [ + 0, + 0, + 0.007 + ], + "INS-74021_TRANSY": [ + 0, + 0.007, + 0 + ], + "SCLK01_COEFFICIENTS_74999": [ + 0, + -631195148.816, + 1, + 3097283854336, + -583934347.816, + 1, + 5164027215872, + -552398346.816, + 1, + 7230770577408 + ], + "SCLK01_MODULI_74999": [ + 4294967296, + 65536 + ], + "SCLK01_N_FIELDS_74999": 2, + "SCLK01_OFFSETS_74999": [ + 0, + 0 + ], + "SCLK01_OUTPUT_DELIM_74999": 1, + "SCLK01_TIME_SYSTEM_74999": 2, + "SCLK_DATA_TYPE_74999": 1, + "SCLK_PARTITION_END_74999": [ + 52973626698957, + 56987144678331, + 58187590527162.99, + 60316687182323, + 60877152115000, + 61228279788693, + 61339176915162.99, + 61899057915627, + 63521451859691, + 65622287643263 + ], + "SCLK_PARTITION_START_74999": [ + 0, + 52973626982399.99, + 56987144683520, + 58187590533120, + 60316687204352.01, + 60877152124927.99, + 61228279791616, + 61339176927232, + 61899057922048, + 63521451868160 + ], + "TKFRAME_-74021_ANGLES": [ + 0, + 0, + 0 + ], + "TKFRAME_-74021_AXES": [ + 1, + 2, + 3 + ], + "TKFRAME_-74021_RELATIVE": "MRO_CTX_BASE", + "TKFRAME_-74021_SPEC": "ANGLES", + "TKFRAME_-74021_UNITS": "DEGREES", + "CLOCK_ET_-74_0847918635:228_COMPUTED": "cc6b7934e0d5a941" + }, + "detector_sample_summing": 1, + "detector_line_summing": 1, + "focal_length_model": { + "focal_length": 352.9271664 + }, + "detector_center": { + "line": 0.430442527, + "sample": 2542.96099 + }, + "focal2pixel_lines": [ + 0, + 142.85714285714, + 0 + ], + "focal2pixel_samples": [ + 0, + 0, + 142.85714285714 + ], + "optical_distortion": { + "radial": { + "coefficients": [ + -0.007343392592005451, + 2.83758786362417e-05, + 1.28419891240271e-08 + ] + } + }, + "starting_detector_line": 0, + "starting_detector_sample": 0, + "instrument_position": { + "spk_table_start_time": 216723482.23715055, + "spk_table_end_time": 216723495.69148654, + "spk_table_original_size": 3, + "ephemeris_times": [ + 216723482.23715055, + 216723488.96431854, + 216723495.69148654 + ], + "velocities": [ + [ + 1.6087733926312417, + -0.8888423130924722, + 2.8939419102343438 + ], + [ + 1.611893092779976, + -0.908651423509244, + 2.885826547625041 + ], + [ + 1.61494795239872, + -0.9284209739179975, + 2.8775970803878494 + ] + ], + "positions": [ + [ + -529.8262604823674, + 3349.71313744047, + 1363.1894181657883 + ], + [ + -518.9932420440279, + 3343.6670944261364, + 1382.6302189737128 + ], + [ + -508.1394543245507, + 3337.487924379224, + 1402.0160422102003 + ] + ], + "reference_frame": 1 + }, + "sun_position": { + "spk_table_start_time": 216723482.23715055, + "spk_table_end_time": 216723495.69148654, + "spk_table_original_size": 2, + "ephemeris_times": [ + 216723482.23715055, + 216723495.69148654 + ], + "velocities": [ + [ + -16.488525784980506, + 14.827189635728486, + 7.246326588455587 + ], + [ + -16.488550415197388, + 14.827170599350707, + 7.246318522473797 + ] + ], + "positions": [ + [ + 180471539.80115613, + 139494970.71078598, + 59106005.72668789 + ], + [ + 180471317.95882466, + 139495170.20064908, + 59106103.221146174 + ] + ], + "reference_frame": 1 + } +} \ No newline at end of file diff --git a/docs/getting-started/csm-stack/csm-sandbox.ipynb b/docs/getting-started/csm-stack/csm-sandbox.ipynb new file mode 100644 index 00000000..ceb93914 --- /dev/null +++ b/docs/getting-started/csm-stack/csm-sandbox.ipynb @@ -0,0 +1,382 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# CSM Sandbox\n", + "\n", + "[Download This Notebook :octicons-file-code-16:](https://raw.githubusercontent.com/DOI-USGS/asc-public-docs/refs/heads/main/docs/getting-started/csm-stack/csm-sandbox.zip){ .md-button .md-button--primary }\n", + "\n", + "### Install Prerequisites\n", + "```sh\n", + "conda create -n csm-sandbox -c conda-forge knoten=0.4 notebook matplotlib ipywidgets 'ipympl>=0.9.6'\n", + "conda activate csm-sandbox\n", + "```\n", + "\n", + "??? warning \"ARM Compatibility Issues\"\n", + "\n", + " ARM machines may have dependency issues, for now we recommend running in an x86 environment.\n", + "\n", + " On ARM Macs, you can tell conda to create an x86 environment by prefixing your command with `CONDA_SUBDIR=osx-64`:\n", + "\n", + " CONDA_SUBDIR=osx-64 conda create -n csm-sandbox -c conda-forge knoten=0.4 notebook matplotlib ipywidgets 'ipympl>=0.9.6'\n", + "\n", + "\n", + "### Running the notebook on your computer\n", + "\n", + "This notebook has an interactive widget.\n", + "\n", + "To try it, [download](https://raw.githubusercontent.com/DOI-USGS/asc-public-docs/refs/heads/main/docs/getting-started/csm-stack/csm-sandbox.zip) it on your computer and unzip it. In a terminal, `cd` into its folder.\n", + "\n", + "After installing the prerequisites as above, run `jupyter notebook` in that folder to open the notebook in your browser." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Imports" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [], + "source": [ + "%matplotlib widget\n", + "import os # File Path Joining\n", + "import json # Read ISD as python dictionary\n", + "import copy # Important to be able to modify the ISD\n", + "\n", + "from knoten import csm # Knoten CSM\n", + "\n", + "import matplotlib.pyplot as plt # Math and Plotting Tools\n", + "import ipywidgets as widgets\n", + "from ipywidgets import Layout" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "%%html\n", + "\n", + "" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Methods for reading/printing stats" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [], + "source": [ + "def print_stats(dict, search_keys):\n", + " for search_key in search_keys:\n", + " print(f\"{search_key+\": \":<25}\" + str(dict[search_key]))\n", + "\n", + "def plot_footprint(lons, lats, aspect):\n", + " plt.close()\n", + " plt.rcParams['figure.figsize'] = aspect\n", + " plt.axes().set_aspect('equal','datalim')\n", + " plt.plot(lons, lats)\n", + " plt.xlabel('Longitude (deg)')\n", + " plt.ylabel('Latitude (deg)')\n", + " plt.title('CSM footprint')\n", + " plt.show()\n", + "\n", + "def plot_footprint_comparison(fp1, fp2, aspect, dic_o, dic_n):\n", + " plt.clf() # clear previous figure \n", + " \n", + " fp1_plot, = plt.plot(fp1[0], fp1[1], 'b') # Plot footprint 1 in blue\n", + " fp2_plot, = plt.plot(fp2[0], fp2[1], 'r') # Plot footprint 2 in red\n", + " \n", + " plt.title('Original vs. Modified Footprint') # Title and axis labels\n", + " plt.xlabel('Longitude (deg)')\n", + " plt.ylabel('Latitude (deg)')\n", + " fp1_plot.set_label(fp1[2]) # Labels/Legend\n", + " fp2_plot.set_label(fp2[2])\n", + " plt.legend()\n", + " \n", + " plt.axis('equal') # Set equal scale on both axes so the original shape won't be distorted\n", + " plt.grid(color='#DDDDDD', linewidth=0.5) # Grid makes scale/transformation more visible\n", + "\n", + " # Display Values\n", + " \n", + " o_foc_len = dic_o['focal_length_model']['focal_length']\n", + " o_det_cen = (dic_o['detector_center']['line'], dic_o['detector_center']['sample'])\n", + " o_disto = dic_o['optical_distortion']['radial']['coefficients']\n", + " o_eph_time = dic_o['center_ephemeris_time']\n", + " \n", + " n_foc_len = dic_n['focal_length_model']['focal_length']\n", + " n_det_cen = (dic_n['detector_center']['line'], dic_n['detector_center']['sample'])\n", + " n_disto = dic_n['optical_distortion']['radial']['coefficients']\n", + " n_eph_time = dic_n['center_ephemeris_time']\n", + " \n", + " text_labels = ('Focal Length: \\n' +\n", + " 'Detector Center (L, S): \\n' +\n", + " 'Radial Distortion: \\n' + \n", + " 'Ephemeris Center Time: ')\n", + " old_values = (f'{o_foc_len:.0f} \\n' +\n", + " f'({o_det_cen[0]:.0f}, {o_det_cen[1]:.0f}) \\n' +\n", + " f'({o_disto[0]:.2f}, {o_disto[1]:.4f}, {o_disto[2]:.7f}) \\n' + \n", + " f'{o_eph_time:.1f}')\n", + " new_values = (f'→ {n_foc_len:.0f} \\n' +\n", + " f'→ ({n_det_cen[0]:.0f}, {n_det_cen[1]:.0f}) \\n' +\n", + " f'→ ({n_disto[0]:.2f}, {n_disto[1]:.4f}, {n_disto[2]:.7f}) \\n' + \n", + " f'→ {n_eph_time:.1f}')\n", + "\n", + " plt.subplots_adjust(top=0.75) # Set Plot to bottom 3/4\n", + " plt.gcf().text(0.02, 0.85, text_labels, fontsize=10, color='black') # Put text on top\n", + " plt.gcf().text(0.3, 0.85, old_values, fontsize=10, color='blue') # Put text on top\n", + " plt.gcf().text(0.6, 0.85, new_values, fontsize=10, color='red') # Put text on top\n", + " \n", + " plt.show() # Show plot" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Stats/Footprint of original ISD" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "focal_length_model: {'focal_length': 352.9271664}\n", + "detector_center: {'line': 0.430442527, 'sample': 2542.96099}\n", + "optical_distortion: {'radial': {'coefficients': [-0.007343392592005451, 2.83758786362417e-05, 1.28419891240271e-08]}}\n", + "center_ephemeris_time: 216723488.96431854\n" + ] + } + ], + "source": [ + "# Load Dict from JSON-style ISD File\n", + "isd_file = 'csm-sandbox-isd-file.json'\n", + "isd_file_mod = 'csm-sandbox-isd-file-mod.json'\n", + "\n", + "# The included ISD file in this example came from\n", + "# the P01_001404_1722_XI_07S090W.IMG MRO CTX image.\n", + "\n", + "with open(isd_file) as json_file:\n", + " isd_dict = json.load(json_file)\n", + "\n", + "# Print selected values from ISD\n", + "print_stats(isd_dict, ('focal_length_model', 'detector_center', 'optical_distortion', 'center_ephemeris_time'))\n", + "\n", + "# Create Camera Model\n", + "camera = csm.create_csm(isd_file)\n", + "\n", + "# Get the footprint using the model\n", + "boundary = csm.generate_boundary((isd_dict['image_lines'], isd_dict['image_samples']))\n", + "lons, lats, alts = csm.generate_latlon_boundary(camera, boundary)\n", + "\n", + "# # This line can plot the footprint of the original ISD\n", + "# plot_footprint(lons, lats, [5,1])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Modify ISD/write to file" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Adjust Sliders to add or subtract from the values at the following ISD Keys.\n", + "Note: \u001b[34mThe original blue footprint is staying in the same place.\u001b[0m\n", + "\u001b[31mThe modifications to the ISD change the geometry of the new red footprint.\u001b[0m\n", + "\n" + ] + }, + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "9be401ac78b94ec0acf58eb457264637", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "interactive(children=(FloatSlider(value=0.0, description='Focal Length', layout=Layout(width='600px'), max=250…" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "# clear the plot from any previous footprints/plots\n", + "plt.close()\n", + "\n", + "# Copy the ISD Dictionary, we will modify it and compare to the original.\n", + "isd_dict_mod = copy.deepcopy(isd_dict)\n", + "\n", + "print('Adjust Sliders to add or subtract from the values at the following ISD Keys.')\n", + "print('Note: \\033[34mThe original blue footprint is staying in the same place.\\033[0m')\n", + "print('\\033[31mThe modifications to the ISD change the geometry of the new red footprint.\\033[0m')\n", + "print()\n", + "\n", + "# Slider Widgets\n", + "wide_lay = Layout(width='600px')\n", + "wide_desc = {'description_width': '150px'}\n", + "@widgets.interact(\n", + " fl_add=widgets.FloatSlider(min=-250, max=250, step=1, description='Focal Length', layout=wide_lay, style=wide_desc, readout_format='.0f'), \n", + " dcl_add=widgets.FloatSlider(min=-4000, max=4000, step=50, description='Detector Center Line', layout=wide_lay, style=wide_desc, readout_format='.0f'),\n", + " dcs_add=widgets.FloatSlider(min=-4000, max=4000, step=50, description='Detector Center Sample', layout=wide_lay, style=wide_desc, readout_format='.0f'),\n", + " opt_x=widgets.FloatSlider(min=-1, max=1, step=0.01, description='Optical Distortion X', layout=wide_lay, style=wide_desc, readout_format='.2f'),\n", + " opt_y=widgets.FloatSlider(min=-0.003, max=0.003, step=0.0001, description='Optical Distortion Y', layout=wide_lay, style=wide_desc, readout_format='.4f'),\n", + " opt_z=widgets.FloatSlider(min=-1e-5, max=1e-5, step=1e-7, description='Optical Distortion Z', layout=wide_lay, style=wide_desc, readout_format='.7f'),\n", + " ect_add=widgets.FloatSlider(min=-20, max=20, step=0.1, description='Exposure (Center) Time', layout=wide_lay, style=wide_desc, readout_format='.1f')\n", + " )\n", + "# This function executed whenever one of the slider widgets is adjusted\n", + "def exec_widget_function(fl_add, dcl_add, dcs_add, opt_x, opt_y, opt_z, ect_add):\n", + "\n", + " # Note: print() statements within this function may cause flickering.\n", + " # Try writing something on the plot instead if you need output.\n", + " \n", + " # If you're curious where the ISD values came from, \n", + " # Detector Center was from NAIF Boresight Line/Sample\n", + " # Optical Distortion was from NAIF OD_K\n", + " # ISIS uses the NAIF Keywords, but Knoten CSM uses other derived ISD values.\n", + "\n", + " old_fl = isd_dict['focal_length_model']['focal_length']\n", + " old_dcl = isd_dict['detector_center']['line']\n", + " old_dcs = isd_dict['detector_center']['sample']\n", + " old_odx = isd_dict['optical_distortion']['radial']['coefficients'][0]\n", + " old_ody = isd_dict['optical_distortion']['radial']['coefficients'][1]\n", + " old_odz = isd_dict['optical_distortion']['radial']['coefficients'][2]\n", + " old_ect = isd_dict['center_ephemeris_time']\n", + " \n", + " new_values = {\n", + " 'focal_length_model': {'focal_length': old_fl + fl_add},\n", + " 'detector_center': {'line': old_dcl + dcl_add, 'sample': old_dcs + dcs_add},\n", + " 'optical_distortion': {'radial': {'coefficients': [old_odx + opt_x, old_ody + opt_y, old_odz + opt_z]}},\n", + " 'center_ephemeris_time': old_ect + ect_add\n", + " }\n", + "\n", + " # Modify Values in Dictionary\n", + " for key,value in new_values.items(): \n", + " isd_dict_mod[key] = new_values[key]\n", + "\n", + " # Write ISD to file\n", + " with open(isd_file_mod, 'w') as json_file:\n", + " json.dump(isd_dict_mod, json_file, indent=4)\n", + "\n", + " # Create Camera Model\n", + " camera = csm.create_csm(isd_file_mod)\n", + "\n", + " # Get the footprint using the model\n", + " boundary_mod = csm.generate_boundary((isd_dict_mod[\"image_lines\"], isd_dict_mod[\"image_samples\"]))\n", + " lons_mod, lats_mod, alts_mod = csm.generate_latlon_boundary(camera, boundary_mod)\n", + "\n", + " # Plot it\n", + " plot_footprint_comparison((lons, lats, \"Original\"),(lons_mod, lats_mod, \"Modified\"), [7,3], isd_dict, isd_dict_mod)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + ".\n", + "\n", + ".\n", + "\n", + ".\n", + "\n", + ".\n", + "\n", + ".\n", + "\n", + ".\n", + "\n", + ".\n", + "\n", + ".\n", + "\n", + ".\n", + "\n", + ".\n", + "\n", + ".\n", + "\n", + ".\n", + "\n", + ".\n", + "\n", + ".\n", + "\n", + ".\n", + "\n", + ".\n", + "\n", + ".\n", + "\n", + "(This empty space below helps the above widget display with less jumping/flickering.)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "csm-sandbox", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.12.11" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/docs/getting-started/csm-stack/csm-sandbox.zip b/docs/getting-started/csm-stack/csm-sandbox.zip new file mode 100644 index 00000000..cf588405 Binary files /dev/null and b/docs/getting-started/csm-stack/csm-sandbox.zip differ diff --git a/mkdocs.yml b/mkdocs.yml index e74b4e8d..e857a873 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -40,6 +40,7 @@ nav: - Getting Started: - Home: getting-started/index.md - CSM Stack: + - CSM Sandbox: getting-started/csm-stack/csm-sandbox.ipynb - Generating an ISD, creating a CSM model, and converting coordinates: getting-started/csm-stack/image-to-ground-tutorial.ipynb - Knoten - Basic Camera Operations: getting-started/csm-stack/knoten-camera-tutorial.ipynb - "Using ISIS: First Steps":