Skip to content

Commit 533ee04

Browse files
committed
updated notebooks, not all working
1 parent 31775e5 commit 533ee04

16 files changed

+1401
-493
lines changed
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
Status:
2+
3+
No. | Status | Notebooks | | | | notes
4+
-----|----------------------------------|---------------|-------------------|------------------|---------------------------|-------------------|
5+
16 | Total |
6+
4 | Working | bundle-adjust | sensor-utils | usgscsm-isis-cmp | reduced-normal-equations* | (* with warnings) |
7+
4 | File not Located | data-snooping | footprint-control | lm-bundle-adjust | | |
8+
3 | Ale; no driver.to_dict | cassini-iss | lrolroc-nac^ | kaguya-tc^ | | (^ listed twice) |
9+
1 | Ale; no find_child_frame | mdis-isis-csm-cmp |
10+
2 | knoten.create_csm returns None? | mdis-dem | mdis-stereo |
11+
1 | Math Error | bundle-adjust-distributed |
12+
3 | Not Examined in Depth | kaguya-tc | lrolroc-nac | footprint-comparison |
13+
14+
15+
# bundle-adjust-distributed.ipynb
16+
- result = f.result()
17+
- LinAlgError: Singular matrix
18+
19+
# bundle-adjust.ipynb
20+
- Working!
21+
22+
# cassini-iss.ipynb
23+
- Had to download and edit spice data for this
24+
- 'CassiniIssPds3LabelNaifSpiceDriver' object has no attribute 'to_dict'
25+
26+
# data-snooping.ipynb
27+
- On Hold: File not found: control_network_metrics/registration_quality/cubes.lis
28+
29+
# footprint-comparison.ipynb
30+
- Download File: data/J03_045994_1986_XN_18N282W_sorted.cub
31+
- Need 2 ISDs for comparison
32+
- example is from 2 different versions of ALE
33+
- Produce these and store in repo?
34+
35+
# footprint-control.ipynb
36+
- On Hold: Files not found: europa/11ESMORPHY01_Island9... _add.net, .net, .lis
37+
38+
# kaguya-tc.ipynb
39+
- Compressed .sl2 files with spc and ctg files?
40+
- Download File: images/TC2W2B0_01_00366S490E1640.img
41+
42+
# lm-bundle-adjust.ipyn
43+
- On Hold: File not found: /scratch/csm2020/data/cubes2.lis
44+
45+
# lrolroc-nac.ipynb
46+
- Failed to find metakernels. (need to download naif spice data)
47+
48+
# mdis-dem.ipynb
49+
- AttributeError: 'NoneType' object has no attribute 'getImageSize'
50+
- knoten.csm.create_csm returns `None`?
51+
52+
# mdis-isis-csm-cmp.ipynb
53+
- driver.frame_chain has no attribute 'find_child_frame'
54+
55+
# mdis-stereo.ipynb
56+
- AttributeError: 'NoneType' object has no attribute 'getImageSize'
57+
- knoten.csm.create_csm returns `None`?
58+
59+
# reduced-normal-equations.ipynb
60+
- Working with warning:
61+
- FutureWarning: Series.__getitem__ treating keys as positions is deprecated.
62+
In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior).
63+
To access a value by position, use `ser.iloc[pos]`
64+
65+
# reduced-normal-with-cholesky.ipynb
66+
- On Hold: File not found: /scratch/csm2020/test_bundles/cubes_smithed_ground.lis
67+
- requirement: from sksparse.cholmod import cholesky
68+
69+
# sensor-utils.ipynb
70+
- Working!
71+
72+
# usgscsm-isis-cmp.ipynb
73+
- Working!

docs/how-to-guides/knoten-notebooks/bundle-adjust-distributed.ipynb

Lines changed: 134 additions & 54 deletions
Large diffs are not rendered by default.

docs/how-to-guides/knoten-notebooks/bundle-adjust.ipynb

Lines changed: 134 additions & 29 deletions
Large diffs are not rendered by default.

docs/how-to-guides/knoten-notebooks/cassini-iss.ipynb

Lines changed: 56 additions & 15 deletions
Large diffs are not rendered by default.

docs/how-to-guides/knoten-notebooks/footprint-comparison.ipynb

Lines changed: 12 additions & 2 deletions
Large diffs are not rendered by default.

docs/how-to-guides/knoten-notebooks/footprint-control.ipynb

Lines changed: 9 additions & 7 deletions
Large diffs are not rendered by default.

docs/how-to-guides/knoten-notebooks/kaguya-tc.ipynb

Lines changed: 19 additions & 9 deletions
Large diffs are not rendered by default.

docs/how-to-guides/knoten-notebooks/lm-bundle-adjust.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
},
1010
{
1111
"cell_type": "code",
12-
"execution_count": null,
12+
"execution_count": 1,
1313
"metadata": {},
1414
"outputs": [],
1515
"source": [
@@ -312,7 +312,7 @@
312312
"name": "python",
313313
"nbconvert_exporter": "python",
314314
"pygments_lexer": "ipython3",
315-
"version": "3.7.6"
315+
"version": "3.12.4"
316316
}
317317
},
318318
"nbformat": 4,

docs/how-to-guides/knoten-notebooks/lrolroc-nac.ipynb

Lines changed: 29 additions & 10 deletions
Large diffs are not rendered by default.

docs/how-to-guides/knoten-notebooks/mdis-dem.ipynb

Lines changed: 55 additions & 16 deletions
Large diffs are not rendered by default.

docs/how-to-guides/knoten-notebooks/mdis-isis-csm-cmp.ipynb

Lines changed: 44 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,46 +13,37 @@
1313
"metadata": {},
1414
"outputs": [],
1515
"source": [
16+
"import os\n",
17+
"os.environ['ISISROOT'] = '/usr/local/Caskroom/miniconda/base/envs/isis-prod'\n",
18+
"os.environ['ISISDATA'] = '/Volumes/usgs-data/isis-data'\n",
19+
"import urllib.request\n",
20+
"\n",
1621
"import ale\n",
17-
"from ale.drivers.messenger_drivers import MessengerMdisPds3NaifSpiceDriver\n",
22+
"from ale.drivers.mess_drivers import MessengerMdisPds3NaifSpiceDriver\n",
1823
"from ale.formatters.usgscsm_formatter import to_usgscsm\n",
1924
"import json\n",
2025
"import os\n",
21-
"from pysis import isis\n",
26+
"import kalasiris as isis\n",
2227
"import pvl\n",
2328
"import numpy as np\n",
2429
"import knoten\n",
2530
"import csmapi\n",
26-
"from knoten import csm"
31+
"from knoten import csm\n",
32+
"\n",
33+
"ale.spice_root = '/Volumes/usgs-data/spice-data'"
2734
]
2835
},
2936
{
3037
"cell_type": "code",
3138
"execution_count": 2,
3239
"metadata": {},
33-
"outputs": [
34-
{
35-
"name": "stdout",
36-
"output_type": "stream",
37-
"text": [
38-
"cassini: data/cassini/kernels/mk/\n",
39-
"dawn: spice/dawn-m_a-spice-6-v1.0/dawnsp_1000/extras/mk\n",
40-
"kaguya: spice/SELENE/kernels/mk/\n",
41-
"lro: spice/lro-l-spice-6-v1.0/lrosp_1000/extras/mk/\n",
42-
"mdis: spice/mess-e_v_h-spice-6-v1.0/messsp_1000/extras/mk\n",
43-
"mro: spice/mro-m-spice-6-v1.0/mrosp_1000/extras/mk\n",
44-
"spice_root: spice/\n",
45-
"\n",
46-
"MDIS spice directory: spice/mess-e_v_h-spice-6-v1.0/messsp_1000/extras/mk\n"
47-
]
48-
}
49-
],
40+
"outputs": [],
5041
"source": [
5142
"# printing config displays the yaml formatted string\n",
52-
"print(ale.config)\n",
43+
"# print(ale.config) Gone?\n",
5344
"\n",
5445
"# config object is a dictionary so it has the same access patterns \n",
55-
"print('MDIS spice directory:', ale.config['mdis'])\n",
46+
"# print('MDIS spice directory:', ale.config['mdis'])\n",
5647
"\n",
5748
"# updating config for new MDIS path in this notebook \n",
5849
"# Note: this will not change the path in `.ale/config.yml`. This change only lives in the notebook.\n",
@@ -64,9 +55,38 @@
6455
"execution_count": 3,
6556
"metadata": {},
6657
"outputs": [],
58+
"source": [
59+
"# https://pdsimage2.wr.usgs.gov/Messenger/MSGRMDS_1001/DATA/2015_114/\n",
60+
"# https://d3fhgbbgskqro0.cloudfront.net/MSGRMDS_1001/DATA/2015_114/EN1072174528M.IMG\n",
61+
"\n",
62+
"imgurl = 'https://d3fhgbbgskqro0.cloudfront.net/MSGRMDS_1001/DATA/2015_114/EN1072174528M.IMG'\n",
63+
"image_dir = 'data'\n",
64+
"EN1072174528M = os.path.join(image_dir, 'EN1072174528M.IMG')\n",
65+
"downloader = urllib.request.URLopener()\n",
66+
"if not os.path.isfile(EN1072174528M):\n",
67+
" downloader.retrieve(imgurl, EN1072174528M)"
68+
]
69+
},
70+
{
71+
"cell_type": "code",
72+
"execution_count": 6,
73+
"metadata": {},
74+
"outputs": [
75+
{
76+
"ename": "AttributeError",
77+
"evalue": "'FrameChain' object has no attribute 'find_child_frame'",
78+
"output_type": "error",
79+
"traceback": [
80+
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
81+
"\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)",
82+
"Cell \u001b[0;32mIn[6], line 9\u001b[0m\n\u001b[1;32m 6\u001b[0m \u001b[38;5;28;01mwith\u001b[39;00m MessengerMdisPds3NaifSpiceDriver(fileName) \u001b[38;5;28;01mas\u001b[39;00m driver:\n\u001b[1;32m 7\u001b[0m \u001b[38;5;66;03m# Get rotation from target_frame to j2000\u001b[39;00m\n\u001b[1;32m 8\u001b[0m j2000 \u001b[38;5;241m=\u001b[39m driver\u001b[38;5;241m.\u001b[39mframe_chain\n\u001b[0;32m----> 9\u001b[0m target_frame \u001b[38;5;241m=\u001b[39m \u001b[43mj2000\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mfind_child_frame\u001b[49m(driver\u001b[38;5;241m.\u001b[39mtarget_frame_id)\n\u001b[1;32m 10\u001b[0m rotation \u001b[38;5;241m=\u001b[39m target_frame\u001b[38;5;241m.\u001b[39mrotation_to(j2000)\n\u001b[1;32m 12\u001b[0m \u001b[38;5;66;03m# Apply rotation to sensor position and velocity\u001b[39;00m\n",
83+
"\u001b[0;31mAttributeError\u001b[0m: 'FrameChain' object has no attribute 'find_child_frame'"
84+
]
85+
}
86+
],
6787
"source": [
6888
"# change to desired PDS3 image path \n",
69-
"fileName = 'EN1072174528M.IMG'\n",
89+
"fileName = EN1072174528M\n",
7090
"\n",
7191
"# metakernels are furnsh-ed when entering the context (with block) with a driver instance\n",
7292
"# most driver constructors simply accept an image path \n",
@@ -322,7 +342,7 @@
322342
"name": "python",
323343
"nbconvert_exporter": "python",
324344
"pygments_lexer": "ipython3",
325-
"version": "3.7.3"
345+
"version": "3.12.4"
326346
}
327347
},
328348
"nbformat": 4,

docs/how-to-guides/knoten-notebooks/mdis-stereo.ipynb

Lines changed: 47 additions & 24 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)