{ "cells": [ { "cell_type": "markdown", "id": "5e9a73d4-ccdb-4971-b8cb-34ffaee3cac6", "metadata": {}, "source": [ "# **--- `DatasetEphy`: container of neurophysiological data ---**\n", "---\n", "In this tutorial we're mainly going to see how to define a container hosting the neurophysiological data of one or several subjects." ] }, { "cell_type": "code", "execution_count": null, "id": "6437bce7-384e-4779-b04d-6ca6a1b8be29", "metadata": {}, "outputs": [], "source": [ "import os\n", "\n", "import numpy as np\n", "import xarray as xr\n", "import pandas as pd\n", "\n", "from mne import EpochsArray, create_info\n", "\n", "from frites.dataset import DatasetEphy\n", "\n", "import matplotlib.pyplot as plt" ] }, { "cell_type": "markdown", "id": "f847437b-9ad9-4a48-85d6-2c4bb9aa605b", "metadata": {}, "source": [ "---\n", "# **--- ROOT PATH ---**\n", "\n", "
\n", "\n", "Define the path to where the data are located !\n", "
\n", "\n", "**[Instructions]** Load the data, behavior and anatomy of subject #0\n", "
\n", "\n", "**[Instructions]**\n", " \n", "Let's start \"easy\" by plotting the PE, only for the first block. You should see it decreasing to almost 0 !\n", "
\n", "\n", "**[Instructions]**\n", " \n", "1. Rename the dimension `trials` in the hga `DataArray` by `pe`\n", "2. Fill this dimension `pe` with the values of the PE\n", "
\n", "\n", "**[Instructions]**\n", " \n", "Define a `DatasetEphy` for the subject #0 you just loaded and specify the coordinates of the PE (`y`), the time (`times`) and the spatial dimension (`roi`)\n", "
\n", "\n", "**[Instructions]**\n", " \n", "1. Get the name of the brain regions (`anat` output, column `roi`)\n", "2. Rename the dimension name `channels` of the `hga` to be `parcels`\n", "3. Fill this dimension `roi` with the name of the brain regions\n", "4. Define the `DatasetEphy` and specify the the `roi` dimension is now called `parcels`\n", "
\n", "\n", "**[Instructions]**\n", " \n", "Build a `DatasetEphy` with the 12 subjects, each having the PE dimension and the brain region names instead of the channel names\n", "