{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "f72e4a6d",
   "metadata": {
    "jupyter": {
     "source_hidden": true
    },
    "nbsphinx": "hidden",
    "tags": []
   },
   "outputs": [],
   "source": [
    "import sys\n",
    "import os\n",
    "\n",
    "sys.path.append('../../../')\n",
    "\n",
    "from bci_framework.utils import Paradigm\n",
    "from matplotlib import pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "id": "ddd4026b",
   "metadata": {
    "collapsed": true,
    "jupyter": {
     "outputs_hidden": true,
     "source_hidden": true
    },
    "nbsphinx": "hidden",
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 28992 characters]\n",
      "text/plain": [
       "<Figure size 900x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig = plt.figure(figsize=(10, 4), dpi=90)\n",
    "\n",
    "\n",
    "tasks = (\n",
    "\n",
    "    \n",
    ")\n",
    "\n",
    "paradigm = []\n",
    "\n",
    "paradigm = (\n",
    "    \n",
    "      {\n",
    "        'time': (0, 0, 1),       \n",
    "        'label': 'Trial instruction',\n",
    "        'color': 'C5',\n",
    "        'rotation': 90,\n",
    "        'label_extra': '',\n",
    "    },\n",
    "    \n",
    "    \n",
    "    {\n",
    "        'time': (1, 5),\n",
    "        'level': (0.5, 1),        \n",
    "        'label': 'Fixation cross',\n",
    "        'color': 'C0',\n",
    "        'marker': {\n",
    "            'label': 'Auditory signal',\n",
    "            'label_end': 'Auditory signal',\n",
    "            'width': 2,\n",
    "            'level': 1,\n",
    "        }\n",
    "    },      \n",
    "    {\n",
    "        'time': (1, 5),\n",
    "        'level': (0, 0.5), \n",
    "        'label': 'Trial',\n",
    "        'color': 'C2',\n",
    "        'marker': {\n",
    "            'label': 'Marker streamed',\n",
    "            'width': 2,\n",
    "            'level': 2,\n",
    "        }\n",
    "    },   \n",
    ")\n",
    "\n",
    "Paradigm.build_paradigm(paradigm)\n",
    "plt.savefig('paradigm.png')"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f52ff97c",
   "metadata": {},
   "source": [
    "# Resting state and noise acquisition\n",
    "\n",
    "Implemented through extensions systems in the [RestingNoiseAcquisition](../../../../_modules/bci_framework.default_extensions.Resting_state_and_noise_acquisition.main.rst) module.\n",
    "\n",
    "<img src='paradigm.png'></img>\n",
    "\n",
    "This experiment perforn the same task implemented in <cite data-footcite=\"cho2017eeg\">cho2017eeg</cite>: Resting with open eyes, Resting with close eye, Eye blinking, Eyeball movement up/down, Eyeball movement left/right, Head movement left/right and Jaw clenching. The time acquisition time for each task can be configured independently. The subject can explicitly. The subject can explicitly decide when to continue with the next task with a keyboard event."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "08bef28d",
   "metadata": {},
   "source": [
    "## Configuration options\n",
    "\n",
    "<img src='../../../images/extensions/resting_noise.gif'></img>\n",
    "\n",
    "All tasks have the same configuration option, the acquisition time, from 0 (disabled task) to 5 minutes, 1 minute by default."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d97ce7aa",
   "metadata": {},
   "source": [
    "### References\n",
    ".. footbibliography::"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
