diff --git a/notebooks/Synergistic/BrainWeb-single_slice_motion.ipynb b/notebooks/Synergistic/BrainWeb-single_slice_motion.ipynb index a9126fe8..bbf1a09d 100644 --- a/notebooks/Synergistic/BrainWeb-single_slice_motion.ipynb +++ b/notebooks/Synergistic/BrainWeb-single_slice_motion.ipynb @@ -60,8 +60,7 @@ "# Make sure everything is installed that we need\n", "import os\n", "sirf_python_executable = os.environ.get('SIRF_PYTHON_EXECUTABLE')\n", - "!{sirf_python_executable} -m pip install brainweb nibabel numba --user\n", - "# !pip install brainweb nibabel numba --user" + "!{sirf_python_executable} -m pip install brainweb nibabel --user\n" ] }, { diff --git a/notebooks/Synergistic/BrainWeb.ipynb b/notebooks/Synergistic/BrainWeb.ipynb index 11703511..5d8a82d2 100644 --- a/notebooks/Synergistic/BrainWeb.ipynb +++ b/notebooks/Synergistic/BrainWeb.ipynb @@ -58,7 +58,7 @@ "outputs": [], "source": [ "# Make sure everything is installed that we need\n", - "!pip install brainweb nibabel numba --user" + "!pip install brainweb nibabel --user" ] }, { diff --git a/notebooks/Synergistic/Solutions/Dual_PET_Answer-noMotion.ipynb b/notebooks/Synergistic/Solutions/Dual_PET_Answer-noMotion.ipynb index 74f4f68a..2ff0a2b3 100644 --- a/notebooks/Synergistic/Solutions/Dual_PET_Answer-noMotion.ipynb +++ b/notebooks/Synergistic/Solutions/Dual_PET_Answer-noMotion.ipynb @@ -93,7 +93,6 @@ "import sys\n", "import shutil\n", "from tqdm.auto import tqdm, trange\n", - "from numba import jit\n", "import time\n", "import sirf.STIR as pet\n", "from sirf.Utilities import examples_data_path\n", diff --git a/notebooks/Synergistic/Solutions/Dual_PET_Answer-wMotion.ipynb b/notebooks/Synergistic/Solutions/Dual_PET_Answer-wMotion.ipynb index 350e08f9..771aac3a 100644 --- a/notebooks/Synergistic/Solutions/Dual_PET_Answer-wMotion.ipynb +++ b/notebooks/Synergistic/Solutions/Dual_PET_Answer-wMotion.ipynb @@ -92,7 +92,6 @@ "import os\n", "import sys\n", "import shutil\n", - "from numba import jit\n", "import time\n", "import sirf.STIR as pet\n", "from sirf.Utilities import examples_data_path\n", diff --git a/notebooks/Synergistic/de_Pierro_MAPEM.ipynb b/notebooks/Synergistic/de_Pierro_MAPEM.ipynb index 25b64e37..61b21a0e 100644 --- a/notebooks/Synergistic/de_Pierro_MAPEM.ipynb +++ b/notebooks/Synergistic/de_Pierro_MAPEM.ipynb @@ -47,6 +47,17 @@ "# All the normal imports and handy functions" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# If you have python3, you can uncomment this\n", + "# and all subsequent mentions of \"@jit\".\n", + "# from numba import jit" + ] + }, { "cell_type": "code", "execution_count": null, @@ -60,7 +71,6 @@ "import sys\n", "import shutil\n", "from tqdm.auto import tqdm, trange\n", - "from numba import jit\n", "import time\n", "from scipy.ndimage.filters import gaussian_filter\n", "import sirf.STIR as pet\n", @@ -180,7 +190,7 @@ "\n", "# Define function for xreg. \n", "# Using jit gets computation time from 90 secs to 2!\n", - "@jit\n", + "#@jit\n", "def compute_xreg(image_array):\n", " sizes=image_array.shape\n", " image_reg= image_array*0 # make a copy first. Will then change values\n", @@ -193,7 +203,7 @@ " return image_reg\n", "\n", "# define a function that computes the MAP-EM update\n", - "@jit\n", + "#@jit\n", "def compute_MAPEM_update(xEM,xreg, beta):\n", " return (2*xEM)/(numpy.sqrt((1 - beta*xreg)**2 + 4*beta*xEM) + (1 - beta*xreg) + 0.00001)" ]