septum-mec/actions/stimulus-lfp-response-no-zs.../data/20_stimulus-lfp-response.ipynb

1152 lines
264 KiB
Plaintext
Raw Permalink Normal View History

{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"%load_ext autoreload\n",
"%autoreload 2"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"import expipe\n",
"import pathlib\n",
"import numpy as np\n",
"import spatial_maps.stats as stats\n",
"import septum_mec\n",
"import septum_mec.analysis.data_processing as dp\n",
"import septum_mec.analysis.registration\n",
"import head_direction.head as head\n",
"import spatial_maps as sp\n",
"import speed_cells.speed as spd\n",
"import re\n",
"import joblib\n",
"import multiprocessing\n",
"import shutil\n",
"import psutil\n",
"import pandas as pd\n",
"import matplotlib.pyplot as plt\n",
"import matplotlib\n",
"from distutils.dir_util import copy_tree\n",
"from neo import SpikeTrain\n",
"import scipy\n",
"import seaborn as sns\n",
"from tqdm.notebook import tqdm_notebook as tqdm\n",
"tqdm.pandas()\n",
"\n",
"from spike_statistics.core import permutation_resampling_test\n",
"\n",
"from spikewaveform.core import calculate_waveform_features_from_template, cluster_waveform_features\n",
"\n",
"from septum_mec.analysis.plotting import violinplot, despine"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"#############################\n",
"\n",
"perform_zscore = False\n",
"\n",
"if not perform_zscore:\n",
" zscore_str = \"-no-zscore\"\n",
"else:\n",
" zscore_str = \"\"\n",
"\n",
"#################################"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"%matplotlib inline\n",
"plt.rc('axes', titlesize=12)\n",
"plt.rcParams.update({\n",
" 'font.size': 12, \n",
" 'figure.figsize': (6, 4), \n",
" 'figure.dpi': 150\n",
"})\n",
"\n",
"output_path = pathlib.Path(\"output\") / (\"stimulus-lfp-response\" + zscore_str)\n",
"(output_path / \"statistics\").mkdir(exist_ok=True, parents=True)\n",
"(output_path / \"figures\").mkdir(exist_ok=True, parents=True)\n",
"output_path.mkdir(exist_ok=True)"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
"data_loader = dp.Data()\n",
"actions = data_loader.actions\n",
"project = data_loader.project"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
"identify_neurons = actions['identify-neurons']\n",
"sessions = pd.read_csv(identify_neurons.data_path('sessions'))"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
"lfp_action = actions['stimulus-lfp-response' + zscore_str]\n",
"lfp_results = pd.read_csv(lfp_action.data_path('results'))"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
"lfp_results = pd.merge(sessions, lfp_results, how='left')"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [],
"source": [
"lfp_results = lfp_results.query('stim_location!=\"mecl\" and stim_location!=\"mecr\"')"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
"def action_group(row):\n",
" a = int(row.channel_group in [0,1,2,3])\n",
" return f'{row.action}-{a}'\n",
"lfp_results['action_side_a'] = lfp_results.apply(action_group, axis=1)"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [],
"source": [
"lfp_results['stim_strength'] = lfp_results['stim_p_max'] / lfp_results['theta_energy']"
]
},
{
"cell_type": "code",
"execution_count": 15,
"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>action_side_a</th>\n",
" <th>channel_group</th>\n",
" <th>signal_to_noise</th>\n",
" <th>stim_strength</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>71</th>\n",
" <td>1833-010719-1-0</td>\n",
" <td>7</td>\n",
" <td>0.001902</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>67</th>\n",
" <td>1833-010719-1-1</td>\n",
" <td>3</td>\n",
" <td>0.003522</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>695</th>\n",
" <td>1833-010719-2-0</td>\n",
" <td>7</td>\n",
" <td>0.004280</td>\n",
" <td>2.260538</td>\n",
" </tr>\n",
" <tr>\n",
" <th>691</th>\n",
" <td>1833-010719-2-1</td>\n",
" <td>3</td>\n",
" <td>0.003974</td>\n",
" <td>6.446883</td>\n",
" </tr>\n",
" <tr>\n",
" <th>583</th>\n",
" <td>1833-020719-1-0</td>\n",
" <td>7</td>\n",
" <td>-0.002942</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" action_side_a channel_group signal_to_noise stim_strength\n",
"71 1833-010719-1-0 7 0.001902 NaN\n",
"67 1833-010719-1-1 3 0.003522 NaN\n",
"695 1833-010719-2-0 7 0.004280 2.260538\n",
"691 1833-010719-2-1 3 0.003974 6.446883\n",
"583 1833-020719-1-0 7 -0.002942 NaN"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# lfp_results_hemisphere = lfp_results.sort_values(\n",
"# by=['action_side_a', 'stim_strength', 'signal_to_noise'], ascending=[True, False, False]\n",
"lfp_results_hemisphere = lfp_results.sort_values(\n",
" by=['action_side_a', 'channel_group'], ascending=[True, False]\n",
").drop_duplicates(subset='action_side_a', keep='first')\n",
"lfp_results_hemisphere.loc[:,['action_side_a','channel_group', 'signal_to_noise', 'stim_strength']].head()"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [],
"source": [
"colors = ['#1b9e77','#d95f02','#7570b3','#e7298a']\n",
"labels = ['Baseline I', '11 Hz', 'Baseline II', '30 Hz']\n",
"# Hz11 means that the baseline session was indeed before an 11 Hz session\n",
"queries = ['baseline and i and Hz11', 'frequency==11', 'baseline and ii and Hz30', 'frequency==30']"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [],
"source": [
"# prepare pairwise comparison: same animal same side same date different sessions"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [],
"source": [
"def make_entity_date_side(row):\n",
" s = row.action_side_a.split('-')\n",
" del s[2]\n",
" return '-'.join(s)"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [],
"source": [
"lfp_results_hemisphere['entity_date_side'] = lfp_results_hemisphere.apply(make_entity_date_side, axis=1)"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAewAAAFICAYAAACSp82YAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAXEQAAFxEByibzPwAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nOzdd5xcZdn/8c+mbbIJJYUAJkCAwEVoQZEm4Zfog4hUMYKFFqqggCACkS6CiD6KD0VQFIKAICA1FEUEFBBEpIXARU1AehqSbNruzu+P+z7syeTM7Ozu7M7M7vf9eu3rzJxyn3tmkrnm7nW5XA4RERGpbn0qnQERERFpmwK2iIhIDVDAFhERqQEK2CIiIjVAAVtERKQGKGCLiIjUAAVsERGRGqCALSIiUgMUsEVERGqAAraIiEgNUMAWERGpAQrYIiIiNUABW0REpAYoYIuIiNQABWypWma2Zca+aWaWi39rVSJfeflZKY8iIl2hX6UzIJLPzFYDzgG+TZX+G40/Fv4X2BFYv8LZEZFeoCq/DKXX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vZ9BDxCaCd/lNBzH4qPLYcw69lHwCrAfe5e8N+cSFfr0vWwzeybhI4sR7j7bzpw/XBCSWVvQoeP+YT/dD+J8xd3Nn/Pjx07dtO77rqrs0mJ9ERlC9jVxMyGEYZmQVgL/Lgi544jrLcN8PVYghepiC4rYZvZNoRfsx29fk1CcN6Q8Mv/WULQ3ocw1eKR7n5lOfIqIrXPzPYnfD+8Apzv7h8WOPVzqcfPtJHsIXE7jzI
"text/plain": [
"<Figure size 525x300 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAewAAAFICAYAAACSp82YAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAXEQAAFxEByibzPwAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nO3dd5xcVfnH8U/qJpsAaSCYAIEEHjoiXVAiAiJVjKhAgNBBEClSFERAAQF/ohRFahCkGwQCKIgIUkWaQOChJnSBJJRk0zY7vz/OuezNZNruzu7M3f2+X6993bnlnDkzmcwz59xTeuVyOURERKS+9a51AURERKQ8BWwREZEMUMAWERHJAAVsERGRDFDAFhERyQAFbBERkQxQwBYREckABWwREZEMUMAWERHJAAVsERGRDFDAFhERyQAFbBERkQxQwBYREckABWwREZEMUMCWbsXM1itwbJKZ5eLf8rUoV155liijVJeZjU79m19c6/KIVEPfWhdApBrMbBngdOBw6vRzHX8s/ArYAlilxsURkYypyy82kXb4NbB/rQtRxp+ArYHptS6IiGSPmsSlu+hT6wJUIAtlFJE6pYAtIiKSAQrYIiIiGaB72JJpZnYq8LO8Y7n48H53H1cgzWjgOGB7YCTwCTAVmARc5e65/DSptP2AicDuwHrAMOAj4BngZuBKd1+Ql2YSsG/q0MqpMl7l7hPzrv8ccBDwNcDiczQDM4DHgeuBP5cqZ3uZ2UTgyri7ApADT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w119TvX5F6VrWAbWZjCb1CVyR0EDkZOIjWiffbYmL
"text/plain": [
"<Figure size 525x300 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAewAAAFICAYAAACSp82YAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAXEQAAFxEByibzPwAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nO3deZwcVbn/8c/MZF/IymbCmsBDCItcBeECEhERZRfivUiQsATZXFBAfoCIKJt4wStEEFCCoEZAlCW4ICJcQBAxrNEnYQsQwJCV7MnM9O+Pc9rpmenu6Znp7uqa+b5fr3lVd9WpqqeHME+fU2epy2QyiIiISG2rTzoAERER6ZgStoiISAooYYuIiKSAEraIiEgKKGGLiIikgBK2iIhICihhi4iIpIAStoiISAooYYuIiKSAEraIiEgKKGGLiIikgBK2iIhICihhi4iIpIAStoiISAr0SToAkWoxs13c/fk2+2YAx8e3m7v7u1UPLEe+GGuNmW0HXAxMAkYDS4E57r5/gmGJ9HhK2NLjmdkw4BLgDGr037yZbQZ8D9gb2CbhcAoyszHAk8DInN2bAv9IJiKR3qMm/3iJlNnVwIlJB9GBnwH7A/OTDqQDX6QlWd8FXA+sBVYnFpFIL6GELb1BQ9IBlCANMQJMjNsNwPHurkQtUiXqdCYinTE4bhcqWYtUlxK2iHRG9m9GY6JRiPRCdZlMJukYRCrCzC4Gvlng8CPuPqltL3FgAHAOcBAwBngfmAPMAG5194L/w5hZX2AqMBnYhfCsdxnwHOF57y3uvr7NObn3b+tWd5/apvymwDTg44DFezQCi4GngZnAr4rF2VlmtjXwWpEi891961g2e9+zgFnAdcA+hCb0l4Hz3P2POdfu9O8sT3wfJ3Qo/BCwCbAAuAe4nPC7WRqLnuDuMzr+xCK1STVskRZHEXo7nw5sC/QHNgb2A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2BZ4nfOs/EngsdigRERHpFSqSsM1sEmHoxtBuXOaXhHmSHwTGuvuHCZ1RziNMmHCDmU3oZqgiIiKpUNZe4mY2gJBQL6Rl6buuXGcSoUPKSuBz7r4U/r3wwZVmthNhMokL4lZE8njvvfdYtKij6bbzO+KII/496UgHa1+LSBWULWGb2XjgT4TVgpoISXsasFUXLjc1bu9x93x/bW4gJOojzGygu6/pwj1EeryZM2dy3XXXdfX03GFvqX+eLZJ25WwSH0tI1k8CH3H3S7txrb3i9rECx/8KNBLGW364G/cRERFJhXI2ib8FHOzuD3RYsggzq6dlCsJX8pVx9w1mtoBQe9+e9rNGSS/RnGlm6brVHRfMkWnOsGZ1qQtEdV2mqYnMuwsrfp9iDvvo/hz20f27dO5Wu05Mfa3a3e9CrQPSQ5QtYbv7y8DLZbjUCFriKrYE4WJCwu7q2rrSAyxdt5pdf/GdTp3Tv7EPR83Zs0IRtRi4vpHTHp5X8ftUzJxaWKVTRLJqcWrSQTmv1xYpl31uPahIGSCMty5waFypQYmIiCSpFhN2U8dFWqn4jEwiIpVgZlsDrxU4nCFMFvUG8FvgGncv1upYk8xsKmHO9wXuPjZn/58Jo4EudfcL85+dLDObARwPPOLuk5KNpjYT9sqc1wMKloKBcdvhA0x3z9u2F2veO5YemohIxbwILM9534fwiHAnwrre08xsf3d/IYngJHm1mrDXEZYHHFWkXPbZdbK9eqTmPHzkVxk5oPCTktUr13PtnCda7TvprN0ZNKhvgTO6pnnBO9DmGfbaaz5M3WablPU+0mN80d3/3HZnnKL5VsJSoXeZ2YQ4J0XafZ7wSLNrEwX0QjWXsN292cwc2AXYOl8ZM+tLmPUMYG6VQpOUGDlgEKMGFF72un/junb7xowczpAh5V1Cev2qVSxps+8DO4yn31ZblPU+0rO
"text/plain": [
"<Figure size 525x300 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAewAAAFICAYAAACSp82YAAAABHNCS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0GXKuPknNcPF00VJjAZEl834hfdst6HmX2YnDWbi80uVy+xVSPbk/qjwL/G13flJf1T3E6lY+jfo+7+SgW3y/0C+NkS6aYTauDFVPP/gMi7FLClt9ZlXyTd1BrHRP857u5nZgVn5jKz0+iYY/pRwsxohcpYqHy5zaAHFTiPmX2Q0MSc1WjDoaC897EdcHXe4UZ8L9nhXbsTZgKD4gF7BHBsfF1J7To78cmv4+7hZjYrP00c0/+DbrIq9fkSSUxDfbuWVHoj5/V5ZvYzoM3d5yeU//GEzlKjgDlmtjdhLuyFhLmxjwQ+GdOuBz5XoPNQtozjzOy/CGO6V8cZvK4nTD3ZBJwYJ1L5NSEATiRM6XkEnafFHFVGJ6Vau5WOmcKmm9lvCHO0LyI0Lx8AHE3XoLIRHeOaG8UdhH/L7Dzb0BGgs+YDywgjArItHxUF7OiLhOffY4GfmNk+hDHZKwiPYb4ay7CKzp0Sc5X6fIkkpl/XsM3sZjPryX9y6XAzYS5vCH/8HgISW3HI3Z8lzCP9Ujy0P2FWqAcITZqHE4LtMuCwIrOh5TZ9nhfL+KOY/6OEOaOJ+RxLCH4PEAL30YRgfTtwRUw3iM5N0HUXp4r9Ah3/FocR/h0eAG4iLLoyAniQ0LEuqxa93ivi7iuBe3IOvRBrw7lp2vPSvObupR5pFLvXG4TWmYWEf/+jCcPC/kqY5nZTwqIzd5fIpujnSyRJ/TpgA9tOnjz5EMJwC/304Mfd519++eUtu+22G8OGDWPIkCFsscUWW6x
"text/plain": [
"<Figure size 525x300 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"\n",
"density = True\n",
"cumulative = True\n",
"histtype = 'step'\n",
"lw = 2\n",
"if perform_zscore:\n",
" bins = {\n",
" 'theta_energy': np.arange(0, .7, .03),\n",
" 'theta_peak': np.arange(0, .7, .03),\n",
" 'theta_freq': np.arange(4, 10, .5),\n",
" 'theta_half_width': np.arange(0, 15, .5)\n",
" }\n",
"else:\n",
" bins = {\n",
" 'theta_energy': np.arange(0, .008, .0003),\n",
" 'theta_peak': np.arange(0, .007, .0003),\n",
" 'theta_freq': np.arange(4, 12, .5),\n",
" 'theta_half_width': np.arange(0, 15, .5)\n",
" }\n",
"xlabel = {\n",
" 'theta_energy': 'Theta energy (dB)',\n",
" 'theta_peak': 'Peak PSD (dB/Hz)',\n",
" 'theta_freq': '(Hz)',\n",
" 'theta_half_width': '(Hz)',\n",
"}\n",
"# key = 'theta_energy'\n",
"# key = 'theta_peak'\n",
"results = {}\n",
"for key in bins:\n",
" results[key] = list()\n",
" fig = plt.figure(figsize=(3.5,2))\n",
" plt.suptitle(key)\n",
" legend_lines = []\n",
" for color, query, label in zip(colors, queries, labels):\n",
" values = lfp_results_hemisphere.query(query).loc[:,['entity_date_side', key]]\n",
" results[key].append(values.rename({key: label}, axis=1))\n",
" values[key].hist(\n",
" bins=bins[key], density=density, cumulative=cumulative, lw=lw, \n",
" histtype=histtype, color=color)\n",
" legend_lines.append(matplotlib.lines.Line2D([0], [0], color=color, lw=lw, label=label))\n",
" \n",
" plt.legend(\n",
" handles=legend_lines,\n",
" bbox_to_anchor=(1.04,1), borderaxespad=0, frameon=False)\n",
" plt.tight_layout()\n",
" plt.grid(False)\n",
" plt.xlim(right=bins[key].max() - bins[key].max()*0.025)\n",
" despine()\n",
" plt.xlabel(xlabel[key])\n",
" figname = f'lfp-psd-histogram-{key}'\n",
" fig.savefig(\n",
" output_path / 'figures' / f'{figname}.png', \n",
" bbox_inches='tight', transparent=True)\n",
" fig.savefig(\n",
" output_path / 'figures' / f'{figname}.svg', \n",
" bbox_inches='tight', transparent=True)"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAcEAAAFICAYAAAAoBEX4AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAXEQAAFxEByibzPwAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLj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MfKkjFn+7+zzgM8A/41M7EboUHyd8BkcTPrslwGR3v70d15pOWNu3hPB6TyMExUcIfwCtQ9hDNhkvrRTQChfdT2lr3UQg40EQGD1mzJh9CX996ielH3e/furUqX2POuootthiCwYOHEivXr0YMmQI48aN4zvf+Q5PPPHE0LjlV36+Gb/+9a97jhs3jv79+9O3b1823njjjZcsWZIDcgceeGByGyWmT5/+Vn7eESNGjATYZJNNrFS9JkyYkOzYQqk055133sdfsr/73e8e6KD35/ypU6f2mjx5MmbGoEGD6NWrF8OGDWO33Xbj5z//Oc8///yuMVitkveEE044M6nfzTff/Fipa1RK5+6vzpo1a5vzzz+fz372swwfPpzevXvTr18/xo4dy+TJk5k6dWo/d59S4hpVc/ebCa3cywg72Swl7BAzFdjP3Y8nzPqE8msfcfdnad3+7gV3f7KWuogU6tD7CcaukCuAY9z9N23IvzZhcH5/wm143iP8BXm+uz9eLm+V5T83ZsyYLe66667KiUWkUJo76rxP2N7tT+6+X5l0gwljlGsAZ7j7T9Oqg2RTh7UEzWwHVh3vqTX/uoQ1Zt8h7DzxDOEv0AMJC2WPSqOeItIxzGwPM/ujmf2PmW1cJt32tO5v+s9S6aLDCAFwJWGLPpF26ZAgaGYTCNPBB1VIWs7NhF3
"text/plain": [
"<Figure size 480x300 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAcEAAAFICAYAAAAoBEX4AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAXEQAAFxEByibzPwAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nO3deZhcVZ3/8XfSCSQhgewQEwmQwBeCLJlhMSwSFBBFFgUcFZCEAcFlEEcWFZ4BZEJA5ucgAoOCEgRBQHkEWRQIAQk7GJDNb9gSNhGSECSQkKS7fn+cc+lKpfa+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43EVYCgfDN/xHg991T857P3VcQ1kFNugx3B64l/G1vJXyYjyQMKDklL2v+Rrk9Sf6KL8tZc1pNIj8wfkDn+q5ViztpfILOdVn3B26Mz3cpIQDeSlipphS9N6UmmQ6CwISJEyfuT+jKydyPu//6zjvvHHDUUUcxadIkBg8eTL9+/Rg2bBiTJ0/mhBNO4KGHHhru7n8syDfv5z//edvkyZMZNGgQAwYMYOONN954+fLlOSD3+c9/PtlGiblz5/49P+/YsWPHA2y66aZWql5Tp07dL+81Kppm5syZyXY8/OpXv5pTKl09P7E8AL773e/OrCedu9952223DTz00EMZN24c/fv3p3///owePZpdd92Vs846iyeeeGKLxx577NyBA8Psk1122eXn1f6tGvn7F/5cfPHFxyTPNWXKlIFxMewca8oPgnPKLIRQlru/ThhUdDRh8M1iQstvHmEx8/3pDHLF8j8OHEBY+3MZIWiviiNbRdbSJ5crfC+nx8yOJfTzH1N
"text/plain": [
"<Figure size 480x300 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAcEAAAFICAYAAAAoBEX4AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAXEQAAFxEByibzPwAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nO3deZxcRb3//9fMJJPJRgghECCEkAAf9oAQkMVrQEAUFRBQkR3ZVMQFWRR+bF5F4H4VFRRBduGKXFZFRRZlkVUWZf2whh3JRkJIQpKZ+f1R1UzPTO99uk/P9Pv5eMzjzOlTp/oznU5/uupU1Wnp7u5GRESkGbWmHYCIiEhalARFRKRpKQmKiEjTUhIUEZGmpSQoIiJNS0lQRESalpKgiIg0LSVBERFpWkqCIiLStJQERUSkaSkJiohI01ISFBGRpqUkKCIiTUtJUEREmpaSoDQkM9s0z+OXmVl3/JlQ77hEZHAZknYAItnMb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qA0/1mC13PNM6splV+/n2NDpUBL7HuUHd/AXghgarG0hPXrALl5hCS4MoJPOeg8d5D17Lwn9elHYbUwNBZWzL85b3TDkNkUGnEZdOyV4RfUqBc5jpg0RXkzeypPIeqG6kgIiIDWuP0rfToLF6kl9rN9hcRaUBmdqSZdZvZYWWe9/V43sEVPOeQeG63mRUdlW9mh8WyDX2T60ZsCS7M+r0jb6meG3EuKlAGAHffKNfjsYW4YemhDTztq61P++qaTjkoPDM+LCMddQ9bDqsvSC8eSUWlC5GY2dbAWclHNLA1ahL8gHBblXEFymWuBQ6
"text/plain": [
"<Figure size 480x300 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAcEAAAFICAYAAAAoBEX4AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAXEQAAFxEByibzPwAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nO3de7zc073/8dfeCc2VJCKiEgkJH7SqWqU5+MkpRznUpWjrnjiupc5pD0ppxWlRl3MORcvRuraKlLrTulQ0CKVR908QCU3rkgsVhGTv+f2x1siYPff5zp6Z/X0/H4/9+M7Md33Xd81lz2fW+q5LRyaTQUREJI06m10AERGRZlEQFBGR1FIQFBGR1FIQFBGR1FIQFBGR1FIQFBGR1FIQFBGR1FIQFBGR1FIQFBGR1FIQFBGR1FIQFBGR1FIQFBGR1FIQFBGR1FIQFBGR1FIQlF5nZp8p8vgVZpaJf6N7u1ytotjrk1ZmtqqZbVTg8fE5n5eLm1E2aX8KgtJrzGx1Mzsf+HOzy9KKzGyimd0J/KTZZWkVZrYD8CTwjWaXRfqm/s0ugKTK/wCHNLsQLex3wPrAjGYXpBWY2Vjg7maXQ/o2BUHpTf1K7XT3KcCUXilJayr5+qSQXg9pODWHiohIaikIiohIanVkMplml0H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CN77rnnJv3795+Xf/zzzz/P5ZdfzvTp01mwYAGrrroqkyZNOoiwWkNFr0FuWbq6urjtttu46667ePrpp1myZAn9+/dn7NixbL311uy///4Dx44dewVwRbF8ttlmmy+XOFfJMXdxrObXzexa4N8Ic7YOI0xsfidhjtPcQfqFxiQeEtPvTqj
"text/plain": [
"<Figure size 480x300 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"\n",
"density = True\n",
"cumulative = True\n",
"histtype = 'step'\n",
"lw = 2\n",
"if perform_zscore:\n",
" bins = {\n",
" 'stim_energy': np.arange(0, .7, .01),\n",
" 'stim_half_width': np.arange(0, 10, .5),\n",
" 'stim_p_max': np.arange(0, 4, .01),\n",
" 'stim_strength': np.arange(0, 160, 1)\n",
" }\n",
"else:\n",
" bins = {\n",
" 'stim_energy': np.arange(0, .008, .0001),\n",
" 'stim_half_width': np.arange(0, 0.5, .001),\n",
" 'stim_p_max': np.arange(0, .06, .0001),\n",
" 'stim_strength': np.arange(0, 160, 1)\n",
" }\n",
"xlabel = {\n",
" 'stim_energy': 'Energy (dB)',\n",
" 'stim_half_width': '(Hz)',\n",
" 'stim_p_max': 'Peak PSD (dB/Hz)',\n",
" 'stim_strength': 'Ratio',\n",
"}\n",
"# key = 'theta_energy'\n",
"# key = 'theta_peak'\n",
"for key in bins:\n",
" results[key] = list()\n",
" fig = plt.figure(figsize=(3.2,2))\n",
" plt.suptitle(key)\n",
" legend_lines = []\n",
" for color, query, label in zip(colors[1::2], queries[1::2], labels[1::2]):\n",
" values = lfp_results_hemisphere.query(query).loc[:,['entity_date_side', key]]\n",
" results[key].append(values.rename({key: label}, axis=1))\n",
" values[key].hist(\n",
" bins=bins[key], density=density, cumulative=cumulative, lw=lw, \n",
" histtype=histtype, color=color)\n",
" legend_lines.append(matplotlib.lines.Line2D([0], [0], color=color, lw=lw, label=label))\n",
" \n",
" plt.legend(\n",
" handles=legend_lines,\n",
" bbox_to_anchor=(1.04,1), borderaxespad=0, frameon=False)\n",
" plt.tight_layout()\n",
" plt.grid(False)\n",
" plt.xlim(right=bins[key].max() - bins[key].max()*0.025)\n",
" despine()\n",
" plt.xlabel(xlabel[key])\n",
" figname = f'lfp-psd-histogram-{key}'\n",
" fig.savefig(\n",
" output_path / 'figures' / f'{figname}.png', \n",
" bbox_inches='tight', transparent=True)\n",
" fig.savefig(\n",
" output_path / 'figures' / f'{figname}.svg', \n",
" bbox_inches='tight', transparent=True)"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"outputs": [],
"source": [
"from functools import reduce"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [],
"source": [
"for key, val in results.items():\n",
" df = reduce(lambda left,right: pd.merge(left, right, on='entity_date_side', how='outer'), val)\n",
" results[key] = df.drop('entity_date_side',axis=1)"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [],
"source": [
"def summarize(data):\n",
" return \"{:.1e} ± {:.1e} ({})\".format(data.mean(), data.sem(), sum(~np.isnan(data)))\n",
"\n",
"\n",
"def MWU(df, keys):\n",
" '''\n",
" Mann Whitney U\n",
" '''\n",
" Uvalue, pvalue = scipy.stats.mannwhitneyu(\n",
" df[keys[0]].dropna(), \n",
" df[keys[1]].dropna(),\n",
" alternative='two-sided')\n",
"\n",
" return \"{:.2f}, {:.3f}\".format(Uvalue, pvalue)\n",
"\n",
"\n",
"def PRS(df, keys):\n",
" '''\n",
" Permutation ReSampling\n",
" '''\n",
" pvalue, observed_diff, diffs = permutation_resampling(\n",
" df[keys[0]].dropna(), \n",
" df[keys[1]].dropna(), statistic=np.median)\n",
"\n",
" return \"{:.2f}, {:.3f}\".format(observed_diff, pvalue)\n",
"\n",
"\n",
"def wilcoxon(df, keys):\n",
" dff = df.loc[:,[keys[0], keys[1]]].dropna()\n",
" statistic, pvalue = scipy.stats.wilcoxon(\n",
" dff[keys[0]], \n",
" dff[keys[1]],\n",
" alternative='two-sided')\n",
"\n",
" return \"{:.2f}, {:.3f}, ({})\".format(statistic, pvalue, len(dff))\n",
"\n",
"\n",
"def paired_t(df, keys):\n",
" dff = df.loc[:,[keys[0], keys[1]]].dropna()\n",
" statistic, pvalue = scipy.stats.ttest_rel(\n",
" dff[keys[0]], \n",
" dff[keys[1]])\n",
"\n",
" return \"{:.2f}, {:.3f}\".format(statistic, pvalue)\n",
"\n",
" \n",
"def normality(df, key):\n",
" statistic, pvalue = scipy.stats.normaltest(\n",
" df[key].dropna())\n",
"\n",
" return \"{:.2f}, {:.3f}\".format(statistic, pvalue)\n",
"\n",
"\n",
"def shapiro(df, key):\n",
" statistic, pvalue = scipy.stats.shapiro(\n",
" df[key].dropna())\n",
"\n",
" return \"{:.2f}, {:.3f}\".format(statistic, pvalue)\n",
"\n",
"def rename(name):\n",
" return name.replace(\"_field\", \"-field\").replace(\"_\", \" \").capitalize()"
]
},
{
"cell_type": "code",
"execution_count": 25,
"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>Theta energy</th>\n",
" <th>Theta peak</th>\n",
" <th>Theta freq</th>\n",
" <th>Theta half width</th>\n",
" <th>Stim energy</th>\n",
" <th>Stim half width</th>\n",
" <th>Stim p max</th>\n",
" <th>Stim strength</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>11 Hz</th>\n",
" <td>9.1e-04 ± 9.0e-05 (44)</td>\n",
" <td>3.9e-04 ± 5.1e-05 (44)</td>\n",
" <td>7.5e+00 ± 1.5e-01 (44)</td>\n",
" <td>5.5e+00 ± 5.6e-01 (42)</td>\n",
" <td>4.3e-04 ± 4.7e-05 (44)</td>\n",
" <td>1.8e-01 ± 1.3e-02 (44)</td>\n",
" <td>3.9e-03 ± 4.5e-04 (44)</td>\n",
" <td>5.8e+00 ± 7.3e-01 (44)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>30 Hz</th>\n",
" <td>5.7e-04 ± 7.0e-05 (34)</td>\n",
" <td>2.5e-04 ± 4.3e-05 (34)</td>\n",
" <td>7.7e+00 ± 2.1e-01 (34)</td>\n",
" <td>6.7e+00 ± 8.4e-01 (29)</td>\n",
" <td>1.0e-03 ± 2.1e-04 (34)</td>\n",
" <td>1.5e-01 ± 1.6e-03 (34)</td>\n",
" <td>1.0e-02 ± 2.0e-03 (34)</td>\n",
" <td>2.2e+01 ± 4.5e+00 (34)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Baseline I</th>\n",
" <td>2.3e-03 ± 2.2e-04 (46)</td>\n",
" <td>1.8e-03 ± 1.9e-04 (46)</td>\n",
" <td>7.7e+00 ± 6.3e-02 (46)</td>\n",
" <td>1.2e+00 ± 2.0e-01 (45)</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Baseline II</th>\n",
" <td>2.3e-03 ± 2.4e-04 (32)</td>\n",
" <td>1.8e-03 ± 2.3e-04 (32)</td>\n",
" <td>8.1e+00 ± 4.7e-02 (32)</td>\n",
" <td>9.1e-01 ± 3.9e-02 (31)</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Normality 11 Hz</th>\n",
" <td>27.15, 0.000</td>\n",
" <td>57.06, 0.000</td>\n",
" <td>1.61, 0.447</td>\n",
" <td>11.89, 0.003</td>\n",
" <td>16.86, 0.000</td>\n",
" <td>82.50, 0.000</td>\n",
" <td>14.96, 0.001</td>\n",
" <td>15.95, 0.000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Normality 30 Hz</th>\n",
" <td>30.23, 0.000</td>\n",
" <td>43.50, 0.000</td>\n",
" <td>4.85, 0.088</td>\n",
" <td>5.64, 0.060</td>\n",
" <td>19.73, 0.000</td>\n",
" <td>9.69, 0.008</td>\n",
" <td>19.72, 0.000</td>\n",
" <td>25.38, 0.000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Normality Baseline I</th>\n",
" <td>41.33, 0.000</td>\n",
" <td>32.43, 0.000</td>\n",
" <td>25.20, 0.000</td>\n",
" <td>74.91, 0.000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Normality Baseline II</th>\n",
" <td>13.17, 0.001</td>\n",
" <td>20.78, 0.000</td>\n",
" <td>0.96, 0.618</td>\n",
" <td>13.33, 0.001</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Wilcoxon 11 Hz 30 Hz</th>\n",
" <td>118.00, 0.006, (32)</td>\n",
" <td>134.00, 0.015, (32)</td>\n",
" <td>164.00, 0.247, (32)</td>\n",
" <td>143.00, 0.269, (27)</td>\n",
" <td>173.00, 0.089, (32)</td>\n",
" <td>25.00, 0.000, (32)</td>\n",
" <td>157.00, 0.045, (32)</td>\n",
" <td>105.00, 0.003, (32)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Wilcoxon 11 Hz Baseline II</th>\n",
" <td>11.00, 0.000, (32)</td>\n",
" <td>5.00, 0.000, (32)</td>\n",
" <td>60.00, 0.000, (32)</td>\n",
" <td>3.00, 0.000, (30)</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Wilcoxon Baseline I 11 Hz</th>\n",
" <td>42.00, 0.000, (44)</td>\n",
" <td>16.00, 0.000, (44)</td>\n",
" <td>329.50, 0.190, (44)</td>\n",
" <td>14.00, 0.000, (41)</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Wilcoxon Baseline I 30 Hz</th>\n",
" <td>12.00, 0.000, (32)</td>\n",
" <td>5.00, 0.000, (32)</td>\n",
" <td>221.50, 0.427, (32)</td>\n",
" <td>8.00, 0.000, (27)</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Wilcoxon Baseline I Baseline II</th>\n",
" <td>264.00, 1.000, (32)</td>\n",
" <td>256.00, 0.881, (32)</td>\n",
" <td>0.00, 0.000, (32)</td>\n",
" <td>203.00, 0.544, (30)</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Wilcoxon Baseline II 30 Hz</th>\n",
" <td>17.00, 0.000, (32)</td>\n",
" <td>9.00, 0.000, (32)</td>\n",
" <td>129.50, 0.020, (32)</td>\n",
" <td>11.00, 0.000, (27)</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Theta energy \\\n",
"11 Hz 9.1e-04 ± 9.0e-05 (44) \n",
"30 Hz 5.7e-04 ± 7.0e-05 (34) \n",
"Baseline I 2.3e-03 ± 2.2e-04 (46) \n",
"Baseline II 2.3e-03 ± 2.4e-04 (32) \n",
"Normality 11 Hz 27.15, 0.000 \n",
"Normality 30 Hz 30.23, 0.000 \n",
"Normality Baseline I 41.33, 0.000 \n",
"Normality Baseline II 13.17, 0.001 \n",
"Wilcoxon 11 Hz 30 Hz 118.00, 0.006, (32) \n",
"Wilcoxon 11 Hz Baseline II 11.00, 0.000, (32) \n",
"Wilcoxon Baseline I 11 Hz 42.00, 0.000, (44) \n",
"Wilcoxon Baseline I 30 Hz 12.00, 0.000, (32) \n",
"Wilcoxon Baseline I Baseline II 264.00, 1.000, (32) \n",
"Wilcoxon Baseline II 30 Hz 17.00, 0.000, (32) \n",
"\n",
" Theta peak \\\n",
"11 Hz 3.9e-04 ± 5.1e-05 (44) \n",
"30 Hz 2.5e-04 ± 4.3e-05 (34) \n",
"Baseline I 1.8e-03 ± 1.9e-04 (46) \n",
"Baseline II 1.8e-03 ± 2.3e-04 (32) \n",
"Normality 11 Hz 57.06, 0.000 \n",
"Normality 30 Hz 43.50, 0.000 \n",
"Normality Baseline I 32.43, 0.000 \n",
"Normality Baseline II 20.78, 0.000 \n",
"Wilcoxon 11 Hz 30 Hz 134.00, 0.015, (32) \n",
"Wilcoxon 11 Hz Baseline II 5.00, 0.000, (32) \n",
"Wilcoxon Baseline I 11 Hz 16.00, 0.000, (44) \n",
"Wilcoxon Baseline I 30 Hz 5.00, 0.000, (32) \n",
"Wilcoxon Baseline I Baseline II 256.00, 0.881, (32) \n",
"Wilcoxon Baseline II 30 Hz 9.00, 0.000, (32) \n",
"\n",
" Theta freq \\\n",
"11 Hz 7.5e+00 ± 1.5e-01 (44) \n",
"30 Hz 7.7e+00 ± 2.1e-01 (34) \n",
"Baseline I 7.7e+00 ± 6.3e-02 (46) \n",
"Baseline II 8.1e+00 ± 4.7e-02 (32) \n",
"Normality 11 Hz 1.61, 0.447 \n",
"Normality 30 Hz 4.85, 0.088 \n",
"Normality Baseline I 25.20, 0.000 \n",
"Normality Baseline II 0.96, 0.618 \n",
"Wilcoxon 11 Hz 30 Hz 164.00, 0.247, (32) \n",
"Wilcoxon 11 Hz Baseline II 60.00, 0.000, (32) \n",
"Wilcoxon Baseline I 11 Hz 329.50, 0.190, (44) \n",
"Wilcoxon Baseline I 30 Hz 221.50, 0.427, (32) \n",
"Wilcoxon Baseline I Baseline II 0.00, 0.000, (32) \n",
"Wilcoxon Baseline II 30 Hz 129.50, 0.020, (32) \n",
"\n",
" Theta half width \\\n",
"11 Hz 5.5e+00 ± 5.6e-01 (42) \n",
"30 Hz 6.7e+00 ± 8.4e-01 (29) \n",
"Baseline I 1.2e+00 ± 2.0e-01 (45) \n",
"Baseline II 9.1e-01 ± 3.9e-02 (31) \n",
"Normality 11 Hz 11.89, 0.003 \n",
"Normality 30 Hz 5.64, 0.060 \n",
"Normality Baseline I 74.91, 0.000 \n",
"Normality Baseline II 13.33, 0.001 \n",
"Wilcoxon 11 Hz 30 Hz 143.00, 0.269, (27) \n",
"Wilcoxon 11 Hz Baseline II 3.00, 0.000, (30) \n",
"Wilcoxon Baseline I 11 Hz 14.00, 0.000, (41) \n",
"Wilcoxon Baseline I 30 Hz 8.00, 0.000, (27) \n",
"Wilcoxon Baseline I Baseline II 203.00, 0.544, (30) \n",
"Wilcoxon Baseline II 30 Hz 11.00, 0.000, (27) \n",
"\n",
" Stim energy \\\n",
"11 Hz 4.3e-04 ± 4.7e-05 (44) \n",
"30 Hz 1.0e-03 ± 2.1e-04 (34) \n",
"Baseline I NaN \n",
"Baseline II NaN \n",
"Normality 11 Hz 16.86, 0.000 \n",
"Normality 30 Hz 19.73, 0.000 \n",
"Normality Baseline I NaN \n",
"Normality Baseline II NaN \n",
"Wilcoxon 11 Hz 30 Hz 173.00, 0.089, (32) \n",
"Wilcoxon 11 Hz Baseline II NaN \n",
"Wilcoxon Baseline I 11 Hz NaN \n",
"Wilcoxon Baseline I 30 Hz NaN \n",
"Wilcoxon Baseline I Baseline II NaN \n",
"Wilcoxon Baseline II 30 Hz NaN \n",
"\n",
" Stim half width \\\n",
"11 Hz 1.8e-01 ± 1.3e-02 (44) \n",
"30 Hz 1.5e-01 ± 1.6e-03 (34) \n",
"Baseline I NaN \n",
"Baseline II NaN \n",
"Normality 11 Hz 82.50, 0.000 \n",
"Normality 30 Hz 9.69, 0.008 \n",
"Normality Baseline I NaN \n",
"Normality Baseline II NaN \n",
"Wilcoxon 11 Hz 30 Hz 25.00, 0.000, (32) \n",
"Wilcoxon 11 Hz Baseline II NaN \n",
"Wilcoxon Baseline I 11 Hz NaN \n",
"Wilcoxon Baseline I 30 Hz NaN \n",
"Wilcoxon Baseline I Baseline II NaN \n",
"Wilcoxon Baseline II 30 Hz NaN \n",
"\n",
" Stim p max \\\n",
"11 Hz 3.9e-03 ± 4.5e-04 (44) \n",
"30 Hz 1.0e-02 ± 2.0e-03 (34) \n",
"Baseline I NaN \n",
"Baseline II NaN \n",
"Normality 11 Hz 14.96, 0.001 \n",
"Normality 30 Hz 19.72, 0.000 \n",
"Normality Baseline I NaN \n",
"Normality Baseline II NaN \n",
"Wilcoxon 11 Hz 30 Hz 157.00, 0.045, (32) \n",
"Wilcoxon 11 Hz Baseline II NaN \n",
"Wilcoxon Baseline I 11 Hz NaN \n",
"Wilcoxon Baseline I 30 Hz NaN \n",
"Wilcoxon Baseline I Baseline II NaN \n",
"Wilcoxon Baseline II 30 Hz NaN \n",
"\n",
" Stim strength \n",
"11 Hz 5.8e+00 ± 7.3e-01 (44) \n",
"30 Hz 2.2e+01 ± 4.5e+00 (34) \n",
"Baseline I NaN \n",
"Baseline II NaN \n",
"Normality 11 Hz 15.95, 0.000 \n",
"Normality 30 Hz 25.38, 0.000 \n",
"Normality Baseline I NaN \n",
"Normality Baseline II NaN \n",
"Wilcoxon 11 Hz 30 Hz 105.00, 0.003, (32) \n",
"Wilcoxon 11 Hz Baseline II NaN \n",
"Wilcoxon Baseline I 11 Hz NaN \n",
"Wilcoxon Baseline I 30 Hz NaN \n",
"Wilcoxon Baseline I Baseline II NaN \n",
"Wilcoxon Baseline II 30 Hz NaN "
]
},
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"\n",
"\n",
"stat = pd.DataFrame()\n",
"\n",
"for key, df in results.items():\n",
" Key = rename(key)\n",
" stat[Key] = df.agg(summarize)\n",
" stat[Key] = df.agg(summarize)\n",
"\n",
" for i, c1 in enumerate(df.columns):\n",
" stat.loc[f'Normality {c1}', Key] = normality(df, c1)\n",
"# stat.loc[f'Shapiro {c1}', Key] = shapiro(df, c1)\n",
" for c2 in df.columns[i+1:]:\n",
"# stat.loc[f'MWU {c1} {c2}', Key] = MWU(df, [c1, c2])\n",
"# stat.loc[f'PRS {c1} {c2}', Key] = PRS(df, [c1, c2])\n",
" stat.loc[f'Wilcoxon {c1} {c2}', Key] = wilcoxon(df, [c1, c2])\n",
"# stat.loc[f'Paired T {c1} {c2}', Key] = paired_t(df, [c1, c2])\n",
"\n",
"stat.sort_index()"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [],
"source": [
"stat.to_latex(output_path / \"statistics\" / \"statistics.tex\")\n",
"stat.to_csv(output_path / \"statistics\" / \"statistics.csv\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Plot PSD"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [],
"source": [
"psd = pd.read_feather(output_path / 'data' / 'psd.feather')\n",
"freqs = pd.read_feather(output_path / 'data' / 'freqs.feather')"
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {},
"outputs": [],
"source": [
"from septum_mec.analysis.plotting import plot_bootstrap_timeseries"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {},
"outputs": [],
"source": [
"freq = freqs.T.iloc[0].values\n",
"\n",
"mask = (freq < 49)"
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArsAAAFKCAYAAAAdRZejAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAXEQAAFxEByibzPwAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nOzdeZgcZbX48W/v3bPPZN9IQkJeCJEd2ZEYEYk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TJzJo1i6qqqqEeihBikA36eW2QJqrJeW1wSLArhANVVlZy0EEHAbBx48YhHo0QQvTf4J7XpCuDk0gZgxAOZRgGAMXFxV0+9uKLL/LXv/6Vjz76iJaWFrxeL+PHj+e4447jkksuYebMmZ32W7ZsGY8//jgffvgh4XCYkpIS5syZw+c+9znOP/98/H5/p32i0SgPP/wwf//736mpqcGyLKZNm8bpp5/OxRdfTFlZWa9ez4UXXsjKlSu58soruf766wF7YsuCBQsYO3Ysy5cv5+mnn+bJJ59k06ZNgF3/95WvfIVzzz0Xl6vzJclCjU0IMTgG8rz2gfkPIqQo2RJkziWvcebChXJecwgJdsWwYlkWCSM91MMoiJDX1+WJaDBs27aNjRs34na7OeWUU/IeSyaTXHHFFaxYsQKAKVOmMGfOHBobG6murqa6upqlS5fy+OOPM3fu3Pb9HnnkEW699VYAxo8fz8EHH0xzczMrV65k5cqV/PWvf+Whhx7C4/G077N582Yuv/xydu7cicfjYdq0aQSDQTZt2sRvf/tbnnvuOR544AFmzZrVr9drWRY/+MEPeP755ykrK2PmzJls376dVatWsWrVKrZu3cr3vve9vH0Ga2xCWJZFWjeHehgF4fN7HHteG0sRsxlD2J3m3ffe49333pPzmkNIsCuGDcuyOOf/7uO9upqhHkpBHDt+OksWXjlobwymaRIOh/nggw+44447yGQyXHnllUyZMiVvuwceeIAVK1ZQWVnJ/fffz2GHHdb+2OrVq7n66qupr6/nvvvu49e//jUA4XCYO++8E4C77rqLz3/+8+37LF++nGuuuaY94G17LB6Pc9VVV7Fz504WLFjAT37yEyZMmABAfX09N910E2+88QZXX301zz//PMFgcL9fe2NjIy+++CI//OEP+cY3voHH4yGVSnHTTTfxwgsv8Ic//IFLL720vS5uMMcmRjfLsvjdr9+hprp5qIdSEDNmVnLVtSc68rx29PfXAeCZXsmG/zeb7yz6dzmvOYTU7IphRTq99N5FF12U149y7ty5HH/88Vx11VVUV1dz+eWXc91113Xa75133sHtdvOd73wn7w0B4LDDDuPrX/86AB9//HH7/Vu3biWVSlFeXs7ChQvz9jn55JO54oorOOOMM/D5fO33P/XUU9TU1HDooYdyzz33tJ90AcaNG8fdd9/NlClTqK6uZsmSJf3+/7jgggu46KKL2jMwgUCAG2+8EZfLhWEYrF69esjGJka3IUqEjkjD5bx20vEnyHnNQSSzK4YNl8vFkoVXdipjSGx9l/jav1Ny9DkEJh8yRKPru4EuY+jYjzKTyRCLxaipqUHXdR566CESiQQ33nhj3iW4P/3pT6TT6W7HFgqFAPuyYJupU6fi9XppbW1l8eLFXHLJJRx88MHtj19zzTWdnueVV14BYOHChXnHbxMMBjnjjDN48MEHef3117ngggv6+D+Qb/78+Z3uq6yspKqqisbGRsLh8JCNTYxeLpeLq649UcoYemkoz2tftFzMdo2xH7TkvOYkEuyKYcXlclHky58MEP/oFUJAZtVSiqYfPjQDG4a660ep6zrPPvss//Vf/8Vjjz2GaZrcfPPNedv4fD5aW1tZtWoV1dXVbN++nerqatavX09DQwNgv8m0GTNmDJdddhn
"text/plain": [
"<Figure size 750x300 with 2 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"\n",
"fig, axs = plt.subplots(1, 2, sharex=True, sharey=True, figsize=(5,2))\n",
"axs = axs.repeat(2)\n",
"for i, (ax, query) in enumerate(zip(axs.ravel(), queries)):\n",
" selection = [\n",
" f'{r.action}_{r.channel_group}' \n",
" for i, r in lfp_results_hemisphere.query(query).iterrows()]\n",
" values = psd.loc[mask, selection].to_numpy()\n",
" values = 10 * np.log10(values)\n",
" plot_bootstrap_timeseries(freq[mask], values, ax=ax, lw=1, label=labels[i], color=colors[i])\n",
"# ax.set_title(titles[i])\n",
" ax.set_xlabel('Frequency Hz')\n",
" ax.legend(frameon=False)\n",
"axs[0].set_ylabel('PSD (dB/Hz)')\n",
"# axs[0].set_ylim(-31, 1)\n",
"despine()\n",
"\n",
"figname = 'lfp-psd'\n",
"fig.savefig(\n",
" output_path / 'figures' / f'{figname}.png', \n",
" bbox_inches='tight', transparent=True)\n",
"fig.savefig(\n",
" output_path / 'figures' / f'{figname}.svg', \n",
" bbox_inches='tight', transparent=True)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Store results in Expipe action"
]
},
{
"cell_type": "code",
"execution_count": 31,
"metadata": {},
"outputs": [],
"source": [
"action = project.require_action(\"stimulus-lfp-response\" + zscore_str)"
]
},
{
"cell_type": "code",
"execution_count": 32,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-no-zscore/data/statistics/statistics.tex',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-no-zscore/data/statistics/statistics.csv',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-no-zscore/data/data/psd.feather',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-no-zscore/data/data/freqs.feather',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-no-zscore/data/figures/lfp-psd-histogram-stim_energy.png',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-no-zscore/data/figures/lfp-psd-histogram-stim_strength.png',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-no-zscore/data/figures/lfp-psd.png',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-no-zscore/data/figures/lfp-psd-histogram-theta_peak.svg',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-no-zscore/data/figures/lfp-psd-histogram-stim_p_max.png',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-no-zscore/data/figures/lfp-psd-histogram-theta_freq.png',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-no-zscore/data/figures/lfp-psd-histogram-theta_energy.svg',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-no-zscore/data/figures/lfp-psd-histogram-theta_freq.svg',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-no-zscore/data/figures/lfp-psd-histogram-stim_half_width.png',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-no-zscore/data/figures/lfp-psd-histogram-stim_half_width.svg',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-no-zscore/data/figures/lfp-psd-histogram-theta_half_width.svg',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-no-zscore/data/figures/lfp-psd-histogram-theta_energy.png',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-no-zscore/data/figures/lfp-psd-histogram-theta_peak.png',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-no-zscore/data/figures/lfp-psd-histogram-stim_p_max.svg',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-no-zscore/data/figures/lfp-psd-histogram-theta_half_width.png',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-no-zscore/data/figures/lfp-psd.svg',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-no-zscore/data/figures/.ipynb_checkpoints/lfp-psd-histogram-theta_energy-checkpoint.png',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-no-zscore/data/figures/lfp-psd-histogram-stim_energy.svg',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-no-zscore/data/figures/lfp-psd-histogram-stim_strength.svg']"
]
},
"execution_count": 32,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"copy_tree(output_path, str(action.data_path()))"
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {},
"outputs": [],
"source": [
"septum_mec.analysis.registration.store_notebook(action, \"20_stimulus-lfp-response.ipynb\")"
]
},
{
"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": 4
}