Skip to content
37 changes: 17 additions & 20 deletions ImageD11/nbGui/S3DXRD/0_segment_and_label.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,6 @@
"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:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "fbd76936-7fac-4b03-99eb-2e1651ac4dd5",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"exec(open('/data/id11/nanoscope/install_ImageD11_from_git.py').read())"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -51,13 +39,17 @@
"# to view the tag, select the cell, then find the settings gear icon (right or left sidebar) and look for Cell Tags\n",
"\n",
"# python environment stuff\n",
"CHECKOUT_PATH = None\n",
"IMAGED11_PATH = \"ImageD11\"\n",
"IMAGED11_PATH = None # means do not use git, otherwise \"ImageD11\" or \"ImageD11_version_xx\", etc\n",
"CHECKOUT_PATH = None # None means guess, or you can specify a folder for the checkout\n",
"PYTHONPATH = None\n",
"\n",
"# Experts : update these files for your detector if you need to\n",
"maskfile = \"/data/id11/nanoscope/Eiger/eiger_mask_E-08-0144_20240205.edf\"\n",
"# e2dxfile = \"/data/id11/nanoscope/Eiger/e2dx_E-08-0144_20240205.edf\"\n",
"# e2dyfile = \"/data/id11/nanoscope/Eiger/e2dy_E-08-0144_20240205.edf\"\n",
"maskfile = \"/data/id11/nanoscope/Eiger/eiger_mask_E-08-0144_20250819.edf\"\n",
"# old papermill tests still use e2dx + e2dy\n",
"# if you give e2dxfile, this is used. Otherwise it takes the detector h5 below.\n",
"e2dxfile = None # \"/data/id11/nanoscope/Eiger/e2dx_E-08-0144_20240205.edf\"\n",
"e2dyfile = None # \"/data/id11/nanoscope/Eiger/e2dy_E-08-0144_20240205.edf\"\n",
"# For the future easier to have one detectorh5 (so you can't mix up x/y).\n",
"detectorh5 = \"/data/id11/nanoscope/Eiger/spatial_20250826_LJ/newSpatial_20250819.h5\"\n",
"detector = 'eiger'\n",
"omegamotor = 'rot_center'\n",
Expand Down Expand Up @@ -88,7 +80,9 @@
},
"outputs": [],
"source": [
"PYTHONPATH = setup_ImageD11_from_git(CHECKOUT_PATH, IMAGED11_PATH)"
"if IMAGED11_PATH is not None:\n",
" exec(open('/data/id11/nanoscope/install_ImageD11_from_git.py').read())\n",
" PYTHONPATH=setup_ImageD11_from_git(CHECKOUT_PATH, IMAGED11_PATH)"
]
},
{
Expand Down Expand Up @@ -217,8 +211,11 @@
" )\n",
"ds.import_all() # Can use scans = [f'{scan}.1' for scan in range(1,102)] )\n",
"ds.maskfile = maskfile\n",
"ds.e2dxfile = e2dxfile\n",
"ds.e2dyfile = e2dyfile\n",
"if e2dxfile is not None:\n",
" ds.e2dxfile = e2dxfile\n",
" ds.e2dyfile = e2dyfile\n",
"else:\n",
" ds.detectorh5 = detectorh5\n",
"ds.save()"
]
},
Expand Down
26 changes: 6 additions & 20 deletions ImageD11/nbGui/S3DXRD/0_segment_frelon.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,6 @@
"It will automatically download and install ImageD11 to your home directory"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "2402147c-5513-4907-8ca9-76e3e252df0c",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"exec(open('/data/id11/nanoscope/install_ImageD11_from_git.py').read())"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -63,8 +51,8 @@
"# to view the tag, select the cell, then find the settings gear icon (right or left sidebar) and look for Cell Tags\n",
"\n",
"# python environment stuff\n",
"CHECKOUT_PATH = None\n",
"IMAGED11_PATH = \"ImageD11\"\n",
"IMAGED11_PATH = None # means do not use git, otherwise \"ImageD11\" or \"ImageD11_version_xx\", etc\n",
"CHECKOUT_PATH = None # None means guess, or you can specify a folder for the checkout\n",
"\n",
"# Experts : update these files for your detector if you need to\n",
"\n",
Expand Down Expand Up @@ -110,17 +98,15 @@
{
"cell_type": "code",
"execution_count": null,
"id": "ac4e7e05-93ac-4ffc-849f-9bc581889911",
"id": "2402147c-5513-4907-8ca9-76e3e252df0c",
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": []
},
"outputs": [],
"source": [
"PYTHONPATH = setup_ImageD11_from_git(CHECKOUT_PATH, IMAGED11_PATH)"
"if IMAGED11_PATH is not None:\n",
" exec(open('/data/id11/nanoscope/install_ImageD11_from_git.py').read())\n",
" setup_ImageD11_from_git(CHECKOUT_PATH, IMAGED11_PATH)"
]
},
{
Expand Down
25 changes: 6 additions & 19 deletions ImageD11/nbGui/S3DXRD/4_visualise.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,6 @@
"os.environ['MKL_NUM_THREADS'] = '1'"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"exec(open('/data/id11/nanoscope/install_ImageD11_from_git.py').read())"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -68,8 +59,8 @@
"# to view the tag, select the cell, then find the settings gear icon (right or left sidebar) and look for Cell Tags\n",
"\n",
"# python environment stuff\n",
"CHECKOUT_PATH = None\n",
"IMAGED11_PATH = \"ImageD11\"\n",
"IMAGED11_PATH = None # means do not use git, otherwise \"ImageD11\" or \"ImageD11_version_xx\", etc\n",
"CHECKOUT_PATH = None # None means guess, or you can specify a folder for the checkout\n",
"\n",
"# dataset file to import\n",
"dset_path = 'si_cube_test/processed/Si_cube/Si_cube_S3DXRD_nt_moves_dty/Si_cube_S3DXRD_nt_moves_dty_dataset.h5'\n",
Expand All @@ -84,16 +75,12 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": []
},
"metadata": {},
"outputs": [],
"source": [
"PYTHONPATH = setup_ImageD11_from_git(CHECKOUT_PATH, IMAGED11_PATH)"
"if IMAGED11_PATH is not None:\n",
" exec(open('/data/id11/nanoscope/install_ImageD11_from_git.py').read())\n",
" setup_ImageD11_from_git(CHECKOUT_PATH, IMAGED11_PATH)"
]
},
{
Expand Down
18 changes: 5 additions & 13 deletions ImageD11/nbGui/S3DXRD/5_combine_phases.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,6 @@
"__Date: 21/02/2025__"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "636849a2-54fd-44ce-aca3-cb8e7e945e59",
"metadata": {},
"outputs": [],
"source": [
"exec(open('/data/id11/nanoscope/install_ImageD11_from_git.py').read())"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -45,8 +35,8 @@
"# to view the tag, select the cell, then find the settings gear icon (right or left sidebar) and look for Cell Tags\n",
"\n",
"# python environment stuff\n",
"CHECKOUT_PATH = None\n",
"IMAGED11_PATH = \"ImageD11\"\n",
"IMAGED11_PATH = None # means do not use git, otherwise \"ImageD11\" or \"ImageD11_version_xx\", etc\n",
"CHECKOUT_PATH = None # None means guess, or you can specify a folder for the checkout\n",
"\n",
"# dataset file to import\n",
"dset_path = 'si_cube_test/processed/Si_cube/Si_cube_S3DXRD_nt_moves_dty/Si_cube_S3DXRD_nt_moves_dty_dataset.h5'\n",
Expand All @@ -70,7 +60,9 @@
},
"outputs": [],
"source": [
"PYTHONPATH = setup_ImageD11_from_git(CHECKOUT_PATH, IMAGED11_PATH)"
"if IMAGED11_PATH is not None:\n",
" exec(open('/data/id11/nanoscope/install_ImageD11_from_git.py').read())\n",
" setup_ImageD11_from_git(CHECKOUT_PATH, IMAGED11_PATH)"
]
},
{
Expand Down
8 changes: 5 additions & 3 deletions ImageD11/nbGui/S3DXRD/6_run_papermill.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
"# to view the tag, select the cell, then find the settings gear icon (right or left sidebar) and look for Cell Tags\n",
"\n",
"# python environment stuff\n",
"CHECKOUT_PATH = None\n",
"IMAGED11_PATH = \"ImageD11\"\n",
"IMAGED11_PATH = None # means do not use git, otherwise \"ImageD11\" or \"ImageD11_version_xx\", etc\n",
"CHECKOUT_PATH = None # None means guess, or you can specify a folder for the checkout\n",
"\n",
"# give it a path to an existing dataset to determine the required paths\n",
"dset_path = \"path/to/dataset.h5\"\n",
Expand Down Expand Up @@ -91,7 +91,9 @@
},
"outputs": [],
"source": [
"PYTHONPATH = setup_ImageD11_from_git(CHECKOUT_PATH, IMAGED11_PATH)"
"if IMAGED11_PATH is not None:\n",
" exec(open('/data/id11/nanoscope/install_ImageD11_from_git.py').read())\n",
" setup_ImageD11_from_git(CHECKOUT_PATH, IMAGED11_PATH)"
]
},
{
Expand Down
8 changes: 5 additions & 3 deletions ImageD11/nbGui/S3DXRD/7_stack_layers.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
"# to view the tag, select the cell, then find the settings gear icon (right or left sidebar) and look for Cell Tags\n",
"\n",
"# python environment stuff\n",
"CHECKOUT_PATH = None\n",
"IMAGED11_PATH = \"ImageD11\"\n",
"IMAGED11_PATH = None # means do not use git, otherwise \"ImageD11\" or \"ImageD11_version_xx\", etc\n",
"CHECKOUT_PATH = None # None means guess, or you can specify a folder for the checkout\n",
"\n",
"# supply the path to one dataset file - we'll find the rest automatically\n",
"dset_path = 'si_cube_test/processed/Si_cube/Si_cube_S3DXRD_nt_moves_dty/Si_cube_S3DXRD_nt_moves_dty_dataset.h5'\n",
Expand Down Expand Up @@ -81,7 +81,9 @@
},
"outputs": [],
"source": [
"PYTHONPATH = setup_ImageD11_from_git(CHECKOUT_PATH, IMAGED11_PATH)"
"if IMAGED11_PATH is not None:\n",
" exec(open('/data/id11/nanoscope/install_ImageD11_from_git.py').read())\n",
" setup_ImageD11_from_git(CHECKOUT_PATH, IMAGED11_PATH)"
]
},
{
Expand Down
8 changes: 5 additions & 3 deletions ImageD11/nbGui/S3DXRD/fit_y0.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
"outputs": [],
"source": [
"# python environment stuff\n",
"CHECKOUT_PATH = None\n",
"IMAGED11_PATH = \"ImageD11\"\n",
"IMAGED11_PATH = None # means do not use git, otherwise \"ImageD11\" or \"ImageD11_version_xx\", etc\n",
"CHECKOUT_PATH = None # None means guess, or you can specify a folder for the checkout\n",
"\n",
"dset_path = 'si_cube_test/processed/Si_cube/Si_cube_S3DXRD_nt_moves_dty/Si_cube_S3DXRD_nt_moves_dty_dataset.h5'\n",
"\n",
Expand All @@ -65,7 +65,9 @@
},
"outputs": [],
"source": [
"PYTHONPATH = setup_ImageD11_from_git(CHECKOUT_PATH, IMAGED11_PATH)"
"if IMAGED11_PATH is not None:\n",
" exec(open('/data/id11/nanoscope/install_ImageD11_from_git.py').read())\n",
" setup_ImageD11_from_git(CHECKOUT_PATH, IMAGED11_PATH)"
]
},
{
Expand Down
36 changes: 19 additions & 17 deletions ImageD11/nbGui/S3DXRD/friedel_pair_map.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,6 @@
"Jon Wright. March 2025.\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": []
},
"outputs": [],
"source": [
"exec(open('/data/id11/nanoscope/install_ImageD11_from_git.py').read())"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -50,8 +35,8 @@
"outputs": [],
"source": [
"# python environment stuff\n",
"CHECKOUT_PATH = None\n",
"IMAGED11_PATH = \"ImageD11\"\n",
"IMAGED11_PATH = None # means do not use git, otherwise \"ImageD11\" or \"ImageD11_version_xx\", etc\n",
"CHECKOUT_PATH = None # None means guess, or you can specify a folder for the checkout\n",
"\n",
"\n",
"dset_path = \"/path/to/dataset\"\n",
Expand All @@ -78,6 +63,23 @@
" ytol = 2."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": []
},
"outputs": [],
"source": [
"if IMAGED11_PATH is not None:\n",
" exec(open('/data/id11/nanoscope/install_ImageD11_from_git.py').read())\n",
" setup_ImageD11_from_git(CHECKOUT_PATH, IMAGED11_PATH)"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down
28 changes: 14 additions & 14 deletions ImageD11/nbGui/S3DXRD/import_test_data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,6 @@
"It will automatically download and install ImageD11 to your home directory\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "6f943f39-15ab-4bda-b0d9-38ed46f06b5a",
"metadata": {},
"outputs": [],
"source": [
"exec(open('/data/id11/nanoscope/install_ImageD11_from_git.py').read())"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -60,8 +50,20 @@
"# to view the tag, select the cell, then find the settings gear icon (right or left sidebar) and look for Cell Tags\n",
"download_dir = 'si_cube_test'\n",
"# python environment stuff\n",
"CHECKOUT_PATH = None\n",
"IMAGED11_PATH = \"ImageD11\" # Name of the git checkout folder"
"IMAGED11_PATH = None # means do not use git, otherwise \"ImageD11\" or \"ImageD11_version_xx\", etc\n",
"CHECKOUT_PATH = None # None means guess, or you can specify a folder for the checkout"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "6f943f39-15ab-4bda-b0d9-38ed46f06b5a",
"metadata": {},
"outputs": [],
"source": [
"if IMAGED11_PATH is not None:\n",
" exec(open('/data/id11/nanoscope/install_ImageD11_from_git.py').read())\n",
" setup_ImageD11_from_git(CHECKOUT_PATH, IMAGED11_PATH)"
]
},
{
Expand All @@ -77,8 +79,6 @@
},
"outputs": [],
"source": [
"PYTHONPATH = setup_ImageD11_from_git(CHECKOUT_PATH, IMAGED11_PATH)\n",
"\n",
"import os\n",
"\n",
"import ImageD11.sinograms.dataset\n",
Expand Down
Loading