Skip to content

Instantly share code, notes, and snippets.

@jlaura
Created February 27, 2018 16:52
Show Gist options
  • Save jlaura/c5d8506bb5f63654158e17b5cbb41156 to your computer and use it in GitHub Desktop.
Save jlaura/c5d8506bb5f63654158e17b5cbb41156 to your computer and use it in GitHub Desktop.
SpiceWebService - Example Usage - CTX
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import json\n",
"\n",
"import pvl\n",
"import requests"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Create the necessary input data\n",
"\n",
"To create an ISD we require the following:\n",
"\n",
"- target_name, e.g. Mercury\n",
"- capture_date (PDS data product dates appear to be ISO 8601 compliant)\n",
"- instrument, e.g. mdis-nac\n",
"- focal_plane_temperature (optionally included for temperature dependent focal lengths)\n",
"- spacecraft_id, e.g. messenger\n",
"- spacecraft_clock_count, from the label\n",
"- exposure_duration, from the label\n",
"- lighttime_correction, to tell spice what to use\n",
"- min_elevation (make optional?)\n",
"- max_elevation (make optional?)\n",
"\n",
"For the last two, it might be easier/better to take the intital center point from the PDS label and hit a low res. DEM to find these automatically for the user."
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"#label = pvl.load('/data/usgs_csm/CSM-SET/notebooks/J03_046060_1986_XN_18N282W.IMG')\n",
"#print(label)\n",
"label = pvl.load('/data/messenger_sample/EN0211587012M.IMG')\n",
"data = {'target_name': label['TARGET_NAME'],\n",
" 'capture_date': label['START_TIME'].isoformat(),\n",
" 'instrument': label['INSTRUMENT_NAME'], \n",
" 'focal_plane_temperature': label['FOCAL_PLANE_TEMPERATURE'].value,\n",
" 'spacecraft_id' : label['INSTRUMENT_HOST_NAME'],\n",
" 'spacecraft_clock_count': label['SPACECRAFT_CLOCK_START_COUNT'],\n",
" 'exposure_duration': label['EXPOSURE_DURATION'].value,\n",
" 'lighttime_correction':'LT+S', \n",
" 'min_elevation': -100,\n",
" 'max_elevation': 100\n",
" }\n",
"import json\n",
"data = json.dumps(data)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Standard API landing page"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'apis': {'1.0': 'api/1.0'}, 'status': 'success'}"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"r = requests.get('http://smalls:8002')\n",
"r.json()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Pushing the API into a namespace and versioning is good practice"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'data': {'available_missions': {'mercury': {'messenger': '/api/1.0/mercury/messenger'}}},\n",
" 'success': True}"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"r = requests.get('http://smalls:8002/api/1.0')\n",
"r.json()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example listing of the kernels"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"text/plain": [
"{'data': {'meta_kernels': [{'mission': 'mars_reconnaissance_oribter'},\n",
" {'mission': 'messenger'}]},\n",
" 'success': True}"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"r = requests.get('http://smalls:8002/api/1.0/missions')\n",
"r.json()"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'data': {'kernels': {'metakernels': '/api/1.0/missions/mars_reconnaissance_orbiter/metakernels'}},\n",
" 'success': True}"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"r = requests.get('http://smalls:8002/api/1.0/missions/mars_reconnaissance_orbiter')\n",
"r.json()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example generation of the ISD object\n",
"\n",
"Notice that every endpoint returns with a `success` key and a `data` key at the top level. This helps the user know if the call was successful and that all of the response is within the `data` key."
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{\"PDS_VERSION_ID\": \"PDS3\", \"FILE_NAME\": \"J03_046060_1986_XN_18N282W.IMG\", \"RECORD_TYPE\": \"FIXED_LENGTH\", \"RECORD_BYTES\": 5056, \"FILE_RECORDS\": 18433, \"LABEL_RECORDS\": 1, \"^IMAGE\": 2, \"SPACECRAFT_NAME\": \"MARS_RECONNAISSANCE_ORBITER\", \"INSTRUMENT_NAME\": \"CONTEXT CAMERA\", \"INSTRUMENT_HOST_NAME\": \"MARS RECONNAISSANCE ORBITER\", \"MISSION_PHASE_NAME\": \"ESP\", \"TARGET_NAME\": \"MARS\", \"INSTRUMENT_ID\": \"CTX\", \"PRODUCER_ID\": \"MRO_CTX_TEAM\", \"DATA_SET_ID\": \"MRO-M-CTX-2-EDR-L0-V1.0\", \"PRODUCT_CREATION_TIME\": \"2016-10-04T21:05:58\", \"SOFTWARE_NAME\": \"makepds05 $Revision: 1.16 $\", \"UPLOAD_ID\": \"UNK\", \"ORIGINAL_PRODUCT_ID\": \"4A_04_10E803E100\", \"PRODUCT_ID\": \"J03_046060_1986_XN_18N282W\", \"START_TIME\": \"2016-05-24T11:51:26.043000\", \"STOP_TIME\": \"2016-05-24T11:52:00.636000\", \"SPACECRAFT_CLOCK_START_COUNT\": \"1148557929:105\", \"SPACECRAFT_CLOCK_STOP_COUNT\": \"N/A\", \"FOCAL_PLANE_TEMPERATURE\": [295.8, \"K\"], \"SAMPLE_BIT_MODE_ID\": \"SQROOT\", \"OFFSET_MODE_ID\": \"197/230/219\", \"LINE_EXPOSURE_DURATION\": [1.877, \"MSEC\"], \"SAMPLING_FACTOR\": 1, \"SAMPLE_FIRST_PIXEL\": 0, \"RATIONALE_DESC\": \"Ride-along with HiRISE\", \"DATA_QUALITY_DESC\": \"OK\", \"ORBIT_NUMBER\": 46060, \"IMAGE\": {\"LINES\": 18432, \"LINE_SAMPLES\": 5056, \"LINE_PREFIX_BYTES\": 0, \"LINE_SUFFIX_BYTES\": 0, \"SAMPLE_TYPE\": \"UNSIGNED_INTEGER\", \"SAMPLE_BITS\": 8, \"SAMPLE_BIT_MASK\": 255, \"CHECKSUM\": 4012652948, \"SAMPLES\": 5056}}\n"
]
}
],
"source": [
"import datetime\n",
"import json\n",
"import numpy as np\n",
"class NumpyEncoder(json.JSONEncoder):\n",
" def default(self, obj):\n",
" if isinstance(obj, np.ndarray):\n",
" return obj.tolist()\n",
" elif isinstance(obj, datetime.date):\n",
" return obj.isoformat()\n",
" return json.JSONEncoder.default(self, obj)\n",
"\n",
" \n",
"label = pvl.load('/data/usgs_csm/CSM-SET/notebooks/J03_046060_1986_XN_18N282W.IMG')\n",
"# Homogenize the data keys\n",
"label['IMAGE']['SAMPLES'] = label['IMAGE']['LINE_SAMPLES']\n",
"\n",
"# Since we want to pass the 'raw' label, we must serialize it\n",
"data = json.dumps(label, cls=NumpyEncoder)\n",
"\n",
"print(data)"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'data': {'isd': '{\"DT_EPHEM\": 0.15016, \"NUMBER_OF_EPHEM\": 231, \"T0_QUAT\": -17.298431992530823, \"MIN_VALID_HT\": -8000, \"SEMI_MAJOR_AXIS\": 3396190.0, \"QUATERNIONS\": [0.44952472860454074, -0.650326767154696, 0.2332535013479794, 0.5662114608554338, 0.4495527843900355, -0.6503571799691237, 0.2332112057591029, 0.5661716753937452, 0.4495807944710761, -0.6503871990905886, 0.2331684885810699, 0.566132543168713, 0.4496083504336671, -0.6504170958981307, 0.23312591474611905, 0.5660938442144942, 0.44963532207843643, -0.6504470599936377, 0.23308368467835094, 0.5660553817620824, 0.4496615122268406, -0.6504775228895638, 0.2330421128059219, 0.5660166872948886, 0.4496886638761759, -0.6505075510892894, 0.2330007639414586, 0.5659776281442331, 0.4497170872152782, -0.6505372878183401, 0.23295970468270547, 0.565937765676325, 0.44974591414553106, -0.650566941001349, 0.2329188583366568, 0.5658975820912265, 0.44977210359838066, -0.650597101347536, 0.23287794030248082, 0.565858932476413, 0.44979985565551067, -0.6506273731405475, 0.2328354769592473, 0.5658195399963423, 0.44982867257439174, -0.6506579565656467, 0.23279341823821428, 0.5657787671102066, 0.44985794472217094, -0.6506885833831312, 0.2327519741793235, 0.5657373202651791, 0.4498859451822868, -0.6507181958853099, 0.2327105046991074, 0.5656980527400594, 0.44991401014617416, -0.6507482299566599, 0.2326694038112298, 0.5656580886123609, 0.44994199153864206, -0.650777658159179, 0.23262796633114816, 0.5656190176892302, 0.4499698896417468, -0.6508064427553443, 0.23258630179060735, 0.5655808383452341, 0.4499978222845832, -0.6508352557821871, 0.23254537175609383, 0.5655422882905291, 0.4500272840110483, -0.650864645329941, 0.23250376736146366, 0.5655021266696489, 0.45005608579918427, -0.6508941032167026, 0.23246230904893653, 0.5654623426051274, 0.45008350374789474, -0.6509251311563835, 0.23242136572031055, 0.5654216320939353, 0.4501123438999424, -0.6509549585359514, 0.23237858726350616, 0.5653819169444447, 0.4501413199596693, -0.6509842416908488, 0.23233642080087985, 0.565342459668999, 0.45017056983639614, -0.651013459891003, 0.23229391923108844, 0.5653029879473315, 0.4501986557439829, -0.651044387627958, 0.23225179384164388, 0.5652623107565078, 0.45022597175835805, -0.6510741599592226, 0.23221119646779811, 0.5652229408141787, 0.45025359857981934, -0.6511039041744187, 0.23217052591782014, 0.5651833771704502, 0.4502815571116767, -0.6511341593608081, 0.23212899849422397, 0.5651433038589826, 0.45030877739619257, -0.6511637717847857, 0.2320882684125483, 0.5651042231130667, 0.4503354802621276, -0.6511935533244582, 0.2320476183948101, 0.5650653184571157, 0.45036418871337397, -0.6512232256468803, 0.23200570251688377, 0.5650254524375554, 0.4503936656282547, -0.6512527373278486, 0.2319635963492659, 0.5649852281729523, 0.45042375834852016, -0.65128112006671, 0.23192192012154508, 0.5649456288236784, 0.45045315878406833, -0.6513106926594111, 0.23188104572970655, 0.5649048716379343, 0.4504822921575687, -0.6513405315622457, 0.23183966831277503, 0.5648642178376118, 0.4505110834447726, -0.6513700603970479, 0.23179750052892392, 0.5648245097907019, 0.45053902744551727, -0.651400186214922, 0.23175711430062104, 0.5647840491007703, 0.4505678479966847, -0.6514300762847537, 0.23171530668330506, 0.5647437354339917, 0.45059688124628194, -0.6514598022297214, 0.2316734249725597, 0.5647034627584818, 0.45062604411549395, -0.6514885398371572, 0.23163233793699955, 0.5646638919282068, 0.4506571958814003, -0.6515171631950718, 0.2315910300193225, 0.5646229473526104, 0.450684995946088, -0.6515465189476153, 0.23155119662244958, 0.5645832192148745, 0.45071345598598744, -0.6515760292028837, 0.23151008441274049, 0.5645433017728366, 0.4507418880679391, -0.6516050975301769, 0.231468826666619, 0.5645039676523246, 0.450769301208031, -0.6516352613070444, 0.23142639102447995, 0.5644646568626845, 0.4507983208399275, -0.6516642423559155, 0.23138544442430953, 0.5644248092271967, 0.45082707340840183, -0.6516934084975866, 0.2313453677994936, 0.5643845958214403, 0.4508573529883832, -0.6517228962600518, 0.23130393825899093, 0.5643433368904068, 0.4508850594142938, -0.6517526744856733, 0.23126372870543166, 0.5643032892718254, 0.45091471939806305, -0.65178216135547, 0.23122389797730275, 0.5642618531968472, 0.4509443023173574, -0.6518115981035777, 0.23118283336321052, 0.5642210332337231, 0.4509740378131011, -0.6518405753191606, 0.23114207844801396, 0.5641804863311614, 0.451002249408665, -0.6518705377379632, 0.23110085558823806, 0.5641402020809432, 0.4510298055962067, -0.6518998979176409, 0.23106011476092728, 0.5641009315055991, 0.45105821953838854, -0.6519295420697415, 0.23101925929117462, 0.5640606852105128, 0.4510858719262835, -0.6519586120192054, 0.23097840438133363, 0.5640217026604111, 0.45111257872817323, -0.651987613623747, 0.23093913199635974, 0.5639828989492478, 0.45114257341221353, -0.6520171359923194, 0.2308988114302057, 0.5639412839183678, 0.4511717674157337, -0.6520472022022595, 0.23085798759143625, 0.5638998775956607, 0.45119898500944255, -0.6520775047376423, 0.2308189007196977, 0.5638590593509423, 0.45122806228431434, -0.6521076467667761, 0.23077739440277023, 0.5638179201374404, 0.4512584019353596, -0.6521367134319376, 0.230736715269967, 0.5637766666893574, 0.45128762108809833, -0.6521664948750612, 0.23069513361394733, 0.5637358435844444, 0.451316690901417, -0.6521960180571578, 0.23065371581899538, 0.5636953626943125, 0.45134414419419155, -0.6522269202399337, 0.23061408486829219, 0.5636538404697554, 0.4513723428010313, -0.6522575706110795, 0.23057281647900613, 0.5636126737714293, 0.45140064568802946, -0.6522869968281448, 0.23053236461843496, 0.5635724972927467, 0.45143014647105917, -0.6523163334224851, 0.2304911839683221, 0.5635317543140269, 0.4514590560388746, -0.6523462714644024, 0.23044907819114843, 0.5634911580387314, 0.45148765806234203, -0.6523763247035061, 0.23040839708863112, 0.5634500830905743, 0.45151612790209034, -0.65240658317164, 0.23036725964207694, 0.5634090540305589, 0.45154414073725296, -0.6524368048287117, 0.23032639273432687, 0.5633683142321285, 0.4515731736450679, -0.652465031010601, 0.23028700982274092, 0.563328452378679, 0.45160244387660875, -0.6524942492005367, 0.23024843811034196, 0.5632869110787597, 0.4516320144199168, -0.6525234689758131, 0.23020880866500182, 0.5632455507146237, 0.45166026671420795, -0.6525530328205538, 0.23016807955760157, 0.5632052893760086, 0.45169033014466836, -0.6525829191180362, 0.2301251831915591, 0.5631640785687902, 0.451720623201462, -0.6526126965672979, 0.23008339354653842, 0.5631223480450334, 0.45175059497441844, -0.6526424868121733, 0.23004211385588047, 0.5630806427152326, 0.4517792893306829, -0.6526719045146877, 0.23000325976943925, 0.5630393940786608, 0.4518110429100358, -0.6526998316521818, 0.22996308408785182, 0.5629979495722548, 0.4518405365728639, -0.652729009207326, 0.22992178296881755, 0.5629573196657178, 0.4518700258135823, -0.6527581962490754, 0.22988066463358642, 0.5629165986436238, 0.4518983449585768, -0.6527872254819658, 0.2298410432932213, 0.562876379757705, 0.45192833097731816, -0.652816158347343, 0.22980192166241045, 0.5628347216198872, 0.4519577281080921, -0.6528458951436323, 0.22976038934088205, 0.5627935791099681, 0.4519865661075996, -0.6528748917135313, 0.2297195943124038, 0.5627534343007159, 0.45201507809428354, -0.6529048204686404, 0.22967890444436048, 0.5627124180587003, 0.45204582551720335, -0.6529322403760274, 0.22964110862430004, 0.5626713270994129, 0.4520753502686492, -0.6529613454306991, 0.2296005828336086, 0.5626303683727681, 0.452105124623588, -0.652990570367513, 0.22955966536858907, 0.5625892207784127, 0.4521340942364313, -0.6530202722665309, 0.22952113672533703, 0.5625471825849427, 0.4521620442798554, -0.6530492563619011, 0.22948269434365365, 0.5625067532702228, 0.4521915407358892, -0.653077342707345, 0.22944302545924755, 0.5624666150069025, 0.4522214432049795, -0.6531060257645768, 0.22940270574323657, 0.5624257142176978, 0.4522481701063799, -0.6531366184512141, 0.22936214364939006, 0.5623852392569535, 0.4522771244587659, -0.6531658208405516, 0.2293217015845919, 0.5623445299452516, 0.4523060891298957, -0.6531956715061952, 0.22928190164958967, 0.562302788573503, 0.45233552048975717, -0.6532253709092862, 0.22924136999198166, 0.5622611368286851, 0.4523638256058242, -0.653255536030666, 0.22920100333566304, 0.562219773752646, 0.45239112541272286, -0.653286772226884, 0.2291621397220717, 0.5621773533318388, 0.4524207081120957, -0.6533155793495944, 0.229122031246426, 0.5621364171159573, 0.45245067825529434, -0.6533442897325978, 0.22908199812767255, 0.562095241888743, 0.45247995509684674, -0.6533733258276944, 0.2290448145202854, 0.5620530760291069, 0.45251015984627013, -0.6534024456132536, 0.22900462181163972, 0.5620112832420986, 0.4525403585425994, -0.6534322049803242, 0.22896359096068372, 0.561969084024269, 0.452570236112951, -0.6534612400044167, 0.22892392289143232, 0.5619274212249793, 0.45259965304907235, -0.6534908130466921, 0.22888415272208026, 0.5618855363471533, 0.4526292569294728, -0.6535196628954468, 0.22884252457775592, 0.561845089793774, 0.45265929891286594, -0.6535490148732328, 0.22880237655065547, 0.5618030942872347, 0.45268908503606115, -0.6535782751893391, 0.2287622049878725, 0.5617614120414725, 0.45271892695768456, -0.6536066724343171, 0.22872420942015176, 0.5617197939798353, 0.4527478247720997, -0.6536356315882621, 0.22868434514511285, 0.561679035186375, 0.4527779782591489, -0.6536646268154934, 0.22864479847448443, 0.5616370840536459, 0.45280813003043224, -0.6536939716944832, 0.22860466572245844, 0.5615949568492924, 0.4528358195138932, -0.6537232582165736, 0.22856690005302574, 0.5615539105304477, 0.4528647265755338, -0.65375272715005, 0.22852933815184306, 0.5615115784838457, 0.4528945097665586, -0.653781919885615, 0.22848970100887733, 0.5614696971225268, 0.452924757501861, -0.6538108425945973, 0.228449958441779, 0.5614277893332078, 0.45295423726112266, -0.6538398862702155, 0.22841034347033676, 0.5613862993208055, 0.4529824836460354, -0.6538696390095221, 0.22837072702710218, 0.5613449703422482, 0.4530122995132878, -0.65389905708012, 0.22833053174017265, 0.5613029911862784, 0.4530421229422179, -0.6539282349497559, 0.22829003395091885, 0.5612613996830652, 0.45307167351724903, -0.6539559747878354, 0.22824946351940795, 0.5612217245426927, 0.45310344120902885, -0.6539841675329597, 0.2282125039940687, 0.5611782543911651, 0.45313466269657543, -0.6540123428529668, 0.2281724688659675, 0.5611364872385713, 0.45316532770354967, -0.6540404039782204, 0.22813267742096394, 0.5610951944403758, 0.4531962827622598, -0.654068784861435, 0.22809204399250219, 0.561053627942711, 0.45322502433681155, -0.6540965478602357, 0.22805404674176563, 0.5610134892824981, 0.4532556291861729, -0.654125051337973, 0.22801442619086115, 0.560971633215079, 0.45328651255294483, -0.654153571073719, 0.22797487803738734, 0.5609294946541219, 0.45331705954811763, -0.6541813697229455, 0.22793584956024693, 0.5608882486871228, 0.4533471036999825, -0.6542085411964762, 0.2278961635448205, 0.5608483991543243, 0.45337624192869386, -0.6542370736644483, 0.22785746153979972, 0.5608072858997399, 0.453406234675864, -0.6542663159242822, 0.22781740853677565, 0.5607651937946136, 0.4534377065647391, -0.6542946985762843, 0.22777869809101456, 0.560722354090009, 0.4534671607468731, -0.6543226360116481, 0.22774006783156206, 0.5606816241246128, 0.4534965716738837, -0.6543511370554206, 0.22770049353401456, 0.5606406461885176, 0.45352652138022453, -0.6543797253855177, 0.22766052133199274, 0.5605992832995529, 0.45355654459540334, -0.6544081316384666, 0.2276194381070689, 0.5605585156751718, 0.4535849505216423, -0.6544374890203898, 0.2275776794738474, 0.5605182115063395, 0.45361498262313726, -0.654466847527195, 0.22753795392412188, 0.5604757555431373, 0.4536445363013995, -0.6544960566389104, 0.2274984804868396, 0.5604337497904489, 0.4536737258524142, -0.6545263773079382, 0.2274580907214497, 0.5603911034667557, 0.45370190691750206, -0.6545551047455304, 0.22741849761606578, 0.5603508021347358, 0.4537321293687401, -0.6545836769946768, 0.22737948296174187, 0.5603087856875784, 0.45376195201043257, -0.6546119775637074, 0.2273414292605879, 0.5602670115931933, 0.4537918955006184, -0.6546404377138185, 0.22730262246022306, 0.5602252499758656, 0.453821518761542, -0.6546698280123866, 0.22726247480147657, 0.5601831958799798, 0.4538514782223245, -0.6546990269766049, 0.22722269564592681, 0.5601409343858885, 0.4538811796378073, -0.6547280935772383, 0.2271831440646252, 0.5600989352821693, 0.4539106843160541, -0.6547572525424683, 0.2271452279220147, 0.5600563153282229, 0.4539406538277539, -0.6547848073206896, 0.22710650328528492, 0.5600155132404545, 0.4539701107209224, -0.6548137937891496, 0.22706872645006101, 0.5599730596232659, 0.45400064196460843, -0.6548433241334873, 0.22703014552352827, 0.5599294160491066, 0.4540307684464967, -0.6548713675107879, 0.22699261242049656, 0.5598874058459903, 0.4540614602697663, -0.6548993870080825, 0.2269546710951744, 0.5598451218526483, 0.4540920763392853, -0.6549280684290066, 0.2269157164599823, 0.5598025268013538, 0.4541226291978692, -0.6549568251923751, 0.2268757652774647, 0.5597602896902423, 0.45415218712890115, -0.6549845787224963, 0.22683818031120348, 0.5597190657060486, 0.45418251347129585, -0.65501311102878, 0.22680039565415427, 0.5596763791410304, 0.4542139054027819, -0.6550411834449478, 0.22676096108559846, 0.5596340256429473, 0.4542455507487466, -0.655069357078046, 0.2267216558129753, 0.5595912864115615, 0.4542777927954476, -0.6550969984062582, 0.22668260822302866, 0.5595485723163024, 0.454309136368484, -0.6551240026852578, 0.22664354440821394, 0.5595073310474588, 0.4543403466889367, -0.655152216663965, 0.22660461477755506, 0.5594647182194656, 0.45437103911239574, -0.6551797307600113, 0.22656598207587103, 0.5594232163426516, 0.45440265638073096, -0.655208107124634, 0.22652743905368874, 0.5593799081018794, 0.45443362881546895, -0.6552368249805867, 0.22648846233500272, 0.5593368900940566, 0.4544644763360513, -0.6552651389447685, 0.2264495833872533, 0.5592943979837736, 0.4544953149712509, -0.6552929352041537, 0.22641093726091108, 0.559252416382213, 0.4545270968153247, -0.6553210076043136, 0.22637389653077852, 0.5592086857538713, 0.45455835566982605, -0.6553495457855963, 0.22633488309576472, 0.5591656237854604, 0.45458887348672194, -0.6553779299530433, 0.22629585041058564, 0.5591233433863112, 0.45461945923573877, -0.6554073686202823, 0.2262560337731602, 0.5590800797950868, 0.4546486604560791, -0.655436034840134, 0.22621618784625744, 0.5590388502911424, 0.4546782267385162, -0.6554637094474639, 0.22617663886860004, 0.5589983575623385, 0.4547093274384915, -0.6554919540813949, 0.22613746986049682, 0.5589557857291415, 0.4547405231144378, -0.6555199253069159, 0.22609888566608413, 0.5589132115666777, 0.4547703659016703, -0.6555489396054217, 0.2260596130481207, 0.5588707841964922, 0.4547991313295379, -0.655578262372577, 0.22602152841748924, 0.5588283821874769, 0.45482994345722416, -0.6556064419859198, 0.22598254714684002, 0.5587860092614055, 0.4548604640195012, -0.6556342669607048, 0.2259434320284181, 0.5587443348993194, 0.4548909086227212, -0.6556621573948069, 0.225904704032785, 0.5587024801346798, 0.4549197858610207, -0.655690944302735, 0.2258657882434118, 0.5586609165609608, 0.45495062620929233, -0.6557191614990471, 0.2258268947288346, 0.5586184051496079, 0.4549808006849083, -0.6557467810925527, 0.2257886306864748, 0.558576874161115, 0.45501213245158995, -0.6557742460712124, 0.22575065041843304, 0.5585344585137468, 0.45504221451038146, -0.65580231915988, 0.2257139539142867, 0.5584918192833181, 0.4550732758375318, -0.6558302289737464, 0.225675852296952, 0.5584491329322531, 0.4551046053041874, -0.6558578009912899, 0.22563765852533452, 0.5584066530450671, 0.455136028739284, -0.6558858040327105, 0.22559834406868476, 0.5583640340900065, 0.45516748884699826, -0.6559142755459509, 0.22556142008867242, 0.5583198599363358, 0.45519925272286066, -0.6559417604518288, 0.22552357622082098, 0.5582769597471101, 0.45523266896316306, -0.6559691038334724, 0.22548508924070274, 0.5582331291268001, 0.45526248543042247, -0.6559981771936094, 0.2254481882832572, 0.5581895513874953, 0.4552932840517242, -0.65602536158341, 0.22541100212025703, 0.5581474989461959, 0.45532437475250154, -0.6560530883946182, 0.22537312135636375, 0.5581048424214008, 0.4553553706355036, -0.6560808498288317, 0.2253362663489568, 0.5580617994355044, 0.45538474034675885, -0.6561090781424439, 0.225298285521155, 0.5580199802691795, 0.4554150177933917, -0.6561371997558569, 0.22525988403511055, 0.5579777068210484, 0.4554468195336116, -0.6561652820839394, 0.22522120372105744, 0.5579343389314374, 0.45547869767931204, -0.6561930978700494, 0.22518302243530353, 0.5578910114663683, 0.455509603891044, -0.6562211897996717, 0.22514474324234252, 0.5578481831208801, 0.45554142463267977, -0.6562478706442257, 0.22510570150472273, 0.5578065667134215, 0.4555721512799103, -0.6562760616325458, 0.22506727804951265, 0.5577638086660456, 0.45560203022132073, -0.6563038867083676, 0.2250294207144054, 0.5577219362394134, 0.4556348135799074, -0.6563311591079528, 0.2249904226107003, 0.5576787928292347, 0.4556645748519852, -0.6563586252693954, 0.22495285154756534, 0.5576373058180811, 0.4556950070739432, -0.6563866466412112, 0.2249145973116058, 0.5575948839033077, 0.45572527894496806, -0.6564144453178656, 0.2248765568286478, 0.5575527601020929, 0.45575684170678826, -0.6564424667604774, 0.22483686132621433, 0.5575099773634995, 0.45578723130429694, -0.6564711922298793, 0.2247978185542299, 0.5574670522331377, 0.45581796065755015, -0.6564991626655876, 0.22476002727823652, 0.5574242247151276, 0.45584922291325736, -0.6565281567703166, 0.2247210992478134, 0.5573802049678519, 0.4558819326977733, -0.6565560459932893, 0.22468234773064852, 0.5573362221564689, 0.45591296071505144, -0.6565832453104853, 0.22464537892254677, 0.557293699909063, 0.45594401949056873, -0.6566114267208581, 0.22460713685603986, 0.5572504997429031, 0.45597526119664944, -0.6566397926400568, 0.22456820291415241, 0.5572072021592855, 0.45600729044788046, -0.6566669553185989, 0.2245295990426552, 0.5571645358462151, 0.45603860321516704, -0.6566938318463083, 0.224491796847432, 0.557122461170597, 0.45607113678092637, -0.6567209444042865, 0.22445382605780315, 0.5570791679322691, 0.45610805359803097, -0.6567457795474374, 0.22441220220786146, 0.55703643326973, 0.45614770654286985, -0.6567686165562941, 0.22436781718006318, 0.5569949162571104, 0.4561823547392452, -0.6567921059388431, 0.22432606451262252, 0.5569556585413742, 0.45620782781646063, -0.6568231526142913, 0.22429083890715296, 0.5569123661862212, 0.45623468152364915, -0.6568554842868912, 0.22425659395980632, 0.5568660235665261, 0.45626449658899193, -0.6568867636264354, 0.22422193587175793, 0.5568186530628288, 0.45629474924541263, -0.6569134789960848, 0.2241861939577147, 0.5567767356518056, 0.45632848574937723, -0.6569371464105387, 0.22414656110280734, 0.5567371174130971, 0.45636203184173557, -0.6569641570376623, 0.22410799894991837, 0.5566932701836266], \"SENSOR_ID\": \"USGS_LINE_SCANNER\", \"SCAN_DURATION\": 34.596864, \"ECCENTRICITY\": 0.10833914355442961, \"STARTING_EPHEMERIS_TIME\": 517362754.228396, \"STARTING_LINE\": 1.0, \"STARTING_SAMPLE\": 0, \"DETECTOR_SAMPLE_ORIGIN\": [2543.46099], \"IMAGE_ID\": \"UNKNOWN\", \"PLATFORM\": 1, \"TOTAL_LINES\": 18432, \"EPHEM_RATES\": [166.6107727887034, -1062.8300821982436, 3261.5206313287936, 166.47778423678395, -1063.2736206521495, 3261.3775562261535, 166.3447834749356, -1063.7171338190603, 3261.2344176853526, 166.21177049711378, -1064.160621690769, 3261.0912157098574, 166.0787452490316, -1064.6040842977243, 3260.9479503034554, 165.94570787426977, -1065.0475215512201, 3260.8046214692995, 165.81265830089012, -1065.490933480938, 3260.6612292106224, 165.6795965497138, -1065.9343200796168, 3260.5177735307584, 165.54652258744918, -1066.3776813375, 3260.374254433054, 165.41343636038283, -1066.8210172947827, 3260.2306719208214, 165.28033803203974, -1067.2643278476278, 3260.087025996874, 165.14722751259498, -1067.7076130344337, 3259.9433166643967, 165.01410482585953, -1068.1508728479228, 3259.799543926264, 164.8809698676666, -1068.5941073225433, 3259.6557077857565, 164.74782283024948, -1069.0373163615106, 3259.5118082453587, 164.6146636126655, -1069.480500000025, 3259.367845308128, 164.48149222706772, -1069.9236582273886, 3259.2238189767622, 164.34830867812016, -1070.3667910371896, 3259.079729253936, 164.21511289478113, -1070.809898466884, 3258.9355761425745, 164.08190501703285, -1071.252980412767, 3258.791359645087, 163.94868499533976, -1071.696036916927, 3258.6470797640836, 163.8154528266687, -1072.1390679637097, 3258.5027365019414, 163.68220851312265, -1072.582073548287, 3258.3583298613707, 163.54895195991946, -1073.0250537063807, 3258.213859844946, 163.41568334841634, -1073.468008339607, 3258.069326454648, 163.28240260598608, -1073.9109374843088, 3257.9247296930125, 163.14910972413685, -1074.3538411280445, 3257.7800695623387, 163.01580462194877, -1074.7967193109378, 3257.6353460650544, 162.88248746844226, -1075.2395719317597, 3257.490559203208, 162.74915819986583, -1075.6823990286362, 3257.345708979072, 162.61581679718006, -1076.1252005884464, 3257.2007953946445, 162.4824632741319, -1076.5679766091232, 3257.055818452472, 162.349097558204, -1077.0107271179606, 3256.9107781548523, 162.21571980173744, -1077.4534520234483, 3256.7656745047298, 162.0823299419742, -1077.8961513576849, 3256.620507503063, 161.94892795931528, -1078.338825114767, 3256.475277151626, 161.81551380564596, -1078.7814733260723, 3256.3299834529325, 161.68208762167097, -1079.224095894496, 3256.1846264084497, 161.5486493396613, -1079.6666928584032, 3256.039206020644, 161.41519897165938, -1080.1092641565967, 3255.8937221355923, 161.28173651414355, -1080.5518097925853, 3255.748174790195, 161.148261880063, -1080.9943298428193, 3255.602564107969, 161.01477523588252, -1081.43682420448, 3255.456890092332, 160.88127651884082, -1081.8792929131564, 3255.3111527470173, 160.74776571440194, -1082.321735967881, 3255.165352075514, 160.61424274923013, -1082.764153396334, 3255.019488081748, 160.48070779874612, -1083.2065451031124, 3254.8735607673107, 160.34716077171123, -1083.648911126346, 3254.727570137432, 160.21360168228986, -1084.091251454727, 3254.5815161958876, 160.08003051881963, -1084.5335660811752, 3254.435398946317, 159.94644720531286, -1084.9758550432362, 3254.2892183925173, 159.81285192897315, -1085.4181182403383, 3254.142974537958, 159.6792445981542, -1085.8603557099775, 3253.996667386251, 159.54562520686895, -1086.3025674451762, 3253.850296941181, 159.4119936842715, -1086.7447534781732, 3253.703863206451, 159.27835020221497, -1087.1869137133197, 3253.557366185595, 159.14469467266073, -1087.629048190228, 3253.410805882427, 159.01102710741176, -1088.071156893128, 3253.264182300426, 158.87734749845217, -1088.5132398185397, 3253.1174954434105, 158.74365577019591, -1088.9552970008513, 3252.9707453152428, 158.60995210360434, -1089.3973283422363, 3252.823931919143, 158.47623639734192, -1089.8393338769006, 3252.677055259003, 158.34250867823536, -1090.2813136027657, 3252.5301153384917, 158.2087689270601, -1090.7232675062949, 3252.3831121611893, 158.07501707447648, -1091.1651956247292, 3252.236045730866, 157.9412532969263, -1091.6070978571672, 3252.0889160509705, 157.80747750739772, -1092.048974244189, 3251.941723125242, 157.67368969051998, -1092.4908247786595, 3251.794466957231, 157.53988979190436, -1092.9326494881834, 3251.6471475508156, 157.40607798160104, -1093.3744482827751, 3251.4997649092807, 157.27225416341813, -1093.816221196464, 3251.352319036177, 157.13841835518534, -1094.2579682192754, 3251.204809935361, 157.00457054398154, -1094.6996893432695, 3251.0572376103487, 156.8707106606598, -1095.1413846080266, 3250.909602064654, 156.7368388717254, -1095.5830539093163, 3250.761903301703, 156.6029551030484, -1096.024697284724, 3250.614141325114, 156.46905934692174, -1096.4663147307197, 3250.4663161385233, 156.33515153671888, -1096.9079062765327, 3250.318427745608, 156.20123182551788, -1097.349471831273, 3250.1704761492992, 156.0673001416365, -1097.7910114272793, 3250.022461353588, 155.93335650389855, -1098.232525052368, 3249.8743833617177, 155.7994008837123, -1098.6740127047035, 3249.726242177345, 155.66543320930452, -1099.115474417896, 3249.5780378038635, 155.53145367406884, -1099.556910090862, 3249.429770244553, 155.39746217405477, -1099.9983197656743, 3249.281439503039, 155.26345872817328, -1100.4397034283838, 3249.133045582545, 155.1294432383335, -1100.8810611150209, 3248.9845884867177, 154.9954158853345, -1101.3223927338988, 3248.836068218768, 154.86137658702953, -1101.7636983143113, 3248.687484782028, 154.7273253543106, -1102.2049778487537, 3248.538838179969, 154.5932621744085, -1102.6462313317563, 3248.390128415964, 154.45918698875482, -1103.0874587960893, 3248.241355493407, 154.32509994127997, -1103.5286601476328, 3248.0925194153497, 154.19100097311699, -1103.9698354156046, 3247.943620185336, 154.05689007052564, -1104.4109845997023, 3247.794657806554, 153.92276725301076, -1104.852107684296, 3247.645632282397, 153.78863242605948, -1105.293204709956, 3247.4965436162597, 153.6544857581012, -1105.7342755794743, 3247.347391811041, 153.52032718813996, -1106.175320321866, 3247.198176870139, 153.38615671022313, -1106.616338935018, 3247.0488987970843, 153.25197423429094, -1107.05733145313, 3246.8995575951008, 153.11777993615866, -1107.4982977769696, 3246.7501532669935, 152.98357374322654, -1107.939237943571, 3246.600685816149, 152.84935564493895, -1108.3801519451556, 3246.45115524602, 152.7151256525025, -1108.821039771818, 3246.3015615593126, 152.58088369282424, -1109.2619014585325, 3246.1519047598495, 152.44662992183206, -1109.7027369014681, 3246.002184815289, 152.31236427069916, -1110.1435461396916, 3245.8524017621944, 152.17808672735984, -1110.5843291685264, 3245.7025556052245, 152.0437972328576, -1111.0250860267945, 3245.5526463478272, 151.9094959354062, -1111.4658166106908, 3245.4026739932297, 151.77518276317736, -1111.9065209611013, 3245.252638544706, 151.64085773114434, -1112.3471990644969, 3245.1025400057733, 151.50652082438415, -1112.7878509188208, 3244.9523783796267, 151.3721719772877, -1113.2284765544744, 3244.8021536699857, 151.237811335545, -1113.6690758779982, 3244.6518658800096, 151.10343884491672, -1114.109648922212, 3244.5015150131603, 150.96905450641455, -1114.5501956770572, 3244.351101072786, 150.83465830983627, -1114.9907161381386, 3244.200624062345, 150.70025018090865, -1115.4312103368559, 3244.0500839854376, 150.5658302989898, -1115.8716781799978, 3243.8994808450448, 150.4313985730335, -1116.3121196995453, 3243.7488146448777, 150.2969549997274, -1116.7525348902423, 3243.5980853881088, 150.16249950997567, -1117.1929237891004, 3243.4472930783863, 150.02803227605986, -1117.633286290444, 3243.2964377188673, 149.89355321576477, -1118.0736224402237, 3243.145519313103, 149.75906231634147, -1118.5139322229984, 3242.9945378644206, 149.6245595962989, -1118.954215633803, 3242.8434933763983, 149.49004497963804, -1119.3944727057985, 3242.6923858523846, 149.3555186205201, -1119.8347033422576, 3242.5412152955596, 149.22098043939135, -1120.2749075827883, 3242.389981709446, 149.08643046337562, -1120.715085412001, 3242.2386850975845, 148.9518685895186, -1121.1552368706775, 3242.087325463502, 148.81729499234015, -1121.5953618610092, 3241.935902810245, 148.68270960135254, -1122.0354604136842, 3241.7844171412803, 148.5481124118654, -1122.4755325255758, 3241.6328684603036, 148.4135034192229, -1122.9155781884278, 3241.481256770604, 148.27888255425825, -1123.3555974356557, 3241.3295820756503, 148.14424998645808, -1123.795590167517, 3241.177844378778, 148.00960563238303, -1124.235556422435, 3241.026043683354, 147.874949490694, -1124.6754961961772, 3240.8741799928757, 147.74028156593712, -1125.115409472822, 3240.722253310757, 147.60560179316363, -1125.555296291843, 3240.570263640721, 147.47091031796776, -1125.9951565545139, 3240.418210985737, 147.3362070743416, -1126.4349902992744, 3240.2660953495347, 147.2014920538035, -1126.8747975129565, 3240.1139167352694, 147.06676520507543, -1127.3145782356396, 3239.961675146815, 146.93202666582965, -1127.7543323660177, 3239.8093705871706, 146.79727637974554, -1128.194059945322, 3239.6570030599123, 146.6625143357885, -1128.6337609570628, 3239.504572568518, 146.5277405366488, -1129.0734354024462, 3239.3520791165774, 146.3929549033498, -1129.5130833078892, 3239.1995227074012, 146.258157615404, -1129.9527045815764, 3239.046903344243, 146.12334858591197, -1130.3922992568796, 3238.8942210308533, 145.98852780719167, -1130.8318673262931, 3238.7414757704464, 145.8536952114942, -1131.2714088269277, 3238.588667566719, 145.7188509741544, -1131.710923659985, 3238.435796422921, 145.58399499680328, -1132.1504118597593, 3238.2828623423984, 145.44912729175599, -1132.589873420351, 3238.1298653288336, 145.31424786721655, -1133.0293083322351, 3237.976805385583, 145.17935664454967, -1133.4687166274803, 3237.8236825162976, 145.04445377181437, -1133.908098215989, 3237.6704967240385, 144.90953920065581, -1134.3474531269997, 3237.5172480124543, 144.77461291020498, -1134.7867813544722, 3237.363936385047, 144.63967491996354, -1135.2260828883807, 3237.2105618452288, 144.50472513476527, -1135.6653577685734, 3237.057124396581, 144.36976373809372, -1136.1046058924642, 3236.903624042202, 144.23479063432427, -1136.543827299757, 3236.750060785938, 144.09980584346314, -1136.9830219798012, 3236.5964346309165, 143.96480927165396, -1137.42218997143, 3236.4427455809855, 143.8298010907941, -1137.8613311734912, 3236.288993639363, 143.69478123465643, -1138.3004456215954, 3236.1351788093316, 143.5597496848592, -1138.7395333114955, 3235.981301098808, 143.42470645568167, -1139.1785942327394, 3235.8273605137942, 143.28965147479855, -1139.6176284203832, 3235.673357050853, 143.1545849040837, -1140.0566357759192, 3235.5192907133255, 143.01950665402592, -1140.4956163364905, 3235.3651615045083, 142.8844167296694, -1140.9345700956815, 3235.210969428096, 142.7493150751151, -1141.373497081739, 3235.056714487437, 142.61420183430909, -1141.8123972051858, 3234.9023966856694, 142.479076940681, -1142.2512704949447, 3234.748016026475, 142.34394038759334, -1142.690116950789, 3234.5935725131394, 142.20879219139402, -1143.1289365568716, 3234.439066149145, 142.07363225491116, -1143.5677293499602, 3234.2844969379935, 141.93846075718997, -1144.0064952368805, 3234.129864882887, 141.80327762321733, -1144.4452342480886, 3233.975169987404, 141.6680828433623, -1144.8839463779627, 3233.820412254764, 141.532876427631, -1145.3226316182609, 3233.665591688633, 141.39765830515506, -1145.761290001747, 3233.510708292432, 141.26242862874, -1146.199921435308, 3233.3557620695065, 141.12718733048808, -1146.63852595015, 3233.2007530231986, 140.99193440433007, -1147.0771035418727, 3233.0456811570807, 140.85666976703664, -1147.5156542456757, 3232.8905464746786, 140.7213936117574, -1147.9541779613094, 3232.7353489793054, 140.5861058407329, -1148.3926747232133, 3232.580088674236, 140.45080645342435, -1148.8311445289037, 3232.4247655632334, 140.31549546464123, -1149.2695873655105, 3232.269379649597, 140.18017278325124, -1149.70800326955, 3232.1139309369905, 140.04483858155808, -1150.1463921437364, 3231.9584194284444, 139.90949279074655, -1150.5847540250115, 3231.802845127784, 139.77413539610825, -1151.0230889034194, 3231.647208038325, 139.63876632889384, -1151.461396815073, 3231.4915081637946, 139.50338575347544, -1151.8996776609094, 3231.335745507201, 139.36799360350844, -1152.3379314809767, 3231.1799200723162, 139.23258986915292, -1152.7761582608728, 3231.0240318625442, 139.09717454982058, -1153.2143579990234, 3230.8680808815757, 138.96174756975483, -1153.6525307246307, 3230.71206713274, 138.82630910808624, -1154.0906763438634, 3230.555990619343, 138.69085907789156, -1154.5287948907253, 3230.399851345085, 138.55539746385367, -1154.9668863579448, 3230.2436493134824, 138.41992429561083, -1155.4049507398527, 3230.0873845279116, 138.2844394925053, -1155.8429880634237, 3229.931056992121, 138.14894320669347, -1156.2809982404146, 3229.7746667092897, 138.01343537575355, -1156.718981300909, 3229.6182136831144, 137.87791598449496, -1157.1569372385386, 3229.461697917003, 137.74238496481755, -1157.594866090292, 3229.3051194148134, 137.6068424828411, -1158.0327677569223, 3229.14847817969, 137.47128846859877, -1158.470642275023, 3228.991774215177, 137.33572290628823, -1158.9084896341471, 3228.8350075249605, 137.2001458198952, -1159.3463098297257, 3228.67817811243, 137.06455711036722, -1159.7841028929445, 3228.521285981438, 136.92895696162776, -1160.2218687285101, 3228.364331135069, 136.79334528774385, -1160.6596073720707, 3228.2073135771197, 136.65772208521, -1161.09731881729, 3228.0502333110817, 136.52208735115607, -1161.535003052714, 3227.893090340552, 136.3864410413132, -1161.9726601156815, 3227.7358846691363, 136.25078328895628, -1162.410289906368, 3227.57861630026, 136.1151140346072, -1162.8478924616293, 3227.4212852373666, 135.97943326772943, -1163.2854677748785, 3227.2638914842278, 135.84374091527067, -1163.7230158826342, 3227.106435044579, 135.70803714481454, -1164.1605366825397, 3226.9489159214027], \"DT_QUAT\": 0.149769974025974, \"FOCAL\": [352.9271664], \"DETECTOR_LINE_ORIGIN\": [0.430442527], \"MOUNTING_ANGLES\": [0.0, 0.0, 0.0], \"T0_EPHEM\": -17.298431992530823, \"DETECTOR_SAMPLE_SUMMING\": 1, \"REFERENCE_HEIGHT\": 30, \"ATMREF\": 0, \"SENSOR_TYPE\": \"USGSAstroLineScanner\", \"TOTAL_SAMPLES\": 5056, \"ABERR\": 0, \"OPTICAL_DIST_COEF\": [-0.0073433925920054505, 2.8375878636241697e-05, 1.2841989124027099e-08], \"COLL_ID\": \"UNKNOWN\", \"DETECTOR_LINE_OFFSET\": 0.0, \"EPHEM_PTS\": [852623.990986641, 3398722.7208626224, 1093595.8213617299, 852648.9991357885, 3398563.093232352, 1094085.5604690283, 852673.9873256014, 3398403.399008307, 1094575.2780734368, 852698.9555678195, 3398243.638168277, 1095064.974205601, 852723.904387106, 3398083.809597552, 1095554.6494357681, 852748.832676175, 3397923.91559476, 1096044.302512987, 852773.740965313, 3397763.9550000606, 1096533.9341046666, 852798.6292567949, 3397603.927860082, 1097023.5441321754, 852823.4975639373, 3397443.834080603, 1097513.1326439725, 852848.3465606273, 3397283.6726546246, 1098002.7001495005, 852873.1748951491, 3397123.4457495655, 1098492.245508017, 852897.9832447184, 3396963.152264986, 1098981.769331827, 852922.7716106174, 3396802.79229011, 1099471.2715287698, 852947.5406222898, 3396642.364518186, 1099960.752770968, 852972.289014821, 3396481.871421982, 1100450.2117350576, 852997.0174245294, 3396321.311740527, 1100939.6491710918, 853021.7258169509, 3396160.685502084, 1101429.0649503195, 853046.4142201988, 3395999.9927346124, 1101918.4590910363, 853071.0832822102, 3395839.2322880793, 1102407.832184618, 853095.7316843449, 3395678.406414123, 1102897.1830606651, 853120.3601194613, 3395517.514061695, 1103386.5122314522, 853144.9684911137, 3395356.5551448176, 1103875.8197760808, 853169.5568628665, 3395195.529760098, 1104365.1056195009, 853194.1258716518, 3395034.436632037, 1104854.3703791993, 853218.6742449399, 3394873.2781775696, 1105343.6128237394, 853243.2026097552, 3394712.0532291457, 1105832.8335566085, 853267.7109260858, 3394550.761728658, 1106322.0326141529, 853292.1998912807, 3394389.402596522, 1106811.2104877522, 853316.6681926766, 3394227.9780802554, 1107300.366071839, 853341.1164870019, 3394066.487131542, 1107789.499900087, 853365.5447293092, 3393904.92964973, 1108278.6119786624, 853389.9530081144, 3393743.3056873814, 1108767.7022790571, 853414.3418240054, 3393581.6140727955, 1109256.7714012098, 853438.7100222412, 3393419.857129546, 1109745.8181538077, 853463.0581732013, 3393258.0337204244, 1110234.843120394, 853487.386339709, 3393096.1438421574, 1110723.8462332704, 853511.6950618294, 3392934.1863560593, 1111212.8281622108, 853535.9831170037, 3392772.1635243543, 1111701.7876966556, 853560.2511634793, 3392610.074247099, 1112190.7253719259, 853584.4991327215, 3392447.918496106, 1112679.6412122548, 853608.7270569201, 3392285.696300279, 1113168.5352107584, 853632.9356227559, 3392123.4065297195, 1113657.4079148732, 853657.1234882957, 3391961.051395799, 1114146.2581888554, 853681.2912667694, 3391798.629866698, 1114635.086588954, 853705.4390815062, 3391636.141905461, 1115123.8930633676, 853729.5674314457, 3391473.586333615, 1115612.6782730883, 853753.6750908609, 3391310.9654822876, 1116101.4409419885, 853777.7627255925, 3391148.2782342057, 1116590.1817130165, 853801.8302764039, 3390985.524540934, 1117078.9005574111, 853825.8777792908, 3390822.704407673, 1117567.597480407, 853849.905885516, 3390659.81671874, 1118056.273022792, 853873.913265401, 3390496.863768466, 1118544.926036241, 853897.9005874642, 3390333.8444283037, 1119033.557078888, 853921.8678748764, 3390170.758683651, 1119522.166138853, 853945.8157009534, 3390007.6053824318, 1120010.7538236766, 853969.7428190684, 3389844.3868137547, 1120499.3189066357, 853993.6499260619, 3389681.101903327, 1120987.8619997993, 854017.5369009845, 3389517.750565933, 1121476.38306158, 854041.4038303057, 3389354.3328605928, 1121964.8821152737, 854065.2513116221, 3389190.847574198, 1122453.3597223123, 854089.0780718765, 3389027.2971174656, 1122941.81471231, 854112.8847302946, 3388863.680231749, 1123430.2476642793, 854136.6713600655, 3388699.9970439435, 1123918.6585174184, 854160.4379040211, 3388536.24745478, 1124407.0473322973, 854184.1849998451, 3388372.430337653, 1124895.414644473, 854207.9113347286, 3388208.5480414634, 1125383.759272145, 854231.617605416, 3388044.5994034354, 1125872.0818066876, 854255.3038494593, 3387880.5843771948, 1126360.3822549863, 854278.9705494873, 3387716.5018373434, 1126848.6611742228, 854302.6165546495, 3387552.3541472284, 1127336.9173555064, 854326.2424811935, 3387388.140117661, 1127825.1513999577, 854349.8482883254, 3387223.8597535873, 1128313.3633142263, 854373.4340032336, 3387059.5130413575, 1128801.5530612578, 854397.0002934932, 3386895.098857009, 1129289.721232193, 854420.5458088141, 3386730.619515551, 1129777.866644283, 854444.0711875112, 3386566.0738230827, 1130265.9898839048, 854467.5765175282, 3386401.4618453113, 1130754.0909133002, 854491.0623167773, 3386236.7823842284, 1131242.1703590052, 854514.5274324154, 3386072.037779643, 1131730.2269805335, 854537.9724381376, 3385907.2268703724, 1132218.261373543, 854561.3972604529, 3385742.3496698993, 1132706.2735739101, 854584.8020293919, 3385577.406161081, 1133194.263503236, 854608.187328579, 3385412.3951835935, 1133682.2317757101, 854631.5518279008, 3385247.3191084317, 1134170.1772040667, 854654.8962637464, 3385082.1767503773, 1134658.1003492698, 854678.2205426404, 3384916.968121113, 1135146.0012101415, 854701.5253123988, 3384751.6920071156, 1135633.8804077473, 854724.8093870234, 3384586.350819867, 1136121.736701136, 854748.0733029892, 3384420.943355147, 1136609.5706731356, 854771.3170635484, 3384255.4696224635, 1137097.382379332, 854794.5407294602, 3384089.9296152988, 1137585.1717042748, 854817.744866795, 3383924.32224991, 1138072.939302787, 854840.9282838346, 3383758.64973716, 1138560.6839737908, 854864.0914966853, 3383592.910988812, 1139048.4062794708, 854887.2346373062, 3383427.105986703, 1139536.1062103116, 854910.357589513, 3383261.234751968, 1140023.783812888, 854933.4610657359, 3383095.2961211754, 1140511.4395989948, 854956.5438107196, 3382929.292437878, 1140999.072369485, 854979.6063279281, 3382763.2224774663, 1141486.6827948322, 855002.6487276538, 3382597.086329814, 1141974.2707641139, 855025.6716207819, 3382430.88278889, 1142461.8369528046, 855048.6737202919, 3382264.6141923773, 1142949.380058416, 855071.6556608379, 3382098.279366407, 1143436.9007640167, 855094.6174685747, 3381931.878339913, 1143924.3990190208, 855117.5591167776, 3381765.411119705, 1144411.8748234292, 855140.4812121687, 3381598.8765268996, 1144899.3287317946, 855163.3825785797, 3381432.2769290456, 1145386.7595751449, 855186.2637248803, 3381265.611109139, 1145874.1679377265, 855209.124719046, 3381098.879072795, 1146361.5538074267, 855231.9662139365, 3380932.0797275696, 1146848.9177566234, 855254.7868790892, 3380765.2153491955, 1147336.2585842737, 855277.5874026649, 3380598.284772666, 1147823.576932107, 855300.3677057814, 3380431.288060838, 1148310.8727177114, 855323.1278994714, 3380264.2251780536, 1148798.145943686, 855345.8685121416, 3380097.0949426685, 1149285.3972059237, 855368.588371548, 3379929.89969865, 1149772.625347568, 855391.2880347861, 3379762.638313132, 1150259.8308977587, 855413.9674794828, 3379595.3107602545, 1150747.0138567304, 855436.6267817453, 3379427.91707345, 1151234.174266541, 855459.2664972509, 3379260.4560535727, 1151721.312638271, 855481.8854185065, 3379092.930088348, 1152208.42780413, 855504.4841267647, 3378925.3379599657, 1152695.5203721249, 855527.0626768823, 3378757.679687859, 1153182.5902876195, 855549.6217037992, 3378589.9541472853, 1153669.6381591046, 855572.1598242123, 3378422.163625682, 1154156.662810708, 855594.6778176152, 3378254.3070297227, 1154643.6647853528, 855617.1755932923, 3378086.384247575, 1155130.6441013194, 855639.653195634, 3377918.3953909287, 1155617.6007391447, 855662.1111999442, 3377750.3392377305, 1156104.53528426, 855684.5483790911, 3377582.2181446385, 1156591.4465360993, 855706.9654149937, 3377414.0309465583, 1157078.3350926861, 855729.3621797208, 3377245.777660541, 1157565.2009343132, 855751.7393976329, 3377077.457118039, 1158052.0446271775, 855774.0958001481, 3376909.071636585, 1158538.8650160716, 855796.4319291362, 3376740.620069912, 1159025.6626648298, 855818.7478706645, 3376572.102422192, 1159512.4375506397, 855841.0436365872, 3376403.5186958597, 1159999.1896668554, 855863.3198095778, 3376234.867763871, 1160485.9196022542, 855885.5750918664, 3376066.1518738954, 1160972.6261968622, 855907.8101576641, 3375897.3699124004, 1161459.3100033484, 855930.0250714759, 3375728.5219333307, 1161945.970960195, 855952.2197228075, 3375559.607848984, 1162432.6091531499, 855974.394778446, 3375390.626593177, 1162919.2251106536, 855996.5489838185, 3375221.580401251, 1163405.817629028, 856018.68299272, 3375052.468192728, 1163892.3873402893, 856040.7967464416, 3374883.289914481, 1164378.9341826697, 856062.890903561, 3374714.0444737407, 1164865.4587722567, 856084.9641814223, 3374544.734106441, 1165351.9598975393, 856107.0172622318, 3374375.3577561867, 1165838.4381610735, 856129.0500455034, 3374205.9153349195, 1166324.8935253227, 856151.0626762845, 3374036.4069530354, 1166811.3260024139, 856173.0556363293, 3373866.8313422366, 1167297.7361704144, 856195.0277411072, 3373697.190890171, 1167784.1228256577, 856216.9795913702, 3373527.4844388943, 1168270.4865505074, 856238.9112098905, 3373357.711949141, 1168756.8273703747, 856260.8232321511, 3373187.872311629, 1169243.1458445794, 856282.7143710696, 3373017.9678580877, 1169729.4407316805, 856304.5852513179, 3372847.99737502, 1170215.712688626, 856326.4358992499, 3372677.960887119, 1170701.9616859537, 856348.2663015008, 3372507.858470296, 1171188.187666197, 856370.0770218138, 3372337.688861084, 1171674.391282718, 856391.8669322272, 3372167.4544456666, 1172160.5712933782, 856413.6365316177, 3371997.1540563884, 1172646.7283311288, 856435.3858823873, 3371826.7876899284, 1173132.8623282688, 856457.1149433663, 3371656.355360231, 1173618.9733033297, 856478.8244138577, 3371485.8559047314, 1174105.0618225106, 856500.5129488923, 3371315.291654419, 1174591.126722772, 856522.1812483901, 3371144.661437766, 1175077.168558431, 856543.8292605802, 3370973.9652767973, 1175563.1873413692, 856565.4576734961, 3370803.2020259737, 1176049.1836430214, 856587.0651698451, 3370632.3739652443, 1176535.1562409424, 856608.6523616549, 3370461.480003665, 1177021.105754087, 856630.219308018, 3370290.520069713, 1177507.0321907543, 856651.7659613787, 3370119.4942110204, 1177992.9355003557, 856673.2929576726, 3369948.4012509263, 1178478.8162930321, 856694.7990363044, 3369777.243552041, 1178964.673349689, 856716.2848507575, 3369606.019915863, 1179450.5072859314, 856737.750430717, 3369434.730377009, 1179936.3180590046, 856759.1962688171, 3369263.3737677806, 1180422.1062581518, 856780.6212475225, 3369091.9524171995, 1180907.8707224661, 856802.0258758331, 3368920.465123531, 1181393.6119870208, 856823.4102924204, 3368748.9119725376, 1181879.3300575316, 856844.7743728742, 3368577.292932986, 1182365.024963694, 856866.118775949, 3368405.6068139714, 1182850.697234883, 856887.4422964662, 3368233.8559950567, 1183336.345691428, 856908.7454763728, 3368062.0392624307, 1183821.9709479837, 856930.0283725503, 3367890.156663376, 1184307.5729603774, 856951.2909796075, 3367718.208188549, 1184793.1517419093, 856972.5338715051, 3367546.192682774, 1185278.7078271867, 856993.7558736933, 3367374.112490006, 1185764.2400845252, 857014.9575268881, 3367201.9663842022, 1186249.7490689475, 857036.1389064272, 3367029.7544659926, 1186735.234771687, 857057.3006328614, 3366857.4755151775, 1187220.6977541805, 857078.4413783486, 3366685.131888593, 1187706.1368783298, 857099.561770023, 3366512.722385911, 1188191.5526789771, 857120.6619017539, 3366340.2470726883, 1188676.9451620707, 857141.7416930847, 3366167.705892071, 1189162.3143228448, 857162.8017986129, 3365995.097740521, 1189647.6607365513, 857183.840953872, 3365822.424900551, 1190132.9832004549, 857204.859793018, 3365649.6862469222, 1190618.2823230461, 857225.8583114343, 3365476.8817565986, 1191103.5580727353, 857246.8371332189, 3365304.01030342, 1191588.8110394832, 857267.7949757831, 3365131.0741714006, 1192074.0400312545, 857288.7325150396, 3364958.072270181, 1192559.2456323106, 857309.6496812962, 3364785.0045301113, 1193044.4278115302, 857330.5465784103, 3364611.871017628, 1193529.5865933886, 857351.4237286558, 3364438.670508027, 1194014.722543604, 857372.2799174702, 3364265.4053802737, 1194499.8344639766, 857393.1157548688, 3364092.07447697, 1194984.9229553982, 857413.9312789198, 3363918.6777673922, 1195469.9879755804, 857434.7264970988, 3363745.2152913534, 1195955.0295506492, 857455.5019124715, 3363571.6858681734, 1196440.0482434921, 857476.2564158401, 3363398.0918339076, 1196925.0428758524, 857496.9905343419, 3363224.4320399803, 1197410.0140182134, 857517.7043160307, 3363050.7064565583, 1197894.9616468137, 857538.3983942568, 3362876.9139672415, 1198379.8863820285, 857559.0714870611, 3362703.056880889, 1198864.7869945266, 857579.7242196316, 3362529.134053299, 1199349.6640505109, 857600.3565842785, 3362355.145448046, 1199834.5176404943, 857620.9686163036, 3362181.0911367475, 1200319.3476312077, 857641.5608972831, 3362006.9699042086, 1200804.1546784176, 857662.1321800709, 3361832.78408336, 1201288.9375670392, 857682.6830954014, 3361658.5325341574, 1201773.6968858545, 857703.2136859354, 3361484.215277377, 1202258.432634629, 857723.7239107868, 3361309.8322338415, 1202743.1447781909, 857744.2143839807, 3361135.3823941206, 1203227.8339043856, 857764.683845978, 3360960.867945458, 1203712.4988404044, 857785.1329176936, 3360786.287776251, 1204197.1401522153, 857805.5616444323, 3360611.6419261764, 1204681.7578381698, 857825.9706521074, 3360436.929208339, 1205166.3524779994, 857846.3586157985, 3360262.151948462, 1205650.922864957], \"CENTER_EPHEMERIS_TIME\": 517362771.526828, \"INT_TIME\": 0.001877, \"NUMBER_OF_QUATERNIONS\": 231, \"ITRANSS\": [0.0, 0.0, 142.85714285714], \"IKCODE\": -74021, \"PLATFORM_ID\": \"UNKNOWN\", \"ISIS_Z_DIRECTION\": 1, \"MAX_VALID_HT\": 8000, \"TRI_PARAMETERS\": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 352.9271664, 0.0, 0.0], \"TRAJ_ID\": \"UNKNOWN\", \"ITRANSL\": [0.0, 142.85714285714, 0.0], \"REF_DATE_TIME\": \"UNKNOWN\"}',\n",
" 'loaded_kernels': None},\n",
" 'success': True}"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"r = requests.post('http://smalls:8002/api/1.0/missions/mars_reconnaissance_orbiter/csm_isd', data=data)\n",
"r.json()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Use the ISD"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"import usgscam as cam\n",
"from cycsm.isd import Isd"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"isd = r.json()['data']['isd']"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"i = Isd.loads(isd)"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"plugin = cam.genericls.GenericLsPlugin()\n",
"camera = plugin.from_isd(i, plugin.modelname(0))"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(18432.0, 5000.0)"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"camera.imagesize"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[701107.7192418213, 3142968.175070605, 1072678.7253195439]"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"xyz = camera.imageToGround(9126, 2500, 0)\n",
"xyz"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[9126.000016312359, 2500.000000206428]"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"camera.groundToImage(*xyz)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Random CTX Image\n",
"\n",
"The above could be perceived as being too canned. Here, pull a random image from the PDS and instantiate a camera model."
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [],
"source": [
"from ftplib import FTP\n",
"import os\n",
"from random import choice"
]
},
{
"cell_type": "code",
"execution_count": 41,
"metadata": {},
"outputs": [],
"source": [
"# Run only once to avoid too many open FTP connections\n",
"ftp = FTP('pdsimage2.wr.usgs.gov')\n",
"ftp.login()\n",
"dirs = ftp.nlst('archive/mro-m-ctx-2-edr-l0-v1.0/')"
]
},
{
"cell_type": "code",
"execution_count": 42,
"metadata": {},
"outputs": [],
"source": [
"data_dir = choice(dirs)\n",
"f = choice(ftp.nlst(data_dir + '/data'))\n",
"fname = os.path.basename(f)\n",
"with open('/data/ctx_sample/{}'.format(fname), 'wb') as file:\n",
" ftp.retrbinary('RETR {}'.format(f), file.write)"
]
},
{
"cell_type": "code",
"execution_count": 43,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'/data/ctx_sample/F04_037269_2011_XI_21N056W.IMG'"
]
},
"execution_count": 43,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"newfile = os.path.join('/data/ctx_sample/{}'.format(fname))\n",
"newfile"
]
},
{
"cell_type": "code",
"execution_count": 34,
"metadata": {},
"outputs": [],
"source": [
"# Utility Func for working with PVL\n",
"def find_in_dict(obj, key):\n",
" \"\"\"\n",
" Recursively find an entry in a dictionary\n",
"\n",
" Parameters\n",
" ----------\n",
" obj : dict\n",
" The dictionary to search\n",
" key : str\n",
" The key to find in the dictionary\n",
"\n",
" Returns\n",
" -------\n",
" item : obj\n",
" The value from the dictionary\n",
" \"\"\"\n",
" if key in obj:\n",
" return obj[key]\n",
" for k, v in obj.items():\n",
" if isinstance(v,dict):\n",
" item = find_in_dict(v, key)\n",
" if item is not None:\n",
" return item\n",
" \n",
"def data_from_cube(header):\n",
" data = {}\n",
" data['START_TIME'] = find_in_dict(header, 'StartTime')\n",
" data['SPACECRAFT_NAME'] = find_in_dict(header, 'SpacecraftName')\n",
" data['INSTRUMENT_NAME'] = find_in_dict(header, 'InstrumentId')\n",
" data['SAMPLING_FACTOR'] = find_in_dict(header, 'SpatialSumming')\n",
" data['SAMPLE_FIRST_PIXEL'] = find_in_dict(header, 'SampleFirstPixel')\n",
" data['IMAGE'] = {}\n",
" data['IMAGE']['LINES'] = find_in_dict(header, 'Lines')\n",
" data['TARGET_NAME'] = find_in_dict(header, 'TargetName')\n",
" data['LINE_EXPOSURE_DURATION'] = find_in_dict(header, 'LineExposureDuration')\n",
" data['SPACECRAFT_CLOCK_START_COUNT'] = find_in_dict(header, 'SpacecraftClockCount')\n",
" return data"
]
},
{
"cell_type": "code",
"execution_count": 35,
"metadata": {
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Processing a new image: /data/CTX/calibrated/B01_010045_1878_XN_07N205W.cal.cub\n",
"{\"START_TIME\": \"2008-09-17T05:08:10.820000\", \"SPACECRAFT_NAME\": \"Mars_Reconnaissance_Orbiter\", \"INSTRUMENT_NAME\": \"CTX\", \"SAMPLING_FACTOR\": 1, \"SAMPLE_FIRST_PIXEL\": 0, \"IMAGE\": {\"LINES\": 7168}, \"TARGET_NAME\": \"Mars\", \"LINE_EXPOSURE_DURATION\": [1.877, \"MSEC\"], \"SPACECRAFT_CLOCK_START_COUNT\": \"0906095311:038\"}\n",
"(7168.0, 5000.0)\n",
"[-3035183.4483585223, 1452666.3622457734, 457215.05215266405]\n"
]
},
{
"data": {
"text/plain": [
"[3584.000022561103, 2500.0000033572246]"
]
},
"execution_count": 35,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import os\n",
"\n",
"# Simple helper function to use the API\n",
"def create_data_pacakge(in_file):\n",
" label = pvl.load(in_file)\n",
" return json.dumps(label, cls=NumpyEncoder)\n",
"\n",
"#newfile = '/data/ctx_sample/F04_037269_2011_XI_21N056W.IMG'\n",
"newfile = '/data/CTX/calibrated/B01_010045_1878_XN_07N205W.cal.cub'\n",
"\n",
"print('Processing a new image: {}'.format(newfile))\n",
"# Call the func to create the data package for submission to the micro-service\n",
"data = pvl.load(newfile)\n",
"if 'cub' in os.path.splitext(newfile)[1]:\n",
" data = data_from_cube(data) \n",
"data = json.dumps(data, cls=NumpyEncoder)\n",
"\n",
"print(data)\n",
"# Call the micro-service\n",
"r = requests.post('http://localhost:5000/api/1.0/missions/mars_reconnaissance_oribter/ctx/csm_isd', data=data)\n",
"\n",
"# Get the ISD back and instantiate a local ISD for the image\n",
"isd = r.json()['data']['isd']\n",
"i = Isd.loads(isd)\n",
"\n",
"# Create the plugin and camera as usual\n",
"plugin = cam.genericls.GenericLsPlugin()\n",
"camera = plugin.from_isd(i, plugin.modelname(0))\n",
"\n",
"shape = camera.imagesize\n",
"# Call I2G\n",
"gnd = camera.imageToGround(shape[0] / 2, shape[1] / 2, 0)\n",
"print(gnd)\n",
"\n",
"# Call G2I\n",
"camera.groundToImage(*gnd)"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(-56.62606257827925, 21.679360463340597)"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import pyproj\n",
"from math import sqrt\n",
"\n",
"semi_major = i.param(\"SEMI_MAJOR_AXIS\")\n",
"semi_minor = semi_major * sqrt(1 - i.param(\"ECCENTRICITY\")**2)\n",
"\n",
"ecef = pyproj.Proj(proj='geocent', a=semi_major, b=semi_minor)\n",
"lla = pyproj.Proj(proj='longlat', a=semi_major, b=semi_minor)\n",
"\n",
"gnd = camera.imageToGround(shape[0], shape[1], 0)\n",
"\n",
"\n",
"lons, lats, alts = pyproj.transform(ecef, lla, gnd[0], gnd[1], gnd[2])\n",
"lons, lats"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Camera Testing",
"language": "python",
"name": "ct"
},
"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.6.3"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment