2019-12-18 14:03:01 +00:00
{
"cells": [
{
"cell_type": "code",
2019-12-19 12:58:01 +00:00
"execution_count": 1,
2019-12-18 14:03:01 +00:00
"metadata": {},
"outputs": [],
"source": [
"%load_ext autoreload\n",
"%autoreload 2"
]
},
{
"cell_type": "code",
2019-12-19 12:58:01 +00:00
"execution_count": 2,
2019-12-18 14:03:01 +00:00
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
2019-12-19 12:58:01 +00:00
"12:54:11 [I] klustakwik KlustaKwik2 version 0.2.6\n",
2019-12-18 14:03:01 +00:00
"/home/mikkel/.virtualenvs/expipe/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: numpy.ufunc size changed, may indicate binary incompatibility. Expected 192 from C header, got 216 from PyObject\n",
" return f(*args, **kwds)\n",
"/home/mikkel/.virtualenvs/expipe/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: numpy.ufunc size changed, may indicate binary incompatibility. Expected 192 from C header, got 216 from PyObject\n",
" return f(*args, **kwds)\n",
"/home/mikkel/.virtualenvs/expipe/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: numpy.ufunc size changed, may indicate binary incompatibility. Expected 192 from C header, got 216 from PyObject\n",
" return f(*args, **kwds)\n"
]
}
],
"source": [
"import os\n",
"import pathlib\n",
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"from matplotlib import colors\n",
"import seaborn as sns\n",
"import re\n",
"import shutil\n",
"import pandas as pd\n",
"import scipy.stats\n",
"\n",
"import exdir\n",
"import expipe\n",
"from distutils.dir_util import copy_tree\n",
"import septum_mec\n",
"import septum_mec.analysis.data_processing as dp\n",
"import septum_mec.analysis.registration\n",
"from septum_mec.analysis.plotting import violinplot, despine, plot_bootstrap_timeseries\n",
"from phase_precession import cl_corr\n",
"from spike_statistics.core import permutation_resampling\n",
"import matplotlib.mlab as mlab\n",
"import scipy.signal as ss\n",
"from scipy.interpolate import interp1d\n",
"from septum_mec.analysis.plotting import regplot\n",
"from skimage import measure\n",
"from tqdm.notebook import tqdm_notebook as tqdm\n",
"tqdm.pandas()\n",
"import scipy.signal as ss\n",
"\n",
"\n",
"from tqdm.notebook import tqdm_notebook as tqdm\n",
"tqdm.pandas()\n",
"\n",
"import pycwt"
]
},
{
"cell_type": "code",
2019-12-19 12:58:01 +00:00
"execution_count": 3,
2019-12-18 14:03:01 +00:00
"metadata": {},
"outputs": [],
"source": [
"colors = ['#1b9e77','#d95f02','#7570b3','#e7298a', '#4393c3', '#d6604d']\n",
"labels = ['Baseline I', '11 Hz', 'Baseline II', '30 Hz', 'Baseline', 'Stimulated']\n",
"plt.rcParams['figure.dpi'] = 150\n",
"figsize_violin = (1.7, 3)\n",
"figsize_speed = (4, 3)\n",
"plt.rc('axes', titlesize=10)"
]
},
{
"cell_type": "code",
2019-12-19 12:58:01 +00:00
"execution_count": 4,
2019-12-18 14:03:01 +00:00
"metadata": {},
"outputs": [],
"source": [
"project_path = dp.project_path()\n",
"project = expipe.get_project(project_path)\n",
"actions = project.actions\n",
"\n",
"output_path = pathlib.Path(\"output\") / \"lfp_speed\"\n",
"(output_path / \"statistics\").mkdir(exist_ok=True, parents=True)\n",
"(output_path / \"figures\").mkdir(exist_ok=True, parents=True)"
]
},
{
"cell_type": "code",
2019-12-19 12:58:01 +00:00
"execution_count": 5,
2019-12-18 14:03:01 +00:00
"metadata": {},
"outputs": [],
"source": [
"data_action = actions['lfp_speed']\n",
"output = exdir.File(\n",
" data_action.data_path('results'),\n",
" plugins = [exdir.plugins.git_lfs, exdir.plugins.quantities])\n",
"\n",
"ignore = ['wavelet_power', 'wavelet_freqs', 'signal']\n",
"results = []\n",
"for group in output.values():\n",
" d = group.attrs.to_dict()\n",
" d.update({k: np.array(v.data) for k, v in group.items() if k not in ignore})\n",
" results.append(d)\n",
"results = pd.DataFrame(results)"
]
},
{
"cell_type": "code",
2019-12-19 12:58:01 +00:00
"execution_count": 6,
2019-12-18 14:03:01 +00:00
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>freq_score</th>\n",
" <th>sample_rate</th>\n",
" <th>power_score</th>\n",
" <th>action</th>\n",
" <th>channel_group</th>\n",
" <th>max_speed</th>\n",
" <th>min_speed</th>\n",
" <th>position_low_pass_frequency</th>\n",
" <th>mean_freq</th>\n",
" <th>mean_power</th>\n",
" <th>speed</th>\n",
" <th>speed_bins</th>\n",
" <th>theta_freq</th>\n",
" <th>theta_power</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>0.191729</td>\n",
" <td>1000.0</td>\n",
" <td>0.432532</td>\n",
" <td>1833-010719-1</td>\n",
" <td>0</td>\n",
" <td>1</td>\n",
" <td>0.02</td>\n",
" <td>6</td>\n",
" <td>[7.154332133229601, 7.106500202042717, 7.13862...</td>\n",
" <td>[18.005621200653046, 18.66435212100411, 20.504...</td>\n",
" <td>[0.02795137493203615, 0.0283076211590443, 0.02...</td>\n",
" <td>[0.02, 0.04, 0.06, 0.08, 0.1, 0.12000000000000...</td>\n",
" <td>[6.799999999999997, 6.799999999999997, 6.79999...</td>\n",
" <td>[3.990633076071412, 3.992883430179942, 3.99513...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>0.255882</td>\n",
" <td>1000.0</td>\n",
" <td>0.434938</td>\n",
" <td>1833-010719-1</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>0.02</td>\n",
" <td>6</td>\n",
" <td>[7.035831237674811, 7.05973079549096, 7.120455...</td>\n",
" <td>[16.966011451769536, 17.60417640800431, 19.452...</td>\n",
" <td>[0.02795137493203615, 0.0283076211590443, 0.02...</td>\n",
" <td>[0.02, 0.04, 0.06, 0.08, 0.1, 0.12000000000000...</td>\n",
" <td>[6.799999999999997, 6.799999999999997, 6.79999...</td>\n",
" <td>[3.649171825378523, 3.6511305369806806, 3.6530...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>0.169116</td>\n",
" <td>1000.0</td>\n",
" <td>0.338942</td>\n",
" <td>1833-010719-1</td>\n",
" <td>2</td>\n",
" <td>1</td>\n",
" <td>0.02</td>\n",
" <td>6</td>\n",
" <td>[7.156957284750235, 7.121730043055997, 7.17760...</td>\n",
" <td>[14.747162413722597, 15.548073560884317, 16.81...</td>\n",
" <td>[0.02795137493203615, 0.0283076211590443, 0.02...</td>\n",
" <td>[0.02, 0.04, 0.06, 0.08, 0.1, 0.12000000000000...</td>\n",
" <td>[6.799999999999997, 6.799999999999997, 6.79999...</td>\n",
" <td>[3.069575227276876, 3.0713927350182493, 3.0732...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>0.071480</td>\n",
" <td>1000.0</td>\n",
" <td>0.141405</td>\n",
" <td>1833-010719-1</td>\n",
" <td>3</td>\n",
" <td>1</td>\n",
" <td>0.02</td>\n",
" <td>6</td>\n",
" <td>[7.256682286107137, 7.237350035531646, 7.27254...</td>\n",
" <td>[13.017027147293039, 12.651121743582284, 13.91...</td>\n",
" <td>[0.02795137493203615, 0.0283076211590443, 0.02...</td>\n",
" <td>[0.02, 0.04, 0.06, 0.08, 0.1, 0.12000000000000...</td>\n",
" <td>[6.399999999999999, 6.399999999999999, 6.39999...</td>\n",
" <td>[1.9508693636836856, 1.9523977795413874, 1.953...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>0.216792</td>\n",
" <td>1000.0</td>\n",
" <td>-0.012191</td>\n",
" <td>1833-010719-1</td>\n",
" <td>4</td>\n",
" <td>1</td>\n",
" <td>0.02</td>\n",
" <td>6</td>\n",
" <td>[7.095817125902336, 7.050223640391819, 7.12869...</td>\n",
" <td>[32.456068185302364, 23.01562486642484, 21.395...</td>\n",
" <td>[0.02795137493203615, 0.0283076211590443, 0.02...</td>\n",
" <td>[0.02, 0.04, 0.06, 0.08, 0.1, 0.12000000000000...</td>\n",
" <td>[6.399999999999999, 6.399999999999999, 6.39999...</td>\n",
" <td>[1.2545438245339104, 1.2553897239251606, 1.256...</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" freq_score sample_rate power_score action channel_group \\\n",
"0 0.191729 1000.0 0.432532 1833-010719-1 0 \n",
"1 0.255882 1000.0 0.434938 1833-010719-1 1 \n",
"2 0.169116 1000.0 0.338942 1833-010719-1 2 \n",
"3 0.071480 1000.0 0.141405 1833-010719-1 3 \n",
"4 0.216792 1000.0 -0.012191 1833-010719-1 4 \n",
"\n",
" max_speed min_speed position_low_pass_frequency \\\n",
"0 1 0.02 6 \n",
"1 1 0.02 6 \n",
"2 1 0.02 6 \n",
"3 1 0.02 6 \n",
"4 1 0.02 6 \n",
"\n",
" mean_freq \\\n",
"0 [7.154332133229601, 7.106500202042717, 7.13862... \n",
"1 [7.035831237674811, 7.05973079549096, 7.120455... \n",
"2 [7.156957284750235, 7.121730043055997, 7.17760... \n",
"3 [7.256682286107137, 7.237350035531646, 7.27254... \n",
"4 [7.095817125902336, 7.050223640391819, 7.12869... \n",
"\n",
" mean_power \\\n",
"0 [18.005621200653046, 18.66435212100411, 20.504... \n",
"1 [16.966011451769536, 17.60417640800431, 19.452... \n",
"2 [14.747162413722597, 15.548073560884317, 16.81... \n",
"3 [13.017027147293039, 12.651121743582284, 13.91... \n",
"4 [32.456068185302364, 23.01562486642484, 21.395... \n",
"\n",
" speed \\\n",
"0 [0.02795137493203615, 0.0283076211590443, 0.02... \n",
"1 [0.02795137493203615, 0.0283076211590443, 0.02... \n",
"2 [0.02795137493203615, 0.0283076211590443, 0.02... \n",
"3 [0.02795137493203615, 0.0283076211590443, 0.02... \n",
"4 [0.02795137493203615, 0.0283076211590443, 0.02... \n",
"\n",
" speed_bins \\\n",
"0 [0.02, 0.04, 0.06, 0.08, 0.1, 0.12000000000000... \n",
"1 [0.02, 0.04, 0.06, 0.08, 0.1, 0.12000000000000... \n",
"2 [0.02, 0.04, 0.06, 0.08, 0.1, 0.12000000000000... \n",
"3 [0.02, 0.04, 0.06, 0.08, 0.1, 0.12000000000000... \n",
"4 [0.02, 0.04, 0.06, 0.08, 0.1, 0.12000000000000... \n",
"\n",
" theta_freq \\\n",
"0 [6.799999999999997, 6.799999999999997, 6.79999... \n",
"1 [6.799999999999997, 6.799999999999997, 6.79999... \n",
"2 [6.799999999999997, 6.799999999999997, 6.79999... \n",
"3 [6.399999999999999, 6.399999999999999, 6.39999... \n",
"4 [6.399999999999999, 6.399999999999999, 6.39999... \n",
"\n",
" theta_power \n",
"0 [3.990633076071412, 3.992883430179942, 3.99513... \n",
"1 [3.649171825378523, 3.6511305369806806, 3.6530... \n",
"2 [3.069575227276876, 3.0713927350182493, 3.0732... \n",
"3 [1.9508693636836856, 1.9523977795413874, 1.953... \n",
"4 [1.2545438245339104, 1.2553897239251606, 1.256... "
]
},
2019-12-19 12:58:01 +00:00
"execution_count": 6,
2019-12-18 14:03:01 +00:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"results.head()"
]
},
{
"cell_type": "code",
2019-12-19 12:58:01 +00:00
"execution_count": 7,
2019-12-18 14:03:01 +00:00
"metadata": {},
"outputs": [],
"source": [
"identify_neurons = actions['identify-neurons']\n",
"sessions = pd.read_csv(identify_neurons.data_path('sessions'))"
]
},
{
"cell_type": "code",
2019-12-19 12:58:01 +00:00
"execution_count": 8,
2019-12-18 14:03:01 +00:00
"metadata": {},
"outputs": [],
"source": [
"results = results.merge(sessions, on='action')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Frequency score"
]
},
{
"cell_type": "code",
2019-12-19 12:58:01 +00:00
"execution_count": 9,
2019-12-18 14:03:01 +00:00
"metadata": {},
"outputs": [],
"source": [
"query_base_i = 'baseline and Hz11'\n",
"query_stim_11 = 'stimulated and Hz11'\n",
"\n",
"query_base_ii = 'baseline and Hz30'\n",
"query_stim_30 = 'stimulated and Hz30'\n",
"\n",
"query_stim_combined = 'stimulated and Hz11 or Hz30'"
]
},
{
"cell_type": "code",
2019-12-19 12:58:01 +00:00
"execution_count": 10,
2019-12-18 14:03:01 +00:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"U-test: U value 37221.0 p value 1.9679601390031718e-50\n",
"U-test: U value 16950.0 p value 1.642880876541107e-32\n",
2019-12-19 12:58:01 +00:00
"U-test: U value 72140.0 p value 2.0364061218728567e-30\n"
2019-12-18 14:03:01 +00:00
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAASAAAAGeCAYAAAA0Q9yFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAXEQAAFxEByibzPwAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nOzdd5wkV33v/c+pqs7d05M2J2m1UmkVEZKQQBJaJSSZ8BDuA8aPsf26gO0XGJyusQ3GyMLgyDVgkq8JBhsbuAQRRFCyJAQKKOdSWHa1eSd3DlV1nj+qZzW7O7M7oburu+f31kuv0U53V/9GM/Pdc06doLTWCCFEGIywCxBCLF8SQEKI0EgACSFCIwEkhAiNBJAQIjQSQEKI0EgACSFCIwEkhAiNBJAQIjQSQEKI0EgACSFCIwEkhAiNBJAQIjQSQEKI0EgAibazbfsm27Z/Msdj/8e2becYr32/bdvVYzz+a7Zta9u21zSjVtFaVtgFiOXBtm0FvBr4MTAGaNu2I8DVwI+AVwG3Nx4bs23bALYBDzqOM2nb9uXAA9OPN655AbDXcZxdtm1fBDw3fW1g3Lbt0wHfcZyn2vaFigWRFpBolwuA7wMvAGcCZw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fqFQkRsKKMFLO88lH/xvPlwFp0XoSQF2k7Nb45CO3MVLKk4nGiVuRpl5/RTxNvl7lsdE9fGf7Q029thCzkQDqIl966m62T41S8VyG46mmX98yTFbEUxwo5/jK0/ewKz/e9PcQYiYJoC7x4MgL3LD9YQ6W86xKZDCWOPA
"text/plain": [
"<Figure size 255x450 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAASEAAAGeCAYAAADbgbe7AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAXEQAAFxEByibzPwAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nOy9d5RkV33v+9knVercPTM9eaQZaQsJSUgCYxBBwSQbP4OXwWA/4/hsTHS4Nr5wbWT5wl3vvnfftZ+RjX2deM4JZDA2SbIESoBQRGFrpAma0cSe6VTxpP3+OFWt1qi7p0NVnQr7s1avkuqE+vVU1bd/+7d/QWitMRgMhrSw0jbAYDD0N0aEDAZDqhgRMhgMqWJEyGAwpIoRIYPBkCpGhAwGQ6oYETIYDKliRMhgMKSKESGDwZAqRoQMBkOqGBEyGAypYkTIYDCkihEhg8GQKkaEDAZDqhgRMrQdKeVXpJRfXubYH0sp1QrXflRKWVvh+I9JKbWUcmszbDW0HidtAwz9gZRSAD8AfAk4A2gppQu8Cfh34I3AHfVjZ6SUFnAd8IBSakZKeQPwncbx+j1fCRxTSh2RUl4LPN24N3BWSnkZECulnmjbL2pYM8YTMrSLVwJfAJ4FLgdeChyuP/ejwBeBY8D3AVsABdwGvE1K6QG3AseBnwBsKeWDwH3Az9bv/6fAUeA3gBrwZeC7wEfa8LsZNoARIUO7+CaJ+Pw/wEuAy4BPA68G/h6QwK8BlwIXkojSjcDfKKX8+vk/A+wDNgOPkXhW/71+/9cB7wQmgSxQAX4Y+KXW/2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nz
"text/plain": [
"<Figure size 255x450 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"data": {
2019-12-19 12:58:01 +00:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAASAAAAGeCAYAAAA0Q9yFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAXEQAAFxEByibzPwAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nOy9eZQc93Xf+/lVVVfvs2ElCIIAtyK4iqQoblooUqstybJly4rzYvskfk6e9SxbzvHyrDimlWfnZXuxfSRFipfYjjcpiS3J1pMtiTJJcZUoLhJFsiQQBAgQO2bp6bW23/ujugeDwcxgBtPd1V19P+eADXRVV91hT3/73vu79/6U1hpBEIQkMJI2QBCE0UUESBCExBABEgQhMUSABEFIDBEgQRASQwRIEITEEAESBCExRIAEQUgMESBBEBJDBEgQhMQQARIEITFEgARBSAwRIEEQEkMESBCExBABEvqO4zhfchzn71c49l8dx3FXee2vOo7TWuX4jzmOox3Huagbtgq9xUraAGE0cBxHAd8P/B1wGtCO42SAtwNfBN4GPNA+dtpxHAO4G3jKdd1Zx3HuAb7ZOd6+5m3AEdd1DzmOcxewr3NtYNpxnGuByHXdF/r2gwrrQjwgoV/cBvwN8ApwPXAdcLD93I8CXwCOAG8BtgEucD/wXsdxbOCzwFHgnwCm4zhPA48D/6x9/T8ADgO/ArSAvweeA365Dz+bcIGIAAn94gli4fl/gb3AtcAngTuBTwMO8IvANcBlxIJ0L/Dnrut67fP/KXAFsBX4DrFH9e/b138j8H5gO5ADGsAPAT/f+x9NuFBEgIS+4LquJvZq3kEsRk8Sh11Pu64buq77PeD1wHHgc8A7gWfb4oPruoeIhSsH/DfgrcCLruvW28dPAJPEAvUxYkE64rrubN9+SGHdiAAJ/eReYpH5WeCngVuAdwM4jnMDsQfzYeBngC3AT3Ze6DjONu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pIl7xYTe4p88hg58jFzhnGNKqbYX5OOfOiEClAB/SCxAv+U4zr2u6zYAHMf5QeANwOdc1z283AvbHs19yx1zHOctxAL026Ps+XS64ZemepSK80KBCFBP0VrjHT+K9n1UObPsOSqTQfs+3omjFK7c22cLB4dEBMh13cccx/k48EHgWcdxPgvsBN4PHAd+oXOu4zh3A3cDz7iu+9n+Wzt8NP0Qrc9dCevMhG76o5136DVhdZ6wXouX4K0VBKjjAZ042mfrBoskx3H8bPtPi7g1403AXwJ3uq67f9F5dwO/Dry33wYOI14Y4YXRObtiADKUvk94x15dSECvtOJodDygY0f6bN1gkdg4Dtd1NfCx9p/VzruPFUKuZc59/YYNG3I6O2J0ShEXYyjwQ5iXbXl6inf0MNr3UJmVKk3iECzyPbyTx4h8HyOzvKeUdmQgWco4XfMIo9j7WfrtaxmKQGtm6t4Krxa6QevYYbTvY6wiQBgmSim07+EdH10vSAQoZZyueQSRxlqm3Nk0DIIw4lRNBKiXtA6/QuR5qFW8GqUUKmMTeR7ekUN9tG6wEAFKGUfmmvhhRMY8963NmIog0lSaPtWWhGG9IKjMEszNxDmg1TwgQNk22vdovbruAaCpQQQoZRyebeCtIECGUliGwgs1h2cby7xa2Citwwfb+Z/Mme2YV8DI2GjPo3lYBEhIAZHWHJyu4wUR9jICBGCbBl4Q8fJp2RamF7QOH0B73ur5nzbKzhL5Hv7pkyO7UaEIUIo4Mtuk0vSJtMY2l1/+zVkGrSDkuydG8xe+1zRfeZnIa6Hs7HnPVYYR1wN5LZqHXu6DdYOHCFCKeP54hWYQkbXMFetPshmTph/x0qkanuyQ2lUi36d19DDaa2GsQYAADDsOw1qv7D//ySlEBCh
2019-12-18 14:03:01 +00:00
"text/plain": [
"<Figure size 255x450 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"stuff = 'freq_score'\n",
"base = results.query(query_base_i)[stuff].to_numpy()\n",
"stim = results.query(query_stim_11)[stuff].to_numpy()\n",
"plt.figure(figsize=figsize_violin)\n",
"violinplot(base, stim, colors=colors)\n",
"# plt.ylim(-0.02, 0.5)\n",
"plt.savefig(output_path / \"figures\" / \"frequency_score_11.svg\", bbox_inches=\"tight\", transparent=True)\n",
"plt.savefig(output_path / \"figures\" / \"frequency_score_11.png\", bbox_inches=\"tight\", transparent=True)\n",
"\n",
"base = results.query(query_base_ii)[stuff].to_numpy()\n",
"stim = results.query(query_stim_30)[stuff].to_numpy()\n",
"plt.figure(figsize=figsize_violin)\n",
"violinplot(base, stim, colors=colors[2:])\n",
"# plt.ylim(-0.02, 0.5)\n",
"plt.savefig(output_path / \"figures\" / \"frequency_score_30.svg\", bbox_inches=\"tight\", transparent=True)\n",
"plt.savefig(output_path / \"figures\" / \"frequency_score_30.png\", bbox_inches=\"tight\", transparent=True)\n",
"\n",
2019-12-19 12:58:01 +00:00
"base = results.query(query_base_i)[stuff].to_numpy()\n",
2019-12-18 14:03:01 +00:00
"stim = results.query(query_stim_combined)[stuff].to_numpy()\n",
"plt.figure(figsize=figsize_violin)\n",
"violinplot(base, stim, colors=colors[4:])\n",
"# plt.ylim(-0.02, 0.5)\n",
"plt.savefig(output_path / \"figures\" / \"frequency_score_combined.svg\", bbox_inches=\"tight\", transparent=True)\n",
"plt.savefig(output_path / \"figures\" / \"frequency_score_combined.png\", bbox_inches=\"tight\", transparent=True)"
]
},
{
"cell_type": "code",
2019-12-19 12:58:01 +00:00
"execution_count": 11,
2019-12-18 14:03:01 +00:00
"metadata": {},
"outputs": [],
"source": [
"def plot_speed(query_base, query_stim, stuff, colors, labels, filename=None, show_raw=False):\n",
" base = np.array([s for s in results.query(query_base)[stuff]])\n",
" base_bins = results.query(query_base)['speed_bins'].to_numpy()\n",
"\n",
" stim = np.array([s for s in results.query(query_stim)[stuff]])\n",
" stim_bins = results.query(query_stim)['speed_bins'].to_numpy()\n",
" if show_raw:\n",
" fig, axs = plt.subplots(1, 2, sharey=True, figsize=figsize_speed)\n",
"\n",
" for b, h in zip(base_bins, base):\n",
" axs[1].plot(b, h)\n",
" axs[1].set_xlim(0.1,1)\n",
" axs[1].set_title(labels[0])\n",
"\n",
" for b, h in zip(stim_bins, stim):\n",
" axs[0].plot(b, h)\n",
" axs[0].set_xlim(0.1,1)\n",
" axs[0].set_title(labels[1]) \n",
"\n",
" fig, ax = plt.subplots(1, 1, figsize=figsize_speed)\n",
" plot_bootstrap_timeseries(base_bins[0], base.T, ax=ax, label=labels[0], color=colors[0])\n",
" plot_bootstrap_timeseries(stim_bins[0], stim.T, ax=ax, label=labels[1], color=colors[1])\n",
"\n",
" plt.xlim(0, 0.9)\n",
" plt.gca().spines['top'].set_visible(False)\n",
" plt.gca().spines['right'].set_visible(False)\n",
" plt.legend(frameon=False)\n",
" \n",
" if filename is not None:\n",
" plt.savefig(output_path / \"figures\" / f\"{filename}.svg\", bbox_inches=\"tight\", transparent=True)\n",
" plt.savefig(output_path / \"figures\" / f\"{filename}.png\", bbox_inches=\"tight\", transparent=True)"
]
},
{
"cell_type": "code",
2019-12-19 12:58:01 +00:00
"execution_count": 12,
2019-12-18 14:03:01 +00:00
"metadata": {},
"outputs": [
{
"data": {
2019-12-19 12:58:01 +00:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAhoAAAGTCAYAAABu7rurAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAXEQAAFxEByibzPwAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nOzdeXRcd33w//ddZu7MaLTvm2V5u/Ga2I6XxGTBSVhTCDSkTXmeEg604TwEKA+Qh5bmJEBpDw1toUB+TeHQNN0IpoTQhKxkhcRr4ngfW5Zka9/X2e76++OORlJk2ZKt0Vj293Wic2fu3LnzHVmZ+5nv8vlIrusiCIIgCIKQCXK2GyAIgiAIwqVLBBqCIAiCIGSMCDQEQRAEQcgYEWgIgiAIgpAxItAQBEEQBCFjRKAhCII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CjLVBEBaiiUta1cLqbDdHmCdzNQCwA/g68H90XX8beBwowBvuKAO+E4lEpv3kj0QibwJvTvPw+/CCjOkeF+bJO5e3uq5Lb28vzz//PP39/dx00028973vBWDjxo0sXryY1157jY9//OOsX7+e4eFhXnnlFXp6eigsLGRgYIDBwUGCwSCf+MQnePLJJ/nud7/Lrl27WLVqFfF4nOeff57BwUHuu+++dEKwr3zlK+zfv59HH32UXbt2sXnzZizL4rnnnqOvr4/bb799ymqQuSTLMg8++CCf/OQn+cIXvsC
2019-12-18 14:03:01 +00:00
"text/plain": [
"<Figure size 600x450 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"plot_speed(query_base_i, query_stim_11, 'mean_freq', \n",
" colors, labels, filename='lfp_speed_freq_11')"
]
},
{
"cell_type": "code",
2019-12-19 12:58:01 +00:00
"execution_count": 13,
2019-12-18 14:03:01 +00:00
"metadata": {},
"outputs": [
{
"data": {
2019-12-19 12:58:01 +00:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAhoAAAGTCAYAAABu7rurAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAXEQAAFxEByibzPwAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nOzdeXhcZ33A++97zpl9tFu2vMWOY5hsBBJoSpISICEB0pSS7hBK6QOUtE9yW0rIhfKk5Lb00jS9bcNWKDw0F25bAi2UljRko6zBjhNI4jixvFuLbW2j2WfO+t4/zmi0y5IlWbL9+zyPPNIsZ97R4vOb3/t7f6/SWiOEEEIIsRyMlR6AEEIIIc5eEmgIIYQQYtlIoCGEEEKIZSOBhhBCCCGWjQQaQgghhFg2EmgIIYQQYtlIoCGEEEKIZSOBhhBCCCGWjQQaQgghhFg2EmgIIYQQYtlIoCGEEEKIZSOBhhBCCCGWjQQaQgghhFg250ygkclk/iuTyfz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P7449x7770MDw9z1113AZDNZvmd3/kdisUiN954Ixs2bKC/v59HHnmEH/zgB3z961/nwgsvBKBarfKe97yHZ599lksuuYR3vOMdVCoVHnnkEd797nfzV3/1V/zar/3aKb2WO+64g56eHm688UZSqRSPPPIIX/rSlzhy5Aif/exnG/c7ePAg7373uxkZGeH1r389N910E319fXz729/me9/7Hg888AAXXXTRKX5HhTi3hIGGi4pHJl1vtMQJWuJ4PaPU/vcAyd96VSPjIc4cEmgs0H99aw8/+dFhzoReMkrBNa87n7fdcsmSHO+pp57i05/+dONr27Y5dOgQ3//+93nta187bRXHvffeC8CDDz7Itm3bGtcfOHCAm2++mW9961uNQOPhhx9meHiYT3ziE/zmb/5m477XXnstd911F//yL//CX/7lXwJw//338+yzz/L+97+fD33oQyilALj99tv5rd/6LT7+8Y9z9dVX09XVteDXmMvlePjhh+no6ADgAx/4AG9961t5/PHHGRgYYN26dQB8+MMfJpvN8vnPf543vOENjcfv2LGD3//93+euu+7iv/7rvxpjE0LMbqwQVMWnn5LM81pxd5/AOzKK80wfsV88bwVGKBZDAo0FevLHR86IIANA63C8SxloPPXUUzPe1tbWxsjICMlksv7cmj/+4z/G87xJQQbA9u3bWbNmDUNDQ43rxqZRnnvuOd7+9rcTiYTvbG666SauuOIK1q9fD4Dv+3zjG9+gvb2dD37wg5NO5OvWreO9730vf/VXf8W3v/1tPvCBDyz4Nb7jHe9oBBkA7e3tXHHFFXzve9+jt7eXdevW8fzzz7Nnzx5uuOGGSUEGwGtf+1quv/56HnvsMZ599lkuv/zyBY9BiHNNkKtBzUO1xKfdpiwTa0tb2FvjqR6sCzow16RWYJTiVEmgsUBX/9LWMyajYRiKq39p65Id7/bbb5+0WsO2bQYHB3nooYe4//77efrpp/nWt75FZ2cnSine9KY3ATA0NMS+ffvo7e3lyJEj7N69m5GRsOuf7/uYpslb3vIWPve5z/GNb3yDRx99lNe+9rVcc801XHvttWzevLnxnIcPH6ZUKtHV1cXnPve5aWPs7+8HwtqQUzE1KAJobm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DQ7S1tTE6OkoulyORSPB7v/d7fOc73+Ef/uEf2LlzJxdffDHVapXHHnuMXC7H3Xff3chefPjDH+bZZ5/lK1/5Cjt37uTKK6/E8zweffRRRkZG+I3f+I1pq0GWkmEY3Hffffz+7/8+f/zHf8w111xDJpNhcHCQRx99FNd1+eQnP0l
2019-12-18 14:03:01 +00:00
"text/plain": [
"<Figure size 600x450 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"plot_speed(query_base_ii, query_stim_30, 'mean_freq', \n",
" colors[2:], labels[2:], filename='lfp_speed_freq_30')"
]
},
{
"cell_type": "code",
2019-12-19 12:58:01 +00:00
"execution_count": 14,
2019-12-18 14:03:01 +00:00
"metadata": {},
"outputs": [
{
"data": {
2019-12-19 12:58:01 +00:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAhoAAAGTCAYAAABu7rurAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAXEQAAFxEByibzPwAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nOy9eZgcdb3v/6qqXqdn32cyk8lMJilICEtCIIRFCKACLhwUFT0gHhc4iteLYK565MAV8Bwe8PzkhwpyuIoLiuIVRBZZAmETEiAJ2TvrJLPvM713rfeP6ulMZybJrJkl39fz9FNd27e/1bPUuz6rZNs2AoFAIBAIBJOBPNUTEAgEAoFAMHsRQkMgEAgEAsGkIYSGQCAQCASCSUMIDYFAIBAIBJOGEBoCgUAgEAgmDSE0BAKBQCAQTBpCaAgEAoFAIJg0hNAQCAQCgUAwaQihIRAIBAKBYNIQQkMgEAgEAsGkIYSGQCAQCASCSUMIDYFAIBAIBJOGEBoCgUAgEAgmjRNGaKiq+rSqqk9P9TwEAoFAIDiRcE31BI4j8+vr6xcB9lRPRCAQCASCGYg0lpNOGIuGQCAQCASC448QGgKBQCAQCCYNITQE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S0//RTTBWhNAQTAi9vb0A5OTk8I9//IOOjg4++9nPcvPNN2cc19PTQ09PD3DISvDcc8+xbt06br31VnJyctIlzq+99louv/xyGhoa6OjooK6uDp/Px86dO9E0DY8ns+L9u+++y2uvvcbKlStZuXLlpFz
2019-12-18 14:03:01 +00:00
"text/plain": [
"<Figure size 600x450 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"plot_speed(\n",
2019-12-19 12:58:01 +00:00
" query_base_i, query_stim_combined, 'mean_freq', \n",
2019-12-18 14:03:01 +00:00
" colors[4:], labels[4:], filename='lfp_speed_freq_combined')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Power Familiar"
]
},
{
"cell_type": "code",
2019-12-19 12:58:01 +00:00
"execution_count": 15,
2019-12-18 14:03:01 +00:00
"metadata": {},
"outputs": [
{
"data": {
2019-12-19 12:58:01 +00:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAhQAAAGTCAYAAABwJ4sYAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAXEQAAFxEByibzPwAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nOzdd3SkZ3n4/e8zvTeNurS70ko725vXa7OLbXAFY5tmiuEN5ZDE/F6bFsAvPw6OnYCTECcEfgYHYt7gQxJeOyY2BhtXDGts7HVdb5Nm1ev03uvz/jEjebW9qIyk+3POnEczzzMz90ijmeu5y3VJsiwjCIIgCIJwPhQL3QBBEARBEBY/EVAIgiAIgnDeREAhCIIgCMJ5EwGFIAiCIAjnTQQUgiAIgiCcNxFQCIIgCIJw3kRAIQiCIAjCeRMBhSAIgiAI500EFIIgCIIgnDcRUAiCIAiCcN5EQCEIgiAIwnkTAYUgCIIgCOdNBBSCIAiCIJy3JRdQuFyuX7tcrl8vdDsEQRAEYTlRLXQD5sDqrq6u9YCo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SK5U5IOdW2kxVXIrFsolxhIRhuJBhhMhgpkEkVyGaC5NNJeh1WglnE3Na5sXMxFQnMJn1r1jUfRQKCUFn1n3jll7vFtvvXXG6ohcLoff7+fxxx/nBz/4Aa+99hqPPPII9fX1SJLElVdeCUAgEODIkSOMjY0xPDzMgQMHCIVCQCVAUCqVvOc97+Hee+/loYce4umnn+biiy9m9+7dXHrppbS3t08/59D
2019-12-18 14:03:01 +00:00
"text/plain": [
"<Figure size 600x450 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"plot_speed(\n",
" query_base_i, query_stim_11, 'mean_power', \n",
" colors, labels, filename='lfp_speed_power_11')"
]
},
{
"cell_type": "code",
2019-12-19 12:58:01 +00:00
"execution_count": 16,
2019-12-18 14:03:01 +00:00
"metadata": {},
"outputs": [
{
"data": {
2019-12-19 12:58:01 +00:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAhQAAAGTCAYAAABwJ4sYAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAXEQAAFxEByibzPwAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nOzdeZhkdX3o//epU/vaVb33dM8OxTqsIkIkibiH4E2u2cRLzGMMJMo1UeBHkh/qE/UqwV8SBLerj+FRY0ATiF65yqLRqMjOwDAwBcxCT+/dta/n1Fl+f5yq6u6Z7pnp6eplZj6v5+mnuqpOV317uqbOp77fz/fzUWzbRgghhBBiOVxrPQAhhBBCnPgkoBBCCCHEsklAIYQQQohlk4BCCCGEEMsmAYUQQgghlk0CCiGEEEIsmwQUQgghhFg2CSiEEEIIsWwSUAghhBBi2SSgEEIIIcSySUAhhBBCiGWTgEIIIYQQyyYBhRBCCCGW7aQLKJLJ5PeTyeT313ocQgghxKnEvdYDWAHbtm/ffhYgfdmFEEKIpVOO54dOuhkKIYQQQqw+CSi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nF1xwwZLHIISA1w5kmZkuU6nUGTqGRMylCoW8BAIectkqowfzlIo6mXSFiy4eJJ4IHv0BxDGTgOIILvu1zSfEDIXLpXDZr21u2+N96EMfmrc7QtM0pqameOCBB7jjjjt46qmnuP/+++nu7kZRFN785jcDMD09zcsvv8zBgwc5cOAAu3btIp1OA06AoKoqb3/72/niF7/Id7/7XR566CEuvfRSLr/8cq644gqGhoZaz7l//35KpRJ9fX188YtfPGyMo6OjgJO7cTwODX4AotEoAPV6HYBdu3YBzjLN3Bmbpnw+D8CLL74oAYUQx6FS1tn7apqZ6TJdXUFUdWVyHFwuhURnkHDEx8x0ibFRA4VRLnrdIB3xwIo856lIAoojuPp3zubtv3XGKZ9D4fP5GBoa4vrrryebzXL33XfzzW9+k4985COAk2dw22238V//9V/Yjehrw4YNXHzxxbzyyivk8/nW7d3d3dx333185Stf4ZFHHuHBBx/kwQcfBJxP/Z/4xCfYsmVL62Q9MTHBXXfdtejYmscdz+90qOYsSHOshUIBgKeffpqnn3560cfK5XLHNQYhTmW2bbPnpSky6Qqq27UqJbS9XpW+/igT40XGRvOgwMWXDBE7ziRQMZ8EFEfhnKilQErTZZddxt13382ePXsAqFQqvO997yOdTnPddddx5ZVXsnXrVsLhMACXX375YY/R39/PJz7xCT7+8Y/z8ssv86tf/Yof/OAHPPbYY1x//fX86Ec/IhQKAfDGN76Rr33ta6v3C87RHMNHP/pR/uzP/mxNxiDEyWpyosT4WIF8rsrAYGzV8pBcLoW+/ggT4wXGRws88+QIF18ySCQqQcVyyR4asSTZbBaASCQCwKOPPsrU1BTvfve7+au/+it27NjRCiYymQyZTAaY/dT/f//v/+XjH/84xWIRRVFIJpO8733v495772Xz5s0cOHCAqakptm7dit/vZ8+ePei6ftg4nnzyST73uc/x6KOPrtjvetZZZwHw/PPPL3j/d7/7XT7/+c+zb9++FRuDECcjwzBJ7ZliZqZMNOZflV1qczWDirphMjaa56knRygVpV7FcklAIY5ZpVLhG9/4BgBvectbAPD7nah+bGxs3rGapnHrrbe2kjANwwBgz5493HPPPXzrW9+ad3yhUCCXyxEKhYjH43i9Xq6++mqmp6e5/fbbW48DTlBz66238tWvfhVNW7k3gQsvvJCtW7fy8MMP86Mf/Wj
2019-12-18 14:03:01 +00:00
"text/plain": [
"<Figure size 600x450 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"plot_speed(\n",
" query_base_ii, query_stim_30, 'mean_power', \n",
" colors[2:], labels[2:], filename='lfp_speed_power_30')"
]
},
{
"cell_type": "code",
2019-12-19 12:58:01 +00:00
"execution_count": 17,
2019-12-18 14:03:01 +00:00
"metadata": {},
"outputs": [
{
"data": {
2019-12-19 12:58:01 +00:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAiYAAAGTCAYAAAAcIdkdAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAXEQAAFxEByibzPwAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nOzdeXxcdd3//deZfU0me5omXdOetlCWspWyCC2LrHKxiIgsXqig4o9LWW7xEuEW8JIL9ZYLlUV+giiL4gWo7KWlbEILhdLS5bRpkmZPJrPvM2fm3H+cSdq0aZukWSbt9/l49DHNLGdJ2sx7vufz/XwlTdMQBEEQBEEoBIaJPgBBEARBEIQ+IpgIgiAIglAwRDARBEEQBKFgiGAiCIIgCELBEMFEEARBEISCIYKJIAiCIAgFQwQTQRAEQRAKhggmgiAIgiAUDBFMBEEQBEEoGCKYCIIgCIJQMEQwEQRBEAShYIhgIgiCIAhCwRDBRBAEQRCEgiGCySBkWf6HLMv/mOjjEARBEIRDjWmiD6BAza6vr18AaBN9IIIgCIIwCUkjfaEYMREEQRAEoWCIYCIIgiAIQsEQwUQQBEEQhIIhgokgCIIgCAVDBBNBEARBEArGqM3KkWW5FLgduBCYBvQAfwfuVhTFu9tzy4CfABcAU4Ad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FdiQO3qCUZFeK7OMYmSygByGn68Y5mMFmzZs2gj5WUlODz+XA4HGiaxk033YSqqgNCCUB9fT3l5eV4vd6dx5nTP4V
2019-12-18 14:03:01 +00:00
"text/plain": [
"<Figure size 600x450 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"plot_speed(\n",
2019-12-19 12:58:01 +00:00
" query_base_i, query_stim_combined, 'mean_power', \n",
2019-12-18 14:03:01 +00:00
" colors[4:], labels[4:], filename='lfp_speed_power_combined')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Speed"
]
},
{
"cell_type": "code",
2019-12-19 12:58:01 +00:00
"execution_count": 18,
2019-12-18 14:03:01 +00:00
"metadata": {
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
2019-12-19 12:58:01 +00:00
"U-test: U value 31872.0 p value 4.112172727188835e-10\n"
2019-12-18 14:03:01 +00:00
]
},
{
2019-12-19 12:58:01 +00:00
"ename": "IndexError",
"evalue": "list index out of range",
2019-12-18 14:03:01 +00:00
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
2019-12-19 12:58:01 +00:00
"\u001b[0;31mIndexError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m<ipython-input-18-ea7e4968e5a4>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m 19\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 20\u001b[0m \u001b[0mplt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbar\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mbins\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstim\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmean\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0maxis\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mwidth\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdiff\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mbins\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlabel\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'Stimulated'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0malpha\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m.5\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcolor\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mcolors\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m5\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m;\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 21\u001b[0;31m \u001b[0mplt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbar\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mbins\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mbase\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmean\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0maxis\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mwidth\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdiff\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mbins\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlabel\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'Baseline'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0malpha\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;36m.5\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcolor\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mcolors\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m6\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\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 22\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 23\u001b[0m \u001b[0mplt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mlegend\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mframeon\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mFalse\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;31mIndexError\u001b[0m: list index out of range"
2019-12-18 14:03:01 +00:00
]
},
{
"data": {
2019-12-19 12:58:01 +00:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAASAAAAGeCAYAAAA0Q9yFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAXEQAAFxEByibzPwAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nOy9ebwlVXnv/a1pj+fsM/XpmaaBlsXcAioCAg3EEeOUOL4RjYkmYpBcfTPpvdHLjSZX894b7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YgzTRAA7dqU9rZ+VMhlADFmJsf3stUuU53xmrJxMOFKOQsSjWHZ/ZNIfdPt91+nCnu2IVn19BD3ulU0zSMVBqvVqP0ghIgRUSMTle5Tw4zXa7Tk49mdbqh6+TTJtNlm1se2ReJD3HEcxyqB4bw7Dp6OvyBAT1l4dl1yns6/3euBCim3P7YfqbLdVKmTsps/dD7fPTkUkyX69zz9BDTlc7PSSyG6sERPNsG30czwv/baA0Bquw7EHrbcUMJUAzxPJ/btu9nqlynkIu2Nk/a0jF0jcmSzY+f6PwPxGKoDQ3j1R10y2rJwIBumfhOndrQaOhtx41Qx3WFEJcDVwECKAO3AR+XUu5aRltbgYeAK6SUX5rnmrcAHwVeTLBn9ZPAP0gpv7G8O4gHP39hnAPjFeqORz4T7VQtTdMo5CymK3X+87EDvOGlxxz1q+Srw6P49TpaiMPvs9FMC6/uUB0eaUn7cSK0CEgI8Snga0AGuAa4A3gH8LAQYkkz2YQQm4DrgXm//oUQVwHfA04Fvg5cCxwL/LsQ4r8v5x7iwu2P7We6Uqcra6L
2019-12-18 14:03:01 +00:00
"text/plain": [
"<Figure size 255x450 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"data": {
2019-12-19 12:58:01 +00:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjcAAAGTCAYAAADUTTPLAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAXEQAAFxEByibzPwAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nO3de5hdVZnn8W8lJFwikBGYwQuBEPFNQ+MFFBkUiCBD2xhFZFRU1Hm8oQyhsXlQVBChcUZpudigIo19sUWkFcUZmXlk0OBEcPDazXQ6L2C4BAbaxgtCAgSomj/WOnAozqnrqcvZ9f08Tz2b2vs966zaVKp+tfbeaw0MDQ0hSZLUFPNmugOSJEm9ZLiRJE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+rMHGw/kJm3AbcBB0XE/Lr7kLq9tkNb17bXRMQC4BXAhsy8ZVjbg5TLTttSRn0AVlACTKe21wCb295fkiT1kV6O3HweeAZl5Gaow/Hn1+2tXV6/HtgSWDqG+vV1u7xudwMWjtJ2e33XtjPzUcro0tKIWNilPUmSNEv1JNxExFuBo4FT6ihMJzvU7W+6HL+/bhePoX48tROtnwds1+W4JEmapSYdbiLiOZTLUNdSRm+6aY2CPNLleGv/VmOoH09tL+ob5mkPskmS1Bi9GLm5FJgPvGvYjbzDPVS33S71bFm3D46hfjy1vahvjoF5LNhxp5nuhSRJU2ZSk/hFxHHA4cD7MvOOUcpbl4AWdzm+fd22LiG1128cR+142+5WPwT8vsvxvrdx3U2j1ixavvc09ESSpN6a7AzFb67biyPi4g7H3xER7wD+hvIkFcCyLm0to4SYO+vn6yhPQC0
2019-12-18 14:03:01 +00:00
"text/plain": [
2019-12-19 12:58:01 +00:00
"<Figure size 600x450 with 1 Axes>"
2019-12-18 14:03:01 +00:00
]
},
2019-12-19 12:58:01 +00:00
"metadata": {
"needs_background": "light"
},
2019-12-18 14:03:01 +00:00
"output_type": "display_data"
}
],
"source": [
"stuff = 'speed'\n",
"min_speed = results['min_speed'].iloc[0]\n",
"max_speed = results['max_speed'].iloc[0]\n",
"\n",
"f = np.median\n",
2019-12-19 12:58:01 +00:00
"base = np.array([f(a) for a in results.query(query_base_i)[stuff]])\n",
2019-12-18 14:03:01 +00:00
"stim = np.array([f(a).mean() for a in results.query(query_stim_combined)[stuff]])\n",
"plt.figure(figsize=figsize_violin)\n",
"violinplot(stim, base)\n",
"\n",
"plt.savefig(output_path / \"figures\" / \"speed.svg\", bbox_inches=\"tight\")\n",
"plt.savefig(output_path / \"figures\" / \"speed.png\", bbox_inches=\"tight\", transparent=True)\n",
"\n",
"plt.figure(figsize=figsize_speed)\n",
"binsize = 0.02\n",
"bins = np.arange(min_speed, max_speed + binsize, binsize)\n",
2019-12-19 12:58:01 +00:00
"base = np.array([np.histogram(a, bins)[0] for a in results.query(query_base_i)[stuff]])\n",
2019-12-18 14:03:01 +00:00
"stim = np.array([np.histogram(a, bins)[0] for a in results.query(query_stim_combined)[stuff]])\n",
"\n",
2019-12-19 12:58:01 +00:00
"plt.bar(bins[1:], stim.mean(axis=0), width=np.diff(bins)[0], label='Stimulated', alpha=.5, color=colors[5]);\n",
"plt.bar(bins[1:], base.mean(axis=0), width=np.diff(bins)[0], label='Baseline', alpha=.5, color=colors[6]);\n",
2019-12-18 14:03:01 +00:00
"\n",
"plt.legend(frameon=False)\n",
"\n",
"plt.savefig(output_path / \"figures\" / \"speed_histogram.svg\", bbox_inches=\"tight\")\n",
"plt.savefig(output_path / \"figures\" / \"speed_histogram.png\", bbox_inches=\"tight\", transparent=True)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Table"
]
},
{
"cell_type": "code",
2019-12-19 12:58:01 +00:00
"execution_count": 19,
2019-12-18 14:03:01 +00:00
"metadata": {},
"outputs": [],
"source": [
"columns = [\n",
" 'power_score',\n",
" 'freq_score'\n",
"]\n",
"\n",
"\n",
"def summarize(data):\n",
" return \"{:.2f} ± {:.2f} ({})\".format(data.mean(), data.sem(), sum(~np.isnan(data)))\n",
"\n",
"\n",
"def MWU(column, query1, query2):\n",
" '''\n",
" Mann Whitney U\n",
" '''\n",
" Uvalue, pvalue = scipy.stats.mannwhitneyu(\n",
" results.query(query1)[column].dropna(), \n",
" results.query(query2)[column].dropna(),\n",
" alternative='two-sided')\n",
" \n",
" return \"{:.2f}, {:.3f}\".format(Uvalue, pvalue)\n",
"\n",
"\n",
"def PRS(column, query1, query2):\n",
" '''\n",
" Permutation ReSampling\n",
" '''\n",
" pvalue, observed_diff, diffs = permutation_resampling(\n",
" results.query(query1)[column].dropna(), \n",
" results.query(query2)[column].dropna(), statistic=np.median)\n",
" \n",
" return \"{:.2f}, {:.3f}\".format(observed_diff, pvalue)\n",
"\n",
"summary_i = pd.DataFrame()\n",
"\n",
2019-12-19 12:58:01 +00:00
"summary_i['Baseline I'] = results.query(query_base_i)[columns].agg(summarize)\n",
"summary_i['11 Hz'] = results.query(query_stim_11)[columns].agg(summarize)\n",
2019-12-18 14:03:01 +00:00
"\n",
"summary_i['MWU'] = list(map(lambda x: MWU(x, query_base_i, query_stim_11), columns))\n",
"summary_i['PRS'] = list(map(lambda x: PRS(x, query_base_i, query_stim_11), columns))\n",
"\n",
"summary_ii = pd.DataFrame()\n",
"\n",
2019-12-19 12:58:01 +00:00
"summary_ii['Baseline II'] = results.query(query_base_ii)[columns].agg(summarize)\n",
"summary_ii['30 Hz'] = results.query(query_stim_30)[columns].agg(summarize)\n",
2019-12-18 14:03:01 +00:00
"\n",
"summary_ii['MWU'] = list(map(lambda x: MWU(x, query_base_ii, query_stim_30), columns))\n",
"summary_ii['PRS'] = list(map(lambda x: PRS(x, query_base_ii, query_stim_30), columns))\n",
"\n",
"summary_combined = pd.DataFrame()\n",
"\n",
2019-12-19 12:58:01 +00:00
"summary_combined['Baseline I'] = results.query('not {}'.format(query_base_i))[columns].agg(summarize)\n",
"summary_combined['Combined'] = results.query('{}'.format(query_stim_combined))[columns].agg(summarize)\n",
2019-12-18 14:03:01 +00:00
"\n",
2019-12-19 12:58:01 +00:00
"summary_combined['MWU'] = list(map(lambda x: MWU(x, query_base_i, query_stim_combined), columns))\n",
"summary_combined['PRS'] = list(map(lambda x: PRS(x, query_base_i, query_stim_combined), columns))\n",
2019-12-18 14:03:01 +00:00
"\n",
"summary_i.to_latex(output_path / \"statistics\" / \"power_freq_score_summary_i.tex\")\n",
"summary_i.to_csv(output_path / \"statistics\" / \"power_freq_score_summary_i.csv\")\n",
"\n",
"summary_ii.to_latex(output_path / \"statistics\" / \"power_freq_score_summary_ii.tex\")\n",
"summary_ii.to_csv(output_path / \"statistics\" / \"power_freq_score_summary_ii.csv\")\n",
"\n",
"summary_combined.to_latex(output_path / \"statistics\" / \"power_freq_score_summary_combined.tex\")\n",
"summary_combined.to_csv(output_path / \"statistics\" / \"power_freq_score_summary_combined.csv\")"
]
},
{
"cell_type": "code",
2019-12-19 12:58:01 +00:00
"execution_count": 20,
2019-12-18 14:03:01 +00:00
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
2019-12-19 12:58:01 +00:00
" <th>Baseline I</th>\n",
2019-12-18 14:03:01 +00:00
" <th>11 Hz</th>\n",
" <th>MWU</th>\n",
" <th>PRS</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>power_score</th>\n",
" <td>-0.03 ± 0.01 (208)</td>\n",
" <td>-0.03 ± 0.01 (208)</td>\n",
" <td>32624.00, 0.000</td>\n",
" <td>0.18, 0.000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>freq_score</th>\n",
" <td>-0.01 ± 0.01 (208)</td>\n",
" <td>-0.01 ± 0.01 (208)</td>\n",
" <td>37221.00, 0.000</td>\n",
" <td>0.21, 0.000</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
2019-12-19 12:58:01 +00:00
" Baseline I 11 Hz MWU \\\n",
2019-12-18 14:03:01 +00:00
"power_score -0.03 ± 0.01 (208) -0.03 ± 0.01 (208) 32624.00, 0.000 \n",
"freq_score -0.01 ± 0.01 (208) -0.01 ± 0.01 (208) 37221.00, 0.000 \n",
"\n",
" PRS \n",
"power_score 0.18, 0.000 \n",
"freq_score 0.21, 0.000 "
]
},
2019-12-19 12:58:01 +00:00
"execution_count": 20,
2019-12-18 14:03:01 +00:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"summary_i"
]
},
{
"cell_type": "code",
2019-12-19 12:58:01 +00:00
"execution_count": 21,
2019-12-18 14:03:01 +00:00
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
2019-12-19 12:58:01 +00:00
" <th>Baseline II</th>\n",
" <th>30 Hz</th>\n",
2019-12-18 14:03:01 +00:00
" <th>MWU</th>\n",
" <th>PRS</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>power_score</th>\n",
" <td>0.04 ± 0.01 (136)</td>\n",
" <td>0.04 ± 0.01 (136)</td>\n",
" <td>12586.00, 0.000</td>\n",
" <td>0.08, 0.000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>freq_score</th>\n",
" <td>0.01 ± 0.01 (136)</td>\n",
" <td>0.01 ± 0.01 (136)</td>\n",
" <td>16950.00, 0.000</td>\n",
" <td>0.22, 0.000</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
2019-12-19 12:58:01 +00:00
" Baseline II 30 Hz MWU \\\n",
2019-12-18 14:03:01 +00:00
"power_score 0.04 ± 0.01 (136) 0.04 ± 0.01 (136) 12586.00, 0.000 \n",
"freq_score 0.01 ± 0.01 (136) 0.01 ± 0.01 (136) 16950.00, 0.000 \n",
"\n",
" PRS \n",
"power_score 0.08, 0.000 \n",
"freq_score 0.22, 0.000 "
]
},
2019-12-19 12:58:01 +00:00
"execution_count": 21,
2019-12-18 14:03:01 +00:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"summary_ii"
]
},
{
"cell_type": "code",
2019-12-19 12:58:01 +00:00
"execution_count": 22,
2019-12-18 14:03:01 +00:00
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
2019-12-19 12:58:01 +00:00
" <th>Baseline I</th>\n",
" <th>Combined</th>\n",
2019-12-18 14:03:01 +00:00
" <th>MWU</th>\n",
" <th>PRS</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>power_score</th>\n",
2019-12-19 12:58:01 +00:00
" <td>-0.03 ± 0.01 (208)</td>\n",
2019-12-18 14:03:01 +00:00
" <td>0.03 ± 0.01 (480)</td>\n",
2019-12-19 12:58:01 +00:00
" <td>67804.00, 0.000</td>\n",
" <td>0.13, 0.000</td>\n",
2019-12-18 14:03:01 +00:00
" </tr>\n",
" <tr>\n",
" <th>freq_score</th>\n",
2019-12-19 12:58:01 +00:00
" <td>-0.01 ± 0.01 (208)</td>\n",
2019-12-18 14:03:01 +00:00
" <td>0.06 ± 0.01 (480)</td>\n",
2019-12-19 12:58:01 +00:00
" <td>72140.00, 0.000</td>\n",
" <td>0.17, 0.000</td>\n",
2019-12-18 14:03:01 +00:00
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
2019-12-19 12:58:01 +00:00
" Baseline I Combined MWU \\\n",
"power_score -0.03 ± 0.01 (208) 0.03 ± 0.01 (480) 67804.00, 0.000 \n",
"freq_score -0.01 ± 0.01 (208) 0.06 ± 0.01 (480) 72140.00, 0.000 \n",
2019-12-18 14:03:01 +00:00
"\n",
" PRS \n",
2019-12-19 12:58:01 +00:00
"power_score 0.13, 0.000 \n",
"freq_score 0.17, 0.000 "
2019-12-18 14:03:01 +00:00
]
},
2019-12-19 12:58:01 +00:00
"execution_count": 22,
2019-12-18 14:03:01 +00:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"summary_combined"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Register in expipe"
]
},
{
"cell_type": "code",
2019-12-19 12:58:01 +00:00
"execution_count": 23,
2019-12-18 14:03:01 +00:00
"metadata": {},
2019-12-19 12:58:01 +00:00
"outputs": [],
2019-12-18 14:03:01 +00:00
"source": [
2019-12-19 12:58:01 +00:00
"action = project.actions[\"lfp_speed\"]"
2019-12-18 14:03:01 +00:00
]
},
{
"cell_type": "code",
2019-12-19 12:58:01 +00:00
"execution_count": 24,
2019-12-18 14:03:01 +00:00
"metadata": {},
"outputs": [],
"source": [
"outdata = {\n",
" \"figures\": \"figures\",\n",
" \"statistics\": \"statistics\"\n",
"}\n",
"\n",
"for key, value in outdata.items():\n",
" action.data[key] = value\n",
" data_path = action.data_path(key)\n",
" data_path.parent.mkdir(exist_ok=True, parents=True)\n",
" source = output_path / value\n",
" if source.is_file():\n",
" shutil.copy(source, data_path)\n",
" else:\n",
" copy_tree(str(source), str(data_path))"
]
},
{
"cell_type": "code",
2019-12-19 12:58:01 +00:00
"execution_count": 25,
2019-12-18 14:03:01 +00:00
"metadata": {},
"outputs": [],
"source": [
2019-12-19 12:58:01 +00:00
"septum_mec.analysis.registration.store_notebook(action, \"20_lfp_speed.ipynb\")"
2019-12-18 14:03:01 +00:00
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"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.6.8"
}
},
"nbformat": 4,
"nbformat_minor": 2
}