From 89d568d39d2dfae768b99b2f036e28396df3aff9 Mon Sep 17 00:00:00 2001 From: Ahmet Nihat Simsek Date: Tue, 17 Dec 2024 10:30:34 +0100 Subject: [PATCH] Update tutorials to siibra-python v1.0a22 --- 01-BasicConcepts.ipynb | 2 +- 02-DataFeatures.ipynb | 2 +- 03-ProbabilisticAssignment.ipynb | 4 ++-- 04-DifferentialGeneExpressions.ipynb | 2 +- 05-CombinedWorkflow.ipynb | 2 +- 06-CorticalPatchSampling.ipynb | 4 ++-- workshops/BigBrainWorkshop2023.ipynb | 4 ++-- workshops/HIBALL-winterschool-2023.ipynb | 4 ++-- workshops/imb9345-2024.ipynb | 2 +- workshops/ohbm-2023-example.ipynb | 2 +- 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/01-BasicConcepts.ipynb b/01-BasicConcepts.ipynb index cabead5..683e8ee 100644 --- a/01-BasicConcepts.ipynb +++ b/01-BasicConcepts.ipynb @@ -15,7 +15,7 @@ "source": [ "import siibra\n", "from packaging.version import Version\n", - "assert Version(siibra.__version__) >= Version('1.0a14')\n", + "assert Version(siibra.__version__) >= Version('1.0a22')\n", "import os\n", "import matplotlib\n", "%matplotlib inline" diff --git a/02-DataFeatures.ipynb b/02-DataFeatures.ipynb index 6e158db..7898619 100644 --- a/02-DataFeatures.ipynb +++ b/02-DataFeatures.ipynb @@ -23,7 +23,7 @@ "source": [ "import siibra\n", "from packaging.version import Version\n", - "assert Version(siibra.__version__) >= Version('1.0a14')" + "assert Version(siibra.__version__) >= Version('1.0a22')" ] }, { diff --git a/03-ProbabilisticAssignment.ipynb b/03-ProbabilisticAssignment.ipynb index 5d3703d..dc054aa 100644 --- a/03-ProbabilisticAssignment.ipynb +++ b/03-ProbabilisticAssignment.ipynb @@ -8,7 +8,7 @@ "source": [ "import siibra\n", "from packaging.version import Version\n", - "assert Version(siibra.__version__) >= Version('1.0a14')\n", + "assert Version(siibra.__version__) >= Version('1.0a22')\n", "\n", "from nilearn import plotting\n", "import matplotlib.pyplot as plt\n", @@ -31,7 +31,7 @@ "outputs": [], "source": [ "# These are copy-pasted from the interactive atlas viewer:\n", - "points = siibra.PointSet(\n", + "points = siibra.(\n", " (\n", " [-25.65, -2.75, -33.75],\n", " [-37.35, -81.05, -6.3],\n", diff --git a/04-DifferentialGeneExpressions.ipynb b/04-DifferentialGeneExpressions.ipynb index 15ac001..2b281fd 100644 --- a/04-DifferentialGeneExpressions.ipynb +++ b/04-DifferentialGeneExpressions.ipynb @@ -30,7 +30,7 @@ "source": [ "import siibra, siibra_jugex\n", "from packaging.version import Version\n", - "assert Version(siibra.__version__) >= Version('1.0a14')\n", + "assert Version(siibra.__version__) >= Version('1.0a22')\n", "assert Version(siibra_jugex.__version__) >= Version(\"1.2\")" ] }, diff --git a/05-CombinedWorkflow.ipynb b/05-CombinedWorkflow.ipynb index e22cff6..f9a4a9f 100644 --- a/05-CombinedWorkflow.ipynb +++ b/05-CombinedWorkflow.ipynb @@ -20,7 +20,7 @@ "source": [ "import siibra\n", "from packaging.version import Version\n", - "assert Version(siibra.__version__) >= Version('1.0a14')\n", + "assert Version(siibra.__version__) >= Version('1.0a22')\n", "\n", "import matplotlib.pyplot as plt\n", "%matplotlib notebook" diff --git a/06-CorticalPatchSampling.ipynb b/06-CorticalPatchSampling.ipynb index 748ffa8..a8c54c9 100644 --- a/06-CorticalPatchSampling.ipynb +++ b/06-CorticalPatchSampling.ipynb @@ -9,7 +9,7 @@ "source": [ "import siibra\n", "from packaging.version import Version\n", - "assert Version(siibra.__version__) >= Version('1.0a17')\n", + "assert Version(siibra.__version__) >= Version('1.0a22')\n", "import matplotlib.pyplot as plt\n", "%matplotlib notebook\n", "import numpy as np\n", @@ -202,7 +202,7 @@ "l4layer = layers.get_region(f\"4 {hemisphere}\")\n", "\n", "# collect all layer IV contour points into one set\n", - "l4points = siibra.PointSet(\n", + "l4points = siibra.(\n", " [p for contour in layer_contours[l4layer.name] for p in contour], \n", " space='bigbrain'\n", ")\n", diff --git a/workshops/BigBrainWorkshop2023.ipynb b/workshops/BigBrainWorkshop2023.ipynb index 2253406..106c964 100644 --- a/workshops/BigBrainWorkshop2023.ipynb +++ b/workshops/BigBrainWorkshop2023.ipynb @@ -17,7 +17,7 @@ "source": [ "import siibra\n", "from packaging.version import Version\n", - "assert Version(siibra.__version__) >= Version('1.0a17')" + "assert Version(siibra.__version__) >= Version('1.0a22')" ] }, { @@ -159,7 +159,7 @@ "outputs": [], "source": [ "# we can directly instantiate a location object from the structure in siibra\n", - "# the annotation is cast to a siibra pointset.\n", + "# the annotation is cast to a siibra .\n", "# Note that it has already the proper reference space encoded!\n", "points = siibra.from_json(structure)\n", "print(points)" diff --git a/workshops/HIBALL-winterschool-2023.ipynb b/workshops/HIBALL-winterschool-2023.ipynb index a6ccd9e..f82b57f 100644 --- a/workshops/HIBALL-winterschool-2023.ipynb +++ b/workshops/HIBALL-winterschool-2023.ipynb @@ -17,7 +17,7 @@ "source": [ "import siibra\n", "from packaging.version import Version\n", - "assert Version(siibra.__version__) >= Version('1.0a17')\n", + "assert Version(siibra.__version__) >= Version('1.0a22')\n", "\n", "import matplotlib\n", "from nilearn import plotting\n", @@ -801,7 +801,7 @@ "outputs": [], "source": [ "# We can plot the MNI coordinates to localize the measures and verify they are located in V1.\n", - "locations = siibra.PointSet(features[0].data.mni_xyz.tolist(), space=\"mni152\")\n", + "locations = siibra.(features[0].data.mni_xyz.tolist(), space=\"mni152\")\n", "\n", "from nilearn import plotting\n", "mask = v1.get_regional_map(\"mni152\")\n", diff --git a/workshops/imb9345-2024.ipynb b/workshops/imb9345-2024.ipynb index 6de4969..041b563 100644 --- a/workshops/imb9345-2024.ipynb +++ b/workshops/imb9345-2024.ipynb @@ -33,7 +33,7 @@ "source": [ "import siibra as sb\n", "from packaging.version import Version\n", - "assert Version(sb.__version__) >= Version('1.0a18')\n", + "assert Version(sb.__version__) >= Version('1.0a22')\n", "from nilearn import plotting\n", "import matplotlib.pyplot as plt\n", "%matplotlib notebook" diff --git a/workshops/ohbm-2023-example.ipynb b/workshops/ohbm-2023-example.ipynb index 6dddcd4..40b172c 100644 --- a/workshops/ohbm-2023-example.ipynb +++ b/workshops/ohbm-2023-example.ipynb @@ -23,7 +23,7 @@ "source": [ "import siibra as sb\n", "from packaging.version import Version\n", - "assert Version(sb.__version__) >= Version('1.0a18')\n", + "assert Version(sb.__version__) >= Version('1.0a22')\n", "from nilearn import plotting\n", "import matplotlib.pyplot as plt\n", "%matplotlib notebook"