Bläddra i källkod

Cleanup day_1/tutorial_3

M. Sonntag 2 år sedan
förälder
incheckning
bb2d4960cd
1 ändrade filer med 138 tillägg och 405 borttagningar
  1. 138 405
      day_1/tutorial_3.ipynb

+ 138 - 405
day_1/tutorial_3.ipynb

@@ -139,7 +139,7 @@
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "## Metadata basics: creating section-property trees"
+    "## Metadata basics: creating section-property trees and navigation"
    ]
   },
   {
@@ -151,7 +151,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 10,
+   "execution_count": null,
    "metadata": {},
    "outputs": [],
    "source": [
@@ -160,7 +160,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 11,
+   "execution_count": null,
    "metadata": {},
    "outputs": [],
    "source": [
@@ -171,17 +171,9 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 12,
+   "execution_count": null,
    "metadata": {},
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "[]\n"
-     ]
-    }
-   ],
+   "outputs": [],
    "source": [
     "# As expected there are no metadata in our current file yet.\n",
     "print(f.sections)\n"
@@ -189,53 +181,26 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 13,
-   "metadata": {},
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "Help on method create_section in module nixio.file:\n",
-      "\n",
-      "create_section(name, type_='undefined', oid=None) method of nixio.file.File instance\n",
-      "    Create a new metadata section inside the file.\n",
-      "    \n",
-      "    :param name: The name of the section to create.\n",
-      "    :type name: str\n",
-      "    :param type_: The type of the section.\n",
-      "    :type type_: str\n",
-      "    :param oid: object id, UUID string as specified in RFC 4122. If no id\n",
-      "                is provided, an id will be generated and assigned.\n",
-      "    :type oid: str\n",
-      "    \n",
-      "    :returns: The newly created section.\n",
-      "    :rtype: nixio.Section\n",
-      "\n"
-     ]
-    }
-   ],
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
    "source": [
     "# Lets check how we can create a new Section. Sections can be created from File and Section objects.\n",
     "help(f.create_section)\n"
    ]
   },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "You can find the class information including all available methods in the nixpy readthedocs API entry for [nix.sections](https://nixpy.readthedocs.io/en/latest/api/nixio.html#module-nixio.section)."
+   ]
+  },
   {
    "cell_type": "code",
-   "execution_count": 14,
+   "execution_count": null,
    "metadata": {},
-   "outputs": [
-    {
-     "data": {
-      "text/plain": [
-       "[Section: {name = recording.20210405, type = raw.data.recording}]"
-      ]
-     },
-     "execution_count": 14,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
+   "outputs": [],
    "source": [
     "# First we need to create a Section that can hold our annotations. We'll use abstract names and types for now.\n",
     "sec = f.create_section(name=\"recording.20210405\", type_=\"raw.data.recording\")\n",
@@ -245,43 +210,20 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 15,
+   "execution_count": null,
    "metadata": {},
-   "outputs": [
-    {
-     "ename": "DuplicateName",
-     "evalue": "Duplicate name - names have to be unique for a given entity type & parent. (create_section)",
-     "output_type": "error",
-     "traceback": [
-      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
-      "\u001b[0;31mDuplicateName\u001b[0m                             Traceback (most recent call last)",
-      "\u001b[0;32m<ipython-input-15-f747f9038af9>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m      1\u001b[0m \u001b[0;31m# Like other NIX objects Section names on the same level have to be unique\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0msection\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mf\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcreate_section\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mname\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m\"recording.20210405\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtype_\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m\"raw.data.recording\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
-      "\u001b[0;32m~/Chaos/software/miniconda3/envs/work/lib/python3.9/site-packages/nixio/file.py\u001b[0m in \u001b[0;36mcreate_section\u001b[0;34m(self, name, type_, oid)\u001b[0m\n\u001b[1;32m    443\u001b[0m         \"\"\"\n\u001b[1;32m    444\u001b[0m         \u001b[0;32mif\u001b[0m \u001b[0mname\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msections\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 445\u001b[0;31m             \u001b[0;32mraise\u001b[0m \u001b[0mDuplicateName\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"create_section\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    446\u001b[0m         \u001b[0msec\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mSection\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcreate_new\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_metadata\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mname\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtype_\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0moid\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    447\u001b[0m         \u001b[0;32mreturn\u001b[0m \u001b[0msec\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
-      "\u001b[0;31mDuplicateName\u001b[0m: Duplicate name - names have to be unique for a given entity type & parent. (create_section)"
-     ]
-    }
-   ],
+   "outputs": [],
    "source": [
-    "# Like other NIX objects Section names on the same level have to be unique\n",
+    "# Like other NIX objects Section (and Property) names on the same level have to be unique\n",
+    "# Otherwise a 'DuplicateName' exception will be raised\n",
     "section = f.create_section(name=\"recording.20210405\", type_=\"raw.data.recording\")"
    ]
   },
   {
    "cell_type": "code",
-   "execution_count": 16,
+   "execution_count": null,
    "metadata": {},
-   "outputs": [
-    {
-     "data": {
-      "text/plain": [
-       "[]"
-      ]
-     },
-     "execution_count": 16,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
+   "outputs": [],
    "source": [
     "# Sections can hold further multiple Sections as well as multiple Properties.\n",
     "sec.sections\n"
@@ -289,20 +231,9 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 17,
+   "execution_count": null,
    "metadata": {},
-   "outputs": [
-    {
-     "data": {
-      "text/plain": [
-       "[]"
-      ]
-     },
-     "execution_count": 17,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
+   "outputs": [],
    "source": [
     "# The section currently does not contain any Properties.\n",
     "sec.props"
@@ -310,7 +241,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 18,
+   "execution_count": null,
    "metadata": {},
    "outputs": [],
    "source": [
@@ -320,44 +251,24 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 19,
-   "metadata": {},
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "Help on method create_property in module nixio.section:\n",
-      "\n",
-      "create_property(name='', values_or_dtype=0, oid=None, copy_from=None, keep_copy_id=True) method of nixio.section.Section instance\n",
-      "    Add a new property to the section.\n",
-      "    \n",
-      "    :param name: The name of the property to create/copy.\n",
-      "    :type name: str\n",
-      "    :param values_or_dtype: The values of the property or a valid DataType.\n",
-      "    :type values_or_dtype: list of values or a nixio.DataType\n",
-      "    :param oid: object id, UUID string as specified in RFC 4122. If no id\n",
-      "                is provided, an id will be generated and assigned.\n",
-      "    :type oid: str\n",
-      "    :param copy_from: The Property to be copied, None in normal mode\n",
-      "    :type copy_from: nixio.Property\n",
-      "    :param keep_copy_id: Specify if the id should be copied in copy mode\n",
-      "    :type keep_copy_id: bool\n",
-      "    \n",
-      "    :returns: The newly created property.\n",
-      "    :rtype: nixio.Property\n",
-      "\n"
-     ]
-    }
-   ],
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
    "source": [
     "# Properties can be created from Section objects.\n",
     "help(sub_sec.create_property)\n"
    ]
   },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "Again, you can find all class information in the nixpy readthedocs API entry for [nix.property](https://nixpy.readthedocs.io/en/latest/api/nixio.html#module-nixio.property)."
+   ]
+  },
   {
    "cell_type": "code",
-   "execution_count": 20,
+   "execution_count": null,
    "metadata": {},
    "outputs": [],
    "source": [
@@ -369,25 +280,15 @@
     "# To fully describe metadata, properties support saving \"unit\" and \"uncertainty\" together with values.\n",
     "prop = sub_sec.create_property(name=\"age\", values_or_dtype=\"4\")\n",
     "\n",
-    "prop.unit = \"weeks\"\n"
+    "prop.unit = \"weeks\"\n",
+    "# prop.uncertainty"
    ]
   },
   {
    "cell_type": "code",
-   "execution_count": 21,
+   "execution_count": null,
    "metadata": {},
-   "outputs": [
-    {
-     "data": {
-      "text/plain": [
-       "[Section: {name = recording.20210405, type = raw.data.recording}]"
-      ]
-     },
-     "execution_count": 21,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
+   "outputs": [],
    "source": [
     "# Lets check what we have so far at the root of the file.\n",
     "f.sections\n"
@@ -395,22 +296,9 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 22,
+   "execution_count": null,
    "metadata": {},
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "File: name = metadata.nix\n",
-      "  recording.20210405 [raw.data.recording]\n",
-      "    subject [raw.data.recording]\n",
-      "        |- subjectID: ('78376446-f096-47b9-8bfe-ce1eb43a48dc',)\n",
-      "        |- species: ('Mus Musculus',)\n",
-      "        |- age: ('4',)weeks\n"
-     ]
-    }
-   ],
+   "outputs": [],
    "source": [
     "# File and Sections also support the \"pprint\" function to make it easier to get an overview \n",
     "# over the contents of the metadata tree.\n",
@@ -419,20 +307,9 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 23,
+   "execution_count": null,
    "metadata": {},
-   "outputs": [
-    {
-     "data": {
-      "text/plain": [
-       "[Property: {name = subjectID}, Property: {name = species}, Property: {name = age}]"
-      ]
-     },
-     "execution_count": 23,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
+   "outputs": [],
    "source": [
     "# We access all Properties of the subsection containing subject related information.\n",
     "# Sections can be accessed via index or via name\n",
@@ -441,20 +318,9 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 24,
+   "execution_count": null,
    "metadata": {},
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "subject [raw.data.recording]\n",
-      "    |- subjectID: ('78376446-f096-47b9-8bfe-ce1eb43a48dc',)\n",
-      "    |- species: ('Mus Musculus',)\n",
-      "    |- age: ('4',)weeks\n"
-     ]
-    }
-   ],
+   "outputs": [],
    "source": [
     "# We can also again use the pprint function\n",
     "f.sections[0].sections['subject'].pprint()"
@@ -462,7 +328,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 25,
+   "execution_count": null,
    "metadata": {},
    "outputs": [],
    "source": [
@@ -478,7 +344,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 26,
+   "execution_count": null,
    "metadata": {},
    "outputs": [],
    "source": [
@@ -487,7 +353,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 27,
+   "execution_count": null,
    "metadata": {},
    "outputs": [],
    "source": [
@@ -498,20 +364,9 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 29,
+   "execution_count": null,
    "metadata": {},
-   "outputs": [
-    {
-     "data": {
-      "text/plain": [
-       "SampledDimension: {index = 1}"
-      ]
-     },
-     "execution_count": 29,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
+   "outputs": [],
    "source": [
     "example_data_01 = [2, 2, 2, 6, 6, 6, 6, 2, 2, 2]\n",
     "da = rec_block.create_data_array(name=\"recording.20210405\", array_type=\"shift.data\", data=example_data_01,\n",
@@ -521,20 +376,9 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 31,
+   "execution_count": null,
    "metadata": {},
-   "outputs": [
-    {
-     "data": {
-      "text/plain": [
-       "SampledDimension: {index = 1}"
-      ]
-     },
-     "execution_count": 31,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
+   "outputs": [],
    "source": [
     "example_data_02 = [2, 2, 2, 8, 8, 8, 8, 2, 2, 2]\n",
     "da = rec_block.create_data_array(name=\"recording.20210505.01\", array_type=\"shift.data\", data=example_data_02,\n",
@@ -544,11 +388,11 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 32,
+   "execution_count": null,
    "metadata": {},
    "outputs": [],
    "source": [
-    "# We'll also create a tag, that will reference a specific section in the data arrays\n",
+    "# We'll also create a NIX Tag, that will reference a specific section in the data arrays\n",
     "stim_on = 4\n",
     "stim_off = 8\n",
     "# We create the tag on the same block as the DataArrays it should reference\n",
@@ -562,7 +406,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 36,
+   "execution_count": null,
    "metadata": {},
    "outputs": [],
    "source": [
@@ -578,21 +422,9 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 37,
+   "execution_count": null,
    "metadata": {},
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "recording.20210405 [raw.data.recording]\n",
-      "  subject [raw.data.recording]\n",
-      "      |- subjectID: ('78376446-f096-47b9-8bfe-ce1eb43a48dc',)\n",
-      "      |- species: ('Mus Musculus',)\n",
-      "      |- age: ('4',)weeks\n"
-     ]
-    }
-   ],
+   "outputs": [],
    "source": [
     "# We can now access the metadata from DataArray and Tag:\n",
     "\n",
@@ -601,28 +433,16 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 38,
+   "execution_count": null,
    "metadata": {},
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "recording.20210405 [raw.data.recording]\n",
-      "  subject [raw.data.recording]\n",
-      "      |- subjectID: ('78376446-f096-47b9-8bfe-ce1eb43a48dc',)\n",
-      "      |- species: ('Mus Musculus',)\n",
-      "      |- age: ('4',)weeks\n"
-     ]
-    }
-   ],
+   "outputs": [],
    "source": [
     "f.blocks[\"project.recordings\"].tags[\"stimulus.down.3\"].metadata.pprint()"
    ]
   },
   {
    "cell_type": "code",
-   "execution_count": 39,
+   "execution_count": null,
    "metadata": {},
    "outputs": [],
    "source": [
@@ -631,7 +451,63 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 9,
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "# We can also access the Data via the metadata\n",
+    "f.sections[\"recording.20210405\"].referring_data_arrays"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "f.sections[\"recording.20210405\"].referring_tags"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "# Shortcut to all references\n",
+    "f.sections[\"recording.20210405\"].referring_objects"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "f.sections[\"recording.20210405\"].referring_blocks"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "f.sections[\"recording.20210405\"].referring_groups\n"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "f.sections[\"recording.20210405\"].referring_multi_tags"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
    "metadata": {},
    "outputs": [],
    "source": [
@@ -663,7 +539,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 16,
+   "execution_count": null,
    "metadata": {},
    "outputs": [],
    "source": [
@@ -687,7 +563,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 17,
+   "execution_count": null,
    "metadata": {},
    "outputs": [],
    "source": [
@@ -706,25 +582,9 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 18,
+   "execution_count": null,
    "metadata": {},
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "File: name = metadata_templates.nix\n",
-      "  microscope_station_A [hardware.microscopes]\n",
-      "      |- Manufacturer: ('Company A',)\n",
-      "      |- Objective: ('Pln Apo 40x/1.3 oil DIC II',)\n",
-      "      |- pE LED intensity: ('20',)\n",
-      "  microscope_station_B [hardware.microscopes]\n",
-      "      |- Manufacturer: ('Company B',)\n",
-      "      |- Objective: ('Pln Apo 40x/1.3 oil DIC II',)\n",
-      "      |- pE LED intensity: ('30',)\n"
-     ]
-    }
-   ],
+   "outputs": [],
    "source": [
     "# the root \"templates\" section now contains two microscope setup templates\n",
     "ft.pprint(max_depth=2)"
@@ -742,20 +602,9 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 19,
+   "execution_count": null,
    "metadata": {},
-   "outputs": [
-    {
-     "data": {
-      "text/plain": [
-       "Section: {name = microscope_station_A, type = hardware.microscopes}"
-      ]
-     },
-     "execution_count": 19,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
+   "outputs": [],
    "source": [
     "# Create a base section in the session file\n",
     "sec_ses = fi.create_section(name=\"sessions\")\n",
@@ -777,85 +626,13 @@
     "sec_session03.copy_section(sec_setup_A)\n"
    ]
   },
-  {
-   "cell_type": "code",
-   "execution_count": 20,
-   "metadata": {},
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "File: name = metadata_import.nix\n",
-      "  sessions [undefined]\n",
-      "    recording.20210505.01 [raw-data.ca-imaging]\n",
-      "      microscope_station_A [hardware.microscopes]\n",
-      "          |- Manufacturer: ('Company A',)\n",
-      "          |- Objective: ('Pln Apo 40x/1.3 oil DIC II',)\n",
-      "          |- pE LED intensity: ('20',)\n",
-      "    recording.20210506.01 [raw-data.ca-imaging]\n",
-      "      microscope_station_B [hardware.microscopes]\n",
-      "          |- Manufacturer: ('Company B',)\n",
-      "          |- Objective: ('Pln Apo 40x/1.3 oil DIC II',)\n",
-      "          |- pE LED intensity: ('30',)\n",
-      "    recording.20210507.01 [raw-data.ca-imaging]\n",
-      "      microscope_station_A [hardware.microscopes]\n",
-      "          |- Manufacturer: ('Company A',)\n",
-      "          |- Objective: ('Pln Apo 40x/1.3 oil DIC II',)\n",
-      "          |- pE LED intensity: ('20',)\n"
-     ]
-    }
-   ],
-   "source": [
-    "fi.pprint()"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 21,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "ft.close()\n",
-    "fi.close()"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": []
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": []
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "# We can now connect the Section describing our experiment directly to the MultiTag \n",
-    "#  that references both the raw as well as the analysed data.\n",
-    "\n",
-    "multi_tag = f.blocks['tag_examples'].multi_tags['tag_A']\n",
-    "multi_tag.metadata = f.sections['experiment_42']\n"
-   ]
-  },
   {
    "cell_type": "code",
    "execution_count": null,
    "metadata": {},
    "outputs": [],
    "source": [
-    "# Now when we look at the data via a MultiTag we can directly access all metadata that has been attached to it.\n",
-    "# E.g. get information about the subject the experiment was conducted with.\n",
-    "multi_tag.metadata.sections['subject'].props\n"
+    "fi.pprint()"
    ]
   },
   {
@@ -864,32 +641,23 @@
    "metadata": {},
    "outputs": [],
    "source": [
-    "# We can also attach the same Section to the raw DataArray itself e.g. when no MultTags have been used.\n",
-    "init_data = f.blocks['tag_examples'].data_arrays['membrane_voltage_A']\n",
-    "init_data.metadata = f.sections['experiment_42']\n"
+    "ft.close()\n",
+    "fi.close()"
    ]
   },
   {
-   "cell_type": "code",
-   "execution_count": null,
+   "cell_type": "markdown",
    "metadata": {},
-   "outputs": [],
    "source": [
-    "# And we can also find it in reverse: we can select a Section and find all data, that are connected to it.\n",
-    "sec = f.sections['experiment_42']\n",
+    "## Hands on session 3\n",
     "\n",
-    "# Either via connected DataArrays.\n",
-    "sec.referring_data_arrays\n"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "# Or via connected MultiTags.\n",
-    "sec.referring_multi_tags\n"
+    "Now we move on to another hands on session.\n",
+    "\n",
+    "In the folder \"day_1\" of the repository https://gin.g-node.org/INCF-workshop-2021/NIX-Neo-workshop you will find a  Jupyter notebook \"hands_on_3.ipynb\".\n",
+    "\n",
+    "Again, start it either\n",
+    "- locally if you can use Python and make sure all dependencies are installed.\n",
+    "- or use Binder if you cannot use Python locally. The repository is already set up for the use with Binder.\n"
    ]
   },
   {
@@ -897,42 +665,7 @@
    "execution_count": null,
    "metadata": {},
    "outputs": [],
-   "source": [
-    "# And finally we close our file.\n",
-    "f.close()\n"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "## Try it out\n",
-    "\n",
-    "Now we move on to an actual exercise.\n",
-    "\n",
-    "The public repository https://gin.g-node.org/RDMcourse2020/demo-lecture-07 contains a Jupyter notebook \"2020_RDM_course_nix_exercise.ipynb\".\n",
-    "\n",
-    "Start it either\n",
-    "- locally if you can use Python and make sure all dependencies are installed.\n",
-    "- or use Binder if you cannot use Python locally. The repository is already set up for the use with Binder. Check the last lecture if you are unsure how to start the notebook using Binder.\n",
-    "\n",
-    "This repository further contains a folder called \"excercise\". It contains calcium imaging data and rough metadata about the recordings.\n",
-    "\n",
-    "The exercise is to\n",
-    "- read through the README.md and briefly familiarize yourself with the project and the data.\n",
-    "- load the raw data to the notebook. Ideally transfer the \"obj_substracted\" column from the data files (column 3) but it can be any other column as well.\n",
-    "- the \"time_elapsed\" column is roughly 100ms. If you want to you can use a SampledDimension with an interval of 100 which should be easier or try to include the real times as a RangeDimension.\n",
-    "- create a new NIX file and put the raw data traces into NIX DataArrays including labels and units - note that the signal is Flourescence with unit AU (arbitrary unit). \n",
-    "- plot data from these DataArrays.\n",
-    "- read through the metadata, try to put useful metadata into a NIX Section/Property structure and connect it to the DataArrays. Examples would be\n",
-    "  - original file names of raw data files.\n",
-    "  - species.\n",
-    "  - recording equipment.\n",
-    "\n",
-    "- identify and specify a region of interest via the used shift paradigm with start and extent and try to create a MultiTag connecting all three DataArrays via the same paradigm MultiTag.\n",
-    "\n",
-    "Alternatively you can also take some of your own data and try to put it into a NIX file along with some of your metadata."
-   ]
+   "source": []
   }
  ],
  "metadata": {