Skip to content

Commit 39abb7c

Browse files
committed
tests run, cleanup git option to allow running from esrf conda
1 parent d611850 commit 39abb7c

7 files changed

Lines changed: 147 additions & 71 deletions

File tree

ImageD11/nbGui/S3DXRD/0_segment_and_label.ipynb

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,6 @@
2020
"Outside ESRF: download [install_ImageD11_from_git.py](https://github.com/FABLE-3DXRD/ImageD11/tree/master/ImageD11/nbGui/install_ImageD11_from_git.py), and update the path in the next cell:"
2121
]
2222
},
23-
{
24-
"cell_type": "code",
25-
"execution_count": null,
26-
"id": "fbd76936-7fac-4b03-99eb-2e1651ac4dd5",
27-
"metadata": {
28-
"tags": []
29-
},
30-
"outputs": [],
31-
"source": [
32-
"exec(open('/data/id11/nanoscope/install_ImageD11_from_git.py').read())"
33-
]
34-
},
3523
{
3624
"cell_type": "code",
3725
"execution_count": null,
@@ -51,8 +39,8 @@
5139
"# to view the tag, select the cell, then find the settings gear icon (right or left sidebar) and look for Cell Tags\n",
5240
"\n",
5341
"# python environment stuff\n",
54-
"CHECKOUT_PATH = None\n",
55-
"IMAGED11_PATH = \"ImageD11\"\n",
42+
"IMAGED11_PATH = None # means do not use git, otherwise \"ImageD11\" or \"ImageD11_version_xx\", etc\n",
43+
"CHECKOUT_PATH = None # None means guess, or you can specify a folder for the checkout\n",
5644
"\n",
5745
"# Experts : update these files for your detector if you need to\n",
5846
"maskfile = \"/data/id11/nanoscope/Eiger/eiger_mask_E-08-0144_20250819.edf\"\n",
@@ -91,7 +79,9 @@
9179
},
9280
"outputs": [],
9381
"source": [
94-
"PYTHONPATH = setup_ImageD11_from_git(CHECKOUT_PATH, IMAGED11_PATH)"
82+
"if IMAGED11_PATH is not None:\n",
83+
" exec(open('/data/id11/nanoscope/install_ImageD11_from_git.py').read())\n",
84+
" setup_ImageD11_from_git(CHECKOUT_PATH, IMAGED11_PATH)"
9585
]
9686
},
9787
{

ImageD11/nbGui/TDXRD/0_segment_frelon.ipynb

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,6 @@
2626
"It will automatically download and install ImageD11 to your home directory"
2727
]
2828
},
29-
{
30-
"cell_type": "code",
31-
"execution_count": null,
32-
"id": "2402147c-5513-4907-8ca9-76e3e252df0c",
33-
"metadata": {
34-
"tags": []
35-
},
36-
"outputs": [],
37-
"source": [
38-
"exec(open('/data/id11/nanoscope/install_ImageD11_from_git.py').read())"
39-
]
40-
},
4129
{
4230
"cell_type": "code",
4331
"execution_count": null,
@@ -52,7 +40,9 @@
5240
"# this cell is tagged with 'parameters'\n",
5341
"# to view the tag, select the cell, then find the settings gear icon (right or left sidebar) and look for Cell Tags\n",
5442
"\n",
55-
"PYTHONPATH = setup_ImageD11_from_git( ) # ( os.path.join( os.environ['HOME'],'Code'), 'ImageD11_git' )\n",
43+
"# python environment stuff\n",
44+
"IMAGED11_PATH = None # means do not use git, otherwise \"ImageD11\" or \"ImageD11_version_xx\", etc\n",
45+
"CHECKOUT_PATH = None # None means guess, or you can specify a folder for the checkout\n",
5646
"\n",
5747
"# Experts : update these files for your detector if you need to\n",
5848
"\n",
@@ -95,6 +85,18 @@
9585
"scans = [\"1.1\",]"
9686
]
9787
},
88+
{
89+
"cell_type": "code",
90+
"execution_count": null,
91+
"id": "05630edf-0454-442c-a058-b1b775479b72",
92+
"metadata": {},
93+
"outputs": [],
94+
"source": [
95+
"if IMAGED11_PATH is not None:\n",
96+
" exec(open('/data/id11/nanoscope/install_ImageD11_from_git.py').read())\n",
97+
" setup_ImageD11_from_git(CHECKOUT_PATH, IMAGED11_PATH)\n"
98+
]
99+
},
98100
{
99101
"cell_type": "code",
100102
"execution_count": null,
@@ -410,7 +412,14 @@
410412
"name": "python",
411413
"nbconvert_exporter": "python",
412414
"pygments_lexer": "ipython3",
413-
"version": "3.11.6"
415+
"version": "3.12.9"
416+
},
417+
"widgets": {
418+
"application/vnd.jupyter.widget-state+json": {
419+
"state": {},
420+
"version_major": 2,
421+
"version_minor": 0
422+
}
414423
}
415424
},
416425
"nbformat": 4,

ImageD11/nbGui/TDXRD/1_index_default.ipynb

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,6 @@
99
"__Date: 21/02/2025__"
1010
]
1111
},
12-
{
13-
"cell_type": "code",
14-
"execution_count": null,
15-
"metadata": {
16-
"tags": []
17-
},
18-
"outputs": [],
19-
"source": [
20-
"exec(open('/data/id11/nanoscope/install_ImageD11_from_git.py').read())"
21-
]
22-
},
2312
{
2413
"cell_type": "code",
2514
"execution_count": null,
@@ -33,7 +22,9 @@
3322
"# this cell is tagged with 'parameters'\n",
3423
"# to view the tag, select the cell, then find the settings gear icon (right or left sidebar) and look for Cell Tags\n",
3524
"\n",
36-
"PYTHONPATH = setup_ImageD11_from_git( ) # ( os.path.join( os.environ['HOME'],'Code'), 'ImageD11_git' )\n",
25+
"# python environment stuff\n",
26+
"IMAGED11_PATH = None # means do not use git, otherwise \"ImageD11\" or \"ImageD11_version_xx\", etc\n",
27+
"CHECKOUT_PATH = None # None means guess, or you can specify a folder for the checkout\n",
3728
"\n",
3829
"# desination of H5 files\n",
3930
"# replace below with e.g.:\n",
@@ -77,6 +68,19 @@
7768
"dset_prefix = 'ff'"
7869
]
7970
},
71+
{
72+
"cell_type": "code",
73+
"execution_count": null,
74+
"metadata": {
75+
"tags": []
76+
},
77+
"outputs": [],
78+
"source": [
79+
"if IMAGED11_PATH is not None:\n",
80+
" exec(open('/data/id11/nanoscope/install_ImageD11_from_git.py').read())\n",
81+
" setup_ImageD11_from_git(CHECKOUT_PATH, IMAGED11_PATH)"
82+
]
83+
},
8084
{
8185
"cell_type": "code",
8286
"execution_count": null,
@@ -639,7 +643,14 @@
639643
"name": "python",
640644
"nbconvert_exporter": "python",
641645
"pygments_lexer": "ipython3",
642-
"version": "3.11.6"
646+
"version": "3.12.9"
647+
},
648+
"widgets": {
649+
"application/vnd.jupyter.widget-state+json": {
650+
"state": {},
651+
"version_major": 2,
652+
"version_minor": 0
653+
}
643654
}
644655
},
645656
"nbformat": 4,

ImageD11/nbGui/TDXRD/1_index_friedel.ipynb

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@
3939
"# this cell is tagged with 'parameters'\n",
4040
"# to view the tag, select the cell, then find the settings gear icon (right or left sidebar) and look for Cell Tags\n",
4141
"\n",
42-
"PYTHONPATH = setup_ImageD11_from_git( ) # ( os.path.join( os.environ['HOME'],'Code'), 'ImageD11_git' )\n",
42+
"# python environment stuff\n",
43+
"IMAGED11_PATH = None # means do not use git, otherwise \"ImageD11\" or \"ImageD11_version_xx\", etc\n",
44+
"CHECKOUT_PATH = None # None means guess, or you can specify a folder for the checkout\n",
4345
"\n",
4446
"dset_path = ''\n",
4547
"\n",
@@ -94,6 +96,17 @@
9496
"dset_prefix = 'ff'"
9597
]
9698
},
99+
{
100+
"cell_type": "code",
101+
"execution_count": null,
102+
"metadata": {},
103+
"outputs": [],
104+
"source": [
105+
"if IMAGED11_PATH is not None:\n",
106+
" exec(open('/data/id11/nanoscope/install_ImageD11_from_git.py').read())\n",
107+
" setup_ImageD11_from_git(CHECKOUT_PATH, IMAGED11_PATH)"
108+
]
109+
},
97110
{
98111
"cell_type": "code",
99112
"execution_count": null,
@@ -755,7 +768,7 @@
755768
],
756769
"metadata": {
757770
"kernelspec": {
758-
"display_name": "Python 3 (ipykernel)",
771+
"display_name": "Python 3 (main)",
759772
"language": "python",
760773
"name": "python3"
761774
},
@@ -769,7 +782,14 @@
769782
"name": "python",
770783
"nbconvert_exporter": "python",
771784
"pygments_lexer": "ipython3",
772-
"version": "3.12.3"
785+
"version": "3.12.9"
786+
},
787+
"widgets": {
788+
"application/vnd.jupyter.widget-state+json": {
789+
"state": {},
790+
"version_major": 2,
791+
"version_minor": 0
792+
}
773793
}
774794
},
775795
"nbformat": 4,

ImageD11/nbGui/TDXRD/1_index_grid.ipynb

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@
4444
"# this cell is tagged with 'parameters'\n",
4545
"# to view the tag, select the cell, then find the settings gear icon (right or left sidebar) and look for Cell Tags\n",
4646
"\n",
47-
"PYTHONPATH = setup_ImageD11_from_git( ) # ( os.path.join( os.environ['HOME'],'Code'), 'ImageD11_git' )\n",
47+
"# python environment stuff\n",
48+
"IMAGED11_PATH = None # means do not use git, otherwise \"ImageD11\" or \"ImageD11_version_xx\", etc\n",
49+
"CHECKOUT_PATH = None # None means guess, or you can specify a folder for the checkout\n",
4850
"\n",
4951
"# desination of H5 files\n",
5052
"# replace below with e.g.:\n",
@@ -94,6 +96,18 @@
9496
"dset_prefix = 'ff'"
9597
]
9698
},
99+
{
100+
"cell_type": "code",
101+
"execution_count": null,
102+
"id": "696bdb1e-9526-4c3b-b54f-490c1be2fd52",
103+
"metadata": {},
104+
"outputs": [],
105+
"source": [
106+
"if IMAGED11_PATH is not None:\n",
107+
" exec(open('/data/id11/nanoscope/install_ImageD11_from_git.py').read())\n",
108+
" setup_ImageD11_from_git(CHECKOUT_PATH, IMAGED11_PATH)"
109+
]
110+
},
97111
{
98112
"cell_type": "code",
99113
"execution_count": null,
@@ -797,7 +811,7 @@
797811
],
798812
"metadata": {
799813
"kernelspec": {
800-
"display_name": "Python 3 (ipykernel)",
814+
"display_name": "Python 3 (main)",
801815
"language": "python",
802816
"name": "python3"
803817
},
@@ -811,7 +825,14 @@
811825
"name": "python",
812826
"nbconvert_exporter": "python",
813827
"pygments_lexer": "ipython3",
814-
"version": "3.12.3"
828+
"version": "3.12.9"
829+
},
830+
"widgets": {
831+
"application/vnd.jupyter.widget-state+json": {
832+
"state": {},
833+
"version_major": 2,
834+
"version_minor": 0
835+
}
815836
}
816837
},
817838
"nbformat": 4,

ImageD11/nbGui/TDXRD/2_run_papermill.ipynb

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@
4949
"# this cell is tagged with 'parameters'\n",
5050
"# to view the tag, select the cell, then find the settings gear icon (right or left sidebar) and look for Cell Tags\n",
5151
"\n",
52-
"PYTHONPATH = setup_ImageD11_from_git( ) # ( os.path.join( os.environ['HOME'],'Code'), 'ImageD11_git' )\n",
52+
"# python environment stuff\n",
53+
"IMAGED11_PATH = None # means do not use git, otherwise \"ImageD11\" or \"ImageD11_version_xx\", etc\n",
54+
"CHECKOUT_PATH = None # None means guess, or you can specify a folder for the checkout\n",
5355
"\n",
5456
"# give it a path to an existing dataset to determine the required paths\n",
5557
"dset_path = \"path/to/dataset.h5\"\n",
@@ -68,6 +70,18 @@
6870
"notebooks_to_run = None"
6971
]
7072
},
73+
{
74+
"cell_type": "code",
75+
"execution_count": null,
76+
"id": "5fb01b3e-d1e8-42a7-ba93-cc28a4627730",
77+
"metadata": {},
78+
"outputs": [],
79+
"source": [
80+
"if IMAGED11_PATH is not None:\n",
81+
" exec(open('/data/id11/nanoscope/install_ImageD11_from_git.py').read())\n",
82+
" setup_ImageD11_from_git(CHECKOUT_PATH, IMAGED11_PATH)"
83+
]
84+
},
7185
{
7286
"cell_type": "code",
7387
"execution_count": null,
@@ -217,7 +231,14 @@
217231
"name": "python",
218232
"nbconvert_exporter": "python",
219233
"pygments_lexer": "ipython3",
220-
"version": "3.11.6"
234+
"version": "3.12.9"
235+
},
236+
"widgets": {
237+
"application/vnd.jupyter.widget-state+json": {
238+
"state": {},
239+
"version_major": 2,
240+
"version_minor": 0
241+
}
221242
}
222243
},
223244
"nbformat": 4,

ImageD11/nbGui/TDXRD/3_merge_slices.ipynb

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,6 @@
1919
"__Date: 21/02/2025__"
2020
]
2121
},
22-
{
23-
"cell_type": "code",
24-
"execution_count": null,
25-
"id": "ee3ddc28",
26-
"metadata": {
27-
"papermill": {
28-
"duration": 0.017851,
29-
"end_time": "2025-02-17T13:42:50.853074",
30-
"exception": false,
31-
"start_time": "2025-02-17T13:42:50.835223",
32-
"status": "completed"
33-
},
34-
"tags": []
35-
},
36-
"outputs": [],
37-
"source": [
38-
"exec(open('/data/id11/nanoscope/install_ImageD11_from_git.py').read())"
39-
]
40-
},
4122
{
4223
"cell_type": "code",
4324
"execution_count": null,
@@ -59,7 +40,9 @@
5940
"# this cell is tagged with 'parameters'\n",
6041
"# to view the tag, select the cell, then find the settings gear icon (right or left sidebar) and look for Cell Tags\n",
6142
"\n",
62-
"PYTHONPATH = setup_ImageD11_from_git( ) # ( os.path.join( os.environ['HOME'],'Code'), 'ImageD11_git' )\n",
43+
"# python environment stuff\n",
44+
"IMAGED11_PATH = None # means do not use git, otherwise \"ImageD11\" or \"ImageD11_version_xx\", etc\n",
45+
"CHECKOUT_PATH = None # None means guess, or you can specify a folder for the checkout\n",
6346
"\n",
6447
"dset_path = ''\n",
6548
"\n",
@@ -70,6 +53,27 @@
7053
"dset_prefix = \"ff\""
7154
]
7255
},
56+
{
57+
"cell_type": "code",
58+
"execution_count": null,
59+
"id": "ee3ddc28",
60+
"metadata": {
61+
"papermill": {
62+
"duration": 0.017851,
63+
"end_time": "2025-02-17T13:42:50.853074",
64+
"exception": false,
65+
"start_time": "2025-02-17T13:42:50.835223",
66+
"status": "completed"
67+
},
68+
"tags": []
69+
},
70+
"outputs": [],
71+
"source": [
72+
"if IMAGED11_PATH is not None:\n",
73+
" exec(open('/data/id11/nanoscope/install_ImageD11_from_git.py').read())\n",
74+
" setup_ImageD11_from_git(CHECKOUT_PATH, IMAGED11_PATH)"
75+
]
76+
},
7377
{
7478
"cell_type": "code",
7579
"execution_count": null,
@@ -684,7 +688,7 @@
684688
"name": "python",
685689
"nbconvert_exporter": "python",
686690
"pygments_lexer": "ipython3",
687-
"version": "3.11.6"
691+
"version": "3.12.9"
688692
},
689693
"papermill": {
690694
"default_parameters": {},

0 commit comments

Comments
 (0)