diff --git a/examples/40_image_reconstruction.ipynb b/examples/40_image_reconstruction.ipynb index 7ff717c..bf336fd 100644 --- a/examples/40_image_reconstruction.ipynb +++ b/examples/40_image_reconstruction.ipynb @@ -10,7 +10,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "id": "cb3f6968", "metadata": {}, "outputs": [], @@ -23,7 +23,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "id": "7e869404", "metadata": {}, "outputs": [], @@ -63,7 +63,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "id": "322a4981", "metadata": {}, "outputs": [], @@ -96,7 +96,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 4, "id": "a1425f28", "metadata": {}, "outputs": [], @@ -292,7 +292,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 11, "id": "697b2fc1", "metadata": {}, "outputs": [], @@ -363,7 +363,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 13, "id": "c75e5a1e", "metadata": {}, "outputs": [], @@ -857,7 +857,8 @@ " scalars=\"reco_hbo\",\n", " cmap='seismic', # 'gist_earth_r', \n", " clim=(-1.5,1.5),\n", - " scalar_bar_args = {\"title\" : \"HbO / µM\"}\n", + " scalar_bar_args = {\"title\" : \"HbO / µM\"},\n", + " smooth_shading=True\n", " )\n", "\n", " cedalion.plots.plot_labeled_points(plt, geo3d_plot)\n", @@ -922,7 +923,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.8" + "version": "3.11.6" } }, "nbformat": 4, diff --git a/examples/41_photogrammetric_optode_coregistration.ipynb b/examples/41_photogrammetric_optode_coregistration.ipynb index 5772eff..365db1b 100644 --- a/examples/41_photogrammetric_optode_coregistration.ipynb +++ b/examples/41_photogrammetric_optode_coregistration.ipynb @@ -10,7 +10,7 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": null, "id": "6c8067ac", "metadata": {}, "outputs": [], @@ -57,12 +57,12 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 6, "id": "a6a78e01", "metadata": {}, "outputs": [], "source": [ - "pv.set_jupyter_backend(\"static\") # uncomment for static rendering (used for documentation page)\n", + "pv.set_jupyter_backend(\"client\") # uncomment for static rendering (used for documentation page)\n", "#pv.set_jupyter_backend(\"server\") # uncomment for interactive rendering" ] }, @@ -76,7 +76,7 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 7, "id": "418d4b8a", "metadata": {}, "outputs": [], @@ -101,484 +101,10 @@ }, { "cell_type": "code", - "execution_count": 31, + "execution_count": null, "id": "3c5486f9", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[[ 89.200134 6.045319 647.938599]\n", - " [ 89.200134 5.245316 647.979248]\n", - " [ 91.200134 8.845306 647.925781]\n", - " ...\n", - " [124.331436 49.604759 453.649017]\n", - " [122.423584 49.688946 453.390503]\n", - " [124.424706 48.602425 456.144684]]\n", - "[[ 91.200134 8.845306 647.925781]\n", - " [ 89.600143 3.965302 647.806641]\n", - " [ 90.320129 3.245316 647.687866]\n", - " ...\n", - " [ 34.000137 -95.936989 536.323303]\n", - " [ 34.80014 -96.269691 536.323303]\n", - " [ 34.400146 -96.094498 536.323303]]\n", - "O (0.11, 0.21, 0.7, 1)\n", - "[5.23597512e-01 4.48759255e-01 9.35151147e-02 8.64858158e-03\n", - " 8.93259517e-03 2.66685081e-01 3.78303003e-02 1.34638162e-01\n", - " 2.01041160e-01 2.07950339e-01 5.99867454e-01 1.55061135e-01\n", - " 1.32573142e-01 5.40860085e-01 6.75715112e-02 2.75196633e-01\n", - " 2.31770730e-01 2.32193093e-01 1.79171853e-01 3.81408591e-01\n", - " 6.27900170e-02 2.58908591e-01 2.33859153e-01 3.07162376e-01\n", - " 1.87056374e-01 1.54202371e-01 1.68405862e-01 3.98049276e-04\n", - " 4.17392068e-01 1.59042458e-01 1.19970803e-01 2.37379250e-01\n", - " 1.54202981e-01 1.85352073e-01 2.54031272e-01 2.72921653e-01\n", - " 2.36500024e-02 3.66807151e-01 5.10366111e-01 2.97548318e-01\n", - " 4.95936059e-02 2.75944724e-01 1.94567361e-01 3.04259744e-01\n", - " 8.89317847e-02 2.06459251e-01 7.35759497e-02 4.04183450e-01\n", - " 3.54369607e-01 8.14660544e-01 8.88127662e-02 3.15206399e-01\n", - " 3.44967141e-01 9.46686792e-02 9.71631370e-01 1.61189065e-01\n", - " 2.04181008e-01 2.35377097e-01 5.93236184e-01 2.19879661e-01\n", - " 7.68702903e-01]\n", - "6.000872092325179\n", - "surface.crs digitized\n" - ] - }, - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "
<xarray.DataArray (label: 61, digitized: 3)> Size: 1kB\n",
-       "[mm] 168.2 -1.854 604.7 66.57 -45.45 413.9 ... -89.01 501.7 203.5 -9.86 514.2\n",
-       "Coordinates:\n",
-       "  * label    (label) <U4 976B 'O-28' 'O-04' 'O-05' ... 'O-61' 'O-50' 'O-55'\n",
-       "    type     (label) object 488B PointType.UNKNOWN ... PointType.UNKNOWN\n",
-       "    group    (label) <U1 244B 'O' 'O' 'O' 'O' 'O' 'O' ... 'O' 'O' 'O' 'O' 'O'\n",
-       "Dimensions without coordinates: digitized
" - ], - "text/plain": [ - " Size: 1kB\n", - "[mm] 168.2 -1.854 604.7 66.57 -45.45 413.9 ... -89.01 501.7 203.5 -9.86 514.2\n", - "Coordinates:\n", - " * label (label) \n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "
<xarray.DataArray (label: 61, digitized: 3)> Size: 1kB\n",
-       "[mm] 152.4 -3.164 588.6 68.82 -37.57 435.0 ... -70.83 507.3 181.5 -9.018 519.3\n",
-       "Coordinates:\n",
-       "  * label    (label) <U4 976B 'O-28' 'O-04' 'O-05' ... 'O-61' 'O-50' 'O-55'\n",
-       "    type     (label) object 488B PointType.UNKNOWN ... PointType.UNKNOWN\n",
-       "    group    (label) <U1 244B 'O' 'O' 'O' 'O' 'O' 'O' ... 'O' 'O' 'O' 'O' 'O'\n",
-       "Dimensions without coordinates: digitized
" - ], - "text/plain": [ - " Size: 1kB\n", - "[mm] 152.4 -3.164 588.6 68.82 -37.57 435.0 ... -70.83 507.3 181.5 -9.018 519.3\n", - "Coordinates:\n", - " * label (label) \n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "
<xarray.DataArray (label: 5, digitized: 3)> Size: 120B\n",
-       "[mm] 14.0 -7.849 449.8 99.1 29.72 620.7 ... 82.88 79.8 498.3 15.17 -60.56 563.3\n",
-       "Coordinates:\n",
-       "  * label    (label) <U3 60B 'Nz' 'Iz' 'Cz' 'Lpa' 'Rpa'\n",
-       "    type     (label) object 40B PointType.LANDMARK ... PointType.LANDMARK\n",
-       "    group    (label) <U1 20B 'L' 'L' 'L' 'L' 'L'\n",
-       "Dimensions without coordinates: digitized
" - ], - "text/plain": [ - " Size: 120B\n", - "[mm] 14.0 -7.849 449.8 99.1 29.72 620.7 ... 82.88 79.8 498.3 15.17 -60.56 563.3\n", - "Coordinates:\n", - " * label (label) \n", - "INFO:root:IndexedGroup Data at /nirs in C:\\Users\\avonl\\AppData\\Local\\cedalion\\cedalion\\Cache\\photogrammetry_example_scan.zip.unzip\\photogrammetry_example_scan\\photogrammetry_example_31x30.snirf initalized with 1 instances of \n", - "INFO:root:IndexedGroup Stim at /nirs in C:\\Users\\avonl\\AppData\\Local\\cedalion\\cedalion\\Cache\\photogrammetry_example_scan.zip.unzip\\photogrammetry_example_scan\\photogrammetry_example_31x30.snirf initalized with 0 instances of \n", - "INFO:root:IndexedGroup Aux at /nirs in C:\\Users\\avonl\\AppData\\Local\\cedalion\\cedalion\\Cache\\photogrammetry_example_scan.zip.unzip\\photogrammetry_example_scan\\photogrammetry_example_31x30.snirf initalized with 0 instances of \n", - "INFO:root:IndexedGroup Nirs at / in C:\\Users\\avonl\\AppData\\Local\\cedalion\\cedalion\\Cache\\photogrammetry_example_scan.zip.unzip\\photogrammetry_example_scan\\photogrammetry_example_31x30.snirf initalized with 1 instances of \n", - "WARNING:cedalion:generating generic source labels\n", - "WARNING:cedalion:generating generic detector labels\n", - "WARNING:cedalion:landmark labels were provided but not their positions. Removing labels\n", - "WARNING:cedalion:generating generic source labels\n", - "WARNING:cedalion:generating generic detector labels\n", - "WARNING:cedalion:generating generic source labels\n", - "WARNING:cedalion:generating generic detector labels\n", - "WARNING:cedalion:generating generic source labels\n", - "WARNING:cedalion:generating generic detector labels\n", - "INFO:root:Closing Snirf file C:\\Users\\avonl\\AppData\\Local\\cedalion\\cedalion\\Cache\\photogrammetry_example_scan.zip.unzip\\photogrammetry_example_scan\\photogrammetry_example_31x30.snirf\n" - ] - }, - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "
<xarray.DataArray (label: 361, aligned: 3)> Size: 9kB\n",
-       "[mm] 0.181 89.25 -7.826 -54.5 68.79 -18.29 ... 14.23 -38.28 81.95 -0.678 -37.03\n",
-       "Coordinates:\n",
-       "  * label    (label) <U6 9kB 'S1' 'S2' 'S3' 'S4' ... 'FFT10h' 'FT10h' 'FTT10h'\n",
-       "    type     (label) object 3kB PointType.SOURCE ... PointType.LANDMARK\n",
-       "Dimensions without coordinates: aligned
" - ], - "text/plain": [ - " Size: 9kB\n", - "[mm] 0.181 89.25 -7.826 -54.5 68.79 -18.29 ... 14.23 -38.28 81.95 -0.678 -37.03\n", - "Coordinates:\n", - " * label (label) span {\n", - " display: none;\n", - "}\n", - "\n", - ".xr-section-summary,\n", - ".xr-section-inline-details {\n", - " padding-top: 4px;\n", - " padding-bottom: 4px;\n", - "}\n", - "\n", - ".xr-section-inline-details {\n", - " grid-column: 2 / -1;\n", - "}\n", - "\n", - ".xr-section-details {\n", - " display: none;\n", - " grid-column: 1 / -1;\n", - " margin-bottom: 5px;\n", - "}\n", - "\n", - ".xr-section-summary-in:checked ~ .xr-section-details {\n", - " display: contents;\n", - "}\n", - "\n", - ".xr-array-wrap {\n", - " grid-column: 1 / -1;\n", - " display: grid;\n", - " grid-template-columns: 20px auto;\n", - "}\n", - "\n", - ".xr-array-wrap > label {\n", - " grid-column: 1;\n", - " vertical-align: top;\n", - "}\n", - "\n", - ".xr-preview {\n", - " color: var(--xr-font-color3);\n", - "}\n", - "\n", - ".xr-array-preview,\n", - ".xr-array-data {\n", - " padding: 0 5px !important;\n", - " grid-column: 2;\n", - "}\n", - "\n", - ".xr-array-data,\n", - ".xr-array-in:checked ~ .xr-array-preview {\n", - " display: none;\n", - "}\n", - "\n", - ".xr-array-in:checked ~ .xr-array-data,\n", - ".xr-array-preview {\n", - " display: inline-block;\n", - "}\n", - "\n", - ".xr-dim-list {\n", - " display: inline-block !important;\n", - " list-style: none;\n", - " padding: 0 !important;\n", - " margin: 0;\n", - "}\n", - "\n", - ".xr-dim-list li {\n", - " display: inline-block;\n", - " padding: 0;\n", - " margin: 0;\n", - "}\n", - "\n", - ".xr-dim-list:before {\n", - " content: '(';\n", - "}\n", - "\n", - ".xr-dim-list:after {\n", - " content: ')';\n", - "}\n", - "\n", - ".xr-dim-list li:not(:last-child):after {\n", - " content: ',';\n", - " padding-right: 5px;\n", - "}\n", - "\n", - ".xr-has-index {\n", - " font-weight: bold;\n", - "}\n", - "\n", - ".xr-var-list,\n", - ".xr-var-item {\n", - " display: contents;\n", - "}\n", - "\n", - ".xr-var-item > div,\n", - ".xr-var-item label,\n", - ".xr-var-item > .xr-var-name span {\n", - " background-color: var(--xr-background-color-row-even);\n", - " margin-bottom: 0;\n", - "}\n", - "\n", - ".xr-var-item > .xr-var-name:hover span {\n", - " padding-right: 5px;\n", - "}\n", - "\n", - ".xr-var-list > li:nth-child(odd) > div,\n", - ".xr-var-list > li:nth-child(odd) > label,\n", - ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n", - " background-color: var(--xr-background-color-row-odd);\n", - "}\n", - "\n", - ".xr-var-name {\n", - " grid-column: 1;\n", - "}\n", - "\n", - ".xr-var-dims {\n", - " grid-column: 2;\n", - "}\n", - "\n", - ".xr-var-dtype {\n", - " grid-column: 3;\n", - " text-align: right;\n", - " color: var(--xr-font-color2);\n", - "}\n", - "\n", - ".xr-var-preview {\n", - " grid-column: 4;\n", - "}\n", - "\n", - ".xr-index-preview {\n", - " grid-column: 2 / 5;\n", - " color: var(--xr-font-color2);\n", - "}\n", - "\n", - ".xr-var-name,\n", - ".xr-var-dims,\n", - ".xr-var-dtype,\n", - ".xr-preview,\n", - ".xr-attrs dt {\n", - " white-space: nowrap;\n", - " overflow: hidden;\n", - " text-overflow: ellipsis;\n", - " padding-right: 10px;\n", - "}\n", - "\n", - ".xr-var-name:hover,\n", - ".xr-var-dims:hover,\n", - ".xr-var-dtype:hover,\n", - ".xr-attrs dt:hover {\n", - " overflow: visible;\n", - " width: auto;\n", - " z-index: 1;\n", - "}\n", - "\n", - ".xr-var-attrs,\n", - ".xr-var-data,\n", - ".xr-index-data {\n", - " display: none;\n", - " background-color: var(--xr-background-color) !important;\n", - " padding-bottom: 5px !important;\n", - "}\n", - "\n", - ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n", - ".xr-var-data-in:checked ~ .xr-var-data,\n", - ".xr-index-data-in:checked ~ .xr-index-data {\n", - " display: block;\n", - "}\n", - "\n", - ".xr-var-data > table {\n", - " float: right;\n", - "}\n", - "\n", - ".xr-var-name span,\n", - ".xr-var-data,\n", - ".xr-index-name div,\n", - ".xr-index-data,\n", - ".xr-attrs {\n", - " padding-left: 25px !important;\n", - "}\n", - "\n", - ".xr-attrs,\n", - ".xr-var-attrs,\n", - ".xr-var-data,\n", - ".xr-index-data {\n", - " grid-column: 1 / -1;\n", - "}\n", - "\n", - "dl.xr-attrs {\n", - " padding: 0;\n", - " margin: 0;\n", - " display: grid;\n", - " grid-template-columns: 125px auto;\n", - "}\n", - "\n", - ".xr-attrs dt,\n", - ".xr-attrs dd {\n", - " padding: 0;\n", - " margin: 0;\n", - " float: left;\n", - " padding-right: 10px;\n", - " width: auto;\n", - "}\n", - "\n", - ".xr-attrs dt {\n", - " font-weight: normal;\n", - " grid-column: 1;\n", - "}\n", - "\n", - ".xr-attrs dt:hover span {\n", - " display: inline-block;\n", - " background: var(--xr-background-color);\n", - " padding-right: 10px;\n", - "}\n", - "\n", - ".xr-attrs dd {\n", - " grid-column: 2;\n", - " white-space: pre-wrap;\n", - " word-break: break-all;\n", - "}\n", - "\n", - ".xr-icon-database,\n", - ".xr-icon-file-text2,\n", - ".xr-no-icon {\n", - " display: inline-block;\n", - " vertical-align: middle;\n", - " width: 1em;\n", - " height: 1.5em !important;\n", - " stroke-width: 0;\n", - " stroke: currentColor;\n", - " fill: currentColor;\n", - "}\n", - "
<xarray.DataArray (label: 61, digitized: 3)> Size: 1kB\n",
-       "[mm] 152.4 -3.164 588.6 68.82 -37.57 435.0 ... -70.83 507.3 181.5 -9.018 519.3\n",
-       "Coordinates:\n",
-       "    type     (label) object 488B PointType.UNKNOWN ... PointType.UNKNOWN\n",
-       "    group    (label) <U1 244B 'O' 'O' 'O' 'O' 'O' 'O' ... 'O' 'O' 'O' 'O' 'O'\n",
-       "  * label    (label) <U4 976B 'O-28' 'O-04' 'O-05' ... 'O-61' 'O-50' 'O-55'\n",
-       "Dimensions without coordinates: digitized
" - ], - "text/plain": [ - " Size: 1kB\n", - "[mm] 152.4 -3.164 588.6 68.82 -37.57 435.0 ... -70.83 507.3 181.5 -9.018 519.3\n", - "Coordinates:\n", - " type (label) object 488B PointType.UNKNOWN ... PointType.UNKNOWN\n", - " group (label)