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

636 lines
237 KiB
Plaintext
Raw Normal View History

2019-10-17 17:50:46 +00:00
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"%load_ext autoreload\n",
"%autoreload 2"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
2019-12-13 10:43:57 +00:00
"13:24:34 [I] klustakwik KlustaKwik2 version 0.2.6\n"
2019-10-17 17:50:46 +00:00
]
}
],
"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",
2019-12-13 10:43:57 +00:00
"from tqdm.notebook import tqdm_notebook as tqdm\n",
"tqdm.pandas()\n",
2019-10-17 17:50:46 +00:00
"\n",
"from spike_statistics.core import permutation_resampling\n",
"\n",
"from spikewaveform.core import calculate_waveform_features_from_template, cluster_waveform_features\n",
"\n",
2019-12-13 10:43:57 +00:00
"from septum_mec.analysis.plotting import violinplot, despine"
2019-10-17 17:50:46 +00:00
]
},
{
"cell_type": "code",
"execution_count": 3,
"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\"\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": 4,
"metadata": {},
"outputs": [],
"source": [
"data_loader = dp.Data()\n",
"actions = data_loader.actions\n",
"project = data_loader.project"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"identify_neurons = actions['identify-neurons']\n",
"sessions = pd.read_csv(identify_neurons.data_path('sessions'))"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"lfp_action = actions['stimulus-lfp-response']\n",
"lfp_results = pd.read_csv(lfp_action.data_path('results'))"
]
},
{
"cell_type": "code",
2019-12-13 10:43:57 +00:00
"execution_count": 7,
2019-10-17 17:50:46 +00:00
"metadata": {},
"outputs": [],
"source": [
"lfp_results = pd.merge(sessions, lfp_results, how='left')"
]
},
{
"cell_type": "code",
2019-12-13 10:43:57 +00:00
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
"lfp_results = lfp_results.query('stim_location!=\"mecl\" and stim_location!=\"mecr\"')"
]
},
{
"cell_type": "code",
"execution_count": 9,
2019-10-17 17:50:46 +00:00
"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",
2019-12-13 10:43:57 +00:00
"execution_count": 10,
2019-10-17 17:50:46 +00:00
"metadata": {},
"outputs": [],
"source": [
"lfp_results['stim_strength'] = lfp_results['stim_p_max'] / lfp_results['theta_energy']"
]
},
{
"cell_type": "code",
2019-12-13 10:43:57 +00:00
"execution_count": 11,
2019-10-17 17:50:46 +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>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>68</th>\n",
" <td>1833-010719-1-0</td>\n",
" <td>4</td>\n",
" <td>0.006686</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>66</th>\n",
" <td>1833-010719-1-1</td>\n",
" <td>2</td>\n",
" <td>0.034550</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>694</th>\n",
" <td>1833-010719-2-0</td>\n",
" <td>6</td>\n",
" <td>0.004609</td>\n",
" <td>7.173297</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>580</th>\n",
" <td>1833-020719-1-0</td>\n",
" <td>4</td>\n",
" <td>0.008427</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",
"68 1833-010719-1-0 4 0.006686 NaN\n",
"66 1833-010719-1-1 2 0.034550 NaN\n",
"694 1833-010719-2-0 6 0.004609 7.173297\n",
"691 1833-010719-2-1 3 0.003974 6.446883\n",
"580 1833-020719-1-0 4 0.008427 NaN"
]
},
2019-12-13 10:43:57 +00:00
"execution_count": 11,
2019-10-17 17:50:46 +00:00
"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",
").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",
2019-12-13 10:43:57 +00:00
"execution_count": 12,
2019-10-17 17:50:46 +00:00
"metadata": {},
"outputs": [],
"source": [
"colors = ['#1b9e77','#d95f02','#7570b3','#e7298a']\n",
"labels = ['Baseline I', '11 Hz', 'Baseline II', '30 Hz']\n",
"queries = ['baseline and Hz11', 'frequency==11', 'baseline and Hz30', 'frequency==30']"
]
},
{
"cell_type": "code",
2019-12-13 10:43:57 +00:00
"execution_count": 13,
2019-10-17 17:50:46 +00:00
"metadata": {
"scrolled": false
},
"outputs": [
{
"data": {
2019-12-13 10:43:57 +00:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAewAAAFICAYAAACSp82YAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAXEQAAFxEByibzPwAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nO3deZgcVdn38e9kzyQsWQhgAgQI3ARkU9kUn0QfBWQVAV+VLSAgKKKIYJRFRBEQH1QERVEIIoKAhB0UEVFAEJFFtjtsCcgikIRIMtln3j/u00xlprunZ6Zmunvm97muuaq769Sp051O33VOnaWhpaUFERERqW0Dql0AERER6ZgCtoiISB1QwBYREakDCtgiIiJ1QAFbRESkDihgi4iI1AEFbBERkTqggC0iIlIHFLBFRETqgAK2iIhIHVDAFhERqQMK2CIiInVAAVtERKQOKGCLiIjUAQVsqVlmtlWR12aYWUv6W6ca5WpTnnZlFBHpCYOqXQCRtsxsDeAM4AvU6Hc0XSx8H/gAsGGViyMi/UBN/hhKv3cecHi1C9GBK4APA3OqXRAR6R/UJC61aGC1C1CBeiijiPQhCtgiIiJ1QAFbRESkDjS0tLRUuwwiAJjZ6cA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Hf/RReOH0PUVPYhOnzMJ/7TfS/NX9zd8j0xadKkzW+55ZbuZiXSF+UWsGuJmY0mhmZBrAV+XJm0k4n1tgE+nWrwIlXRYzVsM9uOuJrt6vFrE8F5Y+LK/zEiaO9LTLV4lLtfkkdZRaT+mdmBxO/Ds8BZ7r6gRNIPZx4/2kG2h6XtPHK8LSPSFT1
2019-10-17 17:50:46 +00:00
"text/plain": [
"<Figure size 525x300 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"data": {
2019-12-13 10:43:57 +00:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAewAAAFICAYAAACSp82YAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAXEQAAFxEByibzPwAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nO3dd5xcVf3/8VeSTduEkkIACRBI4ENAQVQ6moiASBUxfkUCBAQEQRSQoiACihHwB0rRSA3Si4l0BRFBQIoIKAQ+ASShiUASAsmm7/7+OGfYm9mpu3d35u6+n4/HPu7cdubMZDKfOb1XS0sLIiIiUt961zoDIiIiUp4CtoiISAYoYIuIiGSAAraIiEgGKGCLiIhkgAK2iIhIBihgi4iIZIACtoiISAYoYIuIiGSAAraIiEgGKGCLiIhkgAK2iIhIBihgi4iIZIACtoiISAYoYEu3YmabFzg21cxa4t9atchXXn7a5FHSZWajEv/mU2qdH5E0NNQ6AyJpMLPVgLOAo6nTz3X8sfALYAdggxpnR0Qypi6/2ETa4Xzg0FpnoozrgJ2A2bXOiIhkj6rEpbvoU+sMVCALeRSROqWALSIikgEK2CIiIhmgNmzJNDM7A/hx3rGW+PBBdx9f4J5RwInAbsA6wAfADGAqcLW7t+Tfk7i3LzAJmABsDgwF3geeBW4FrnL3pXn3TAUOThxaP5HHq919Ut71awKHA18ALD7HcmAO8CRwI/D7UvlsLzObBFwVd9cG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4Bwz+zhhDOaprDwWU6THeffdd3nvvffKX1jG2LH6/StSz1IL2GY2htArdF1CB5HTgMNpnXi
2019-10-17 17:50:46 +00:00
"text/plain": [
"<Figure size 525x300 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"data": {
2019-12-13 10:43:57 +00:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAewAAAFICAYAAACSp82YAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAXEQAAFxEByibzPwAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nO3deZxcVZn/8U93J6TTCWRlkwCBBB7CKo4gDDBEBETZhfgbJJiABNlckEVGGESUTRlwBAYEBsKAioAoS3BBjCggiBjW6JOAkEAAQ1ZIOlun6/fHOUVXd1dVV3dX1a3b/X2/XvW6Vfeee+upyvLUOfcsdZlMBhEREalt9UkHICIiIl1TwhYREUkBJWwREZEUUMIWERFJASVsERGRFFDCFhERSQElbBERkRRQwhYREUkBJWwREZEUUMIWERFJASVsERGRFFDCFhERSQElbBERkRRQwhYREUmBAUkHIFItZraru7/QYd90YEp8ubm7v1P1wHLki7HWmNl2wMXARGA0sBSY7e4HJBiWSJ+nhC19npkNAy4BzqBG/86b2WbAVcA+wDYJh1OQmW0BPAWMzNm9KfC3ZCIS6T9q8j8vkTK7Gjgp6SC68CPgAGBe0oF04Uu0Jet7gRuA1UBzYhGJ9BNK2NIfNCQdQAnSECPATnG7Dpji7krUIlWiTmci0h1D4nahkrVIdSlhi0h3ZP/PaEk0CpF+qC6TySQdg0hFmNnFwDcLHH7M3Sd27CUONALnAocAWwDvAbOB6cDt7l7wH4yZDQSmApOAXQn3epcBzxPu997m7ms7nJP7/h3d7u5TO5TfFJgGfAKw+B4twGLgGeAu4GfF4uwuMxsLvFakyDx3HxvLZt/3LGAGcB2wL6EJ/RXgfHf/b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9EVdjXGueWZ2LG0rdmk9bEm1itWwzWwPQg/Pnp6/KfA0YZm+TYEXCL/6jwYejx1KRERE+oWKJGwzm0gYurFhLy7zU8I8yY8AY9z9o4TOKOcTJky40cwm9DJUERGRVChrL3EzayQk1AtpW/quJ9eZSOiQsgL4nLsvhQ8WPrjSzHYmTCZxQdyKSB7vvvsuixZ1Nd12fkcdddQHk450sfa1iFRB2RK2mY0HfkdYLWg9IWlPA7buweWmxu397p7vf5sbCYn6KDMb7O6revAeIn3eXXfdxXXXXdfT03OHvaX+frZI2pWzSXwMIVk/BXzM3S/txbX2jtvHCxz/M9BCGG/50V68j4iISCqUs0n8TeBQd3+4y5JFmFk9bVMQvpqvjLuvM7MFhNr79nSeNUqk32ltzdDc3H5xqhNPPIUTTzylU9mWdS0sn/960ettvdtOqa9Vu/u9qHVA+oiyJWx3fwV4pQyXGkFbXMWWIFxMSNg9XVtXpE9pbl7LJf/5SEllB69t4bSZc4sXml0Lq3SKSFYtTk3alPN8dZFy2fvWTUXKAGG8dYFD40oNSkREJEm1mLDXd12knYrPyCQiUglmNhZ4rcDhDGGyqPnAL4Fr3L1Yq2NNMrOphDnfF7j7mJz9vyeMBrrU3S/Mf3ayzGw6MAV4zN0nJhtNbSbsFTnPGwuWgsFx21ykDADunrdtL9a8dyw9NJHatX59d3/rSo15CVie83oA4RbhzoR1vaeZ2QHu/mISwUnyajVhryEsDziqSLnsveuFFY9IJAWWLX2r075jlp9BY+a9Tvvr1jURJhFss+i7u7LhlmM6lZWq+ZK7/77jzjhF8+2EpULvNbMJcU6KtPs84ZZmzyYK6IdqLmG7e6uZObArMDZfGTMbSJj1DGBOlUITSZ3GzHsMzpewM51r45vYWDbZzqoRlnSDuy82symERU22J6xsVnBBlLRw9/lJx5A2tbpa19Nxu3eB43sSfmyspv3kDiIifY67LyY0mUN
2019-10-17 17:50:46 +00:00
"text/plain": [
"<Figure size 525x300 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},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CJpYxddqRMPE5qfNyQ0i+d2wHrF3Z8DcPd1ZnYfYT7/PsCThOlgUF7AXpD3eDe6GOwXbSu6Uxn5ilRE3fVjSepkKph3/jSbE7tJexHwPUJtubAPulgZJ+U9fqTLVGEBk8HR43r8olvS+zCzj5K3Z3NXq8vVStSqkRtJvR/w8ejx3QVJ74qOU+iY+veYu79SxsvlfwH8XJF0hxBq4F2p5P8BkfcpYEtvrc09SLqpNZoT/dfo6b5mFrsyl5mdSsca048RVkaLK2Nc+fKbQQ+KuY6ZfZjQxJxTb9OhoLT3sQ1wbcHpenwvuelduxFWAoOuA/Zw4LjocTm169zCJ7+Lnh5hZjML00Rz+n/cTVbFPl8iiamrb9eSSq/nPT7fzH4JtLv7/ITyP4EwWGokcJ6Z7UVYC3sRYW3so4FPR2nfAz4fM3goV8axZvY/hDndrdEKXjcSlp5sAL4ULaTyO0IA3JSwpOdRrL8s5sgSBilV2zw6Vgo7xMx+T1ij/Q1C8/IBwLF0Diqj6JjXXC/uIPxb5tbZho4AnTMfWEaYEZBr+SgrYEe+TOj/HgNcbWZ7E+ZkryB0w3wjKsMq1h+UmK/Y50skMf26hm1mt5pZT/6TS4dbCWt5Q/jj9zCQ2I5D7v4sYR3pl6JT+xNWhXqQ0KR5BCHYLgMO72I1tPymz/OjMv40yv8xwprRRPkcRwh+DxIC97GEYH07cGWUbiDrN0HXXLRU7Bfp+Lc4nPDv8CBwC2HTleHAQ4SBdTnVGPVeFndfCdybd+qFqDacnyZTkGaxuxfr0ujqtV4ntM4sIvz7H0uYFvZ3wjK3GxE2nbmnSDZdfr5EktSvAzaw9aRJkw4lTLfQTw9+3H3+FVdc0bTrrrsydOhQBg8
2019-10-17 17:50:46 +00:00
"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",
"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",
"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",
"for key in bins:\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",
" lfp_results_hemisphere.query(query)[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(-0.05, bins[key].max() - bins[key].max()*0.025)\n",
2019-12-13 10:43:57 +00:00
" despine()\n",
2019-10-17 17:50:46 +00:00
" 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",
2019-12-13 10:43:57 +00:00
"execution_count": 14,
2019-10-17 17:50:46 +00:00
"metadata": {
"scrolled": false
},
"outputs": [
{
"data": {
2019-12-13 10:43:57 +00:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAcEAAAFICAYAAAAoBEX4AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAXEQAAFxEByibzPwAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2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KqCX+oTYlrw13n0r4G6wlBIbTCfMnZxOakJMP9weAz3bG5G93XwJ8DHgyPrUHoUnxEcK/wfGEf7tVwBR3v6UD95pNmNu3ivB6zyIExQcJX4CGEdaQTfpLywW0/En309tbNhHIeBAExowdO/ZAwrdP/aT04+7Xz5w5s+9xxx3H9ttvz8CBA+nVqxeDBw9m/PjxfP3rX+fRRx8dEpf8yr1uzi9+8Yum8ePH079/f/r27ctWW2211apVq1qB1kMPPTTZRonZs2e/lnvtyJEjRwFsvfXWVqxcEydOTFZsoViaCy+88P0P2d/85jf3dtLfZ+rMmTN7TZkyBTNj0KBB9OrVi6FDh7L33ntz8cUX88wzz+wVg9U6155yyinnJuWbMWPGw8XuUS6du784b968nadOncrHP/5xhg8fTu/evenXrx/jxo1jypQpzJw5s5+7Ty9yj4q5+wxCLfdKwko2qwkrxMwEDnL3kwmjPqH03Efc/R+0LX/3rLs/Vk1ZRPJ16n6CsSlkGnCCu/+yHddvQuicP5iwDc+bhG+QU939kVLXVpj/02PHjt3+9ttvL59YRPKluaLOvwnLu/3R3Q8qkW5jQh/lBsA33f1HaZVBsqnTaoJmthvr9vdUe/2mhDlmXyesPPEU4RvooYSJsselUU4R6Rxm9gkz+4OZ/beZbVUi3a60rW/6ZLF00VGEALiWsESfSId0ShA0s4mE4eCDyiQ
2019-10-17 17:50:46 +00:00
"text/plain": [
"<Figure size 480x300 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"data": {
2019-12-13 10:43:57 +00:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAcEAAAFICAYAAAAoBEX4AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAXEQAAFxEByibzPwAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nO3deZhcVZ3/8XdIgmFRliCLiWyJfDGKyig6ERziKO4iCjgqMASE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QnKTe/3Zzyu30jZdWcdgM3Hy0zfxQRt1OWSZtfffvCYWXuiohrKavntM4YjOVUaMuxlKXlFgDHVmuvfpYyGnQXylqtCyk9xpGupfre1Jg0uicYEd+MiPH8Z532qj8KB1PmQ82inMb6H8qUibOBoyhzxO4BXjNslN83KSuBQPnkfyXw9alp+eDLzAcp66C2Thk+DziD8rs9h/LHfAvKgJL3tB3afqPcQdK+4ssD/Pm0mpb2YHyIteu79qy6k8ZfsXZd1lcC36he7zOUADyHslLNSHxvakwaHYLAgoULF76SciqncV+Z+aXzzz9/zqGHHsqiRYvYeOONmTVrFpttthm77ror73znO7niiis2z8z/G3bc8k9/+tMzd911VzbccEPmzJnDtttuu+0DDzwwBAy9+tWvbt1GiWXLlv2q/dh58+ZtB7DDDjvESO1asmTJy9v+jTqWOf7441u34+GLX/ziRSOVG89XVR8A7373u48fT7nMPP/cc8/dYP/992f+/PnMnj2b2bNns+WWW7L77rvzgQ98gGuuuWanq6666iMbbFBmnzz3uc/9dK+/q8n8+Yd/fepTnzq89VqLFy/eoFoMe4g/1x6CF3VZCKG
2019-10-17 17:50:46 +00:00
"text/plain": [
"<Figure size 480x300 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"data": {
2019-12-13 10:43:57 +00:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAcEAAAFICAYAAAAoBEX4AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAXEQAAFxEByibzPwAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nO3deZhcRbnH8W8WQhISSEKCUSCBJPBikE02A3iJyiKiLLIoW1hkVcQFAnrhyqKAwFURQREEwqrAlSUKimwG2YIiKOsbAiQgiJANCAGSzMz9o+ownZ5ep09Pd8/5fZ5nnjPdp87pmpmk366qt6r6dHR0ICIikkV9G10BERGRRlEQFBGRz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3u98tX7CMu+8uthtRZfbYo/acj2OPPZavf/3rNd9HpLdIszt0LUIAfJiwA3WXScBVmBSP9xc5/whh4d9VgC1qeB0REcmwNLtD/wXs6u6313KTuKBuMk/q+UJl4kTZVwitzPWBv9TymlJaR3s7bYvnN7oaDbPbDp9ktx2KfR6rzuhVx/HUXzvvtfytN0qUXlHudbVY/tYbdLR30PHm++ULlzBg7Nqp1EekkVILgu4+G5idwq2G01mvUu8Q8wlBcGQKrykltC2ezwvHjW50NSRFfZatwtDH/qeme4x+empKtRFpnGZcNi13Rfj3SpRLxgHLriBvZk8VOVVbpoKIiLS0Zlwxpq18kRXUb7a/iEgTMrOjzKzDzA6v8rqvxesO6cZr9o/XdphZ2ax8Mzs8lm3qTa6bsSW4OOf7gUVLdW7EuaREGQDcfcNCz8cW4sTKq9Ya0h7Da1tcKEFXRBqhuwuRmNnWwDnp16i1NWs
2019-10-17 17:50:46 +00:00
"text/plain": [
"<Figure size 480x300 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
},
{
"data": {
2019-12-13 10:43:57 +00:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAcEAAAFICAYAAAAoBEX4AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAXEQAAFxEByibzPwAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nO3de7zd053/8dc5JzRXkkgiKpGQyAetqlZpRvxkyqhO1aVo654YilZNO4NSpmJajMvMMGTKaAnaFKmUULQuFQ1Cadzlk7gkNK1LbiokyDn798daO9l29v1899n7nO/7+Xicx3fv/V3f9V1nZ2d/zvp+P2utlkwmg4iISBq1NroBIiIijaIgKCIiqaUgKCIiqaUgKCIiqaUgKCIiqaUgKCIiqaUgKCIiqaUgKCIiqaUgKCIiqaUgKCIiqaUgKCIiqaUgKCIiqaUgKCIiqaUgKCIiqaUgK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689tprTJ8+nblz5/Lqq6+yZs0aBgwYwOjRo9lzzz057LDDBg8cOPDu/ONmz57NT37yE9ydjo4Ohg0bttXq1aszffr04aCDDuLXv/41AHPmzPnIYPctt9ySJUuWsPXWWxtF/r0mTpzIAw88kH1asMwFF1zAmWeeCcD1119fbOaZmmTj/eOPP86MGTN48skneeONN1i7di2DBg1iu+22Y5999uGggw7aoVevXovyj58/fz7XXnstM2bMYMmSJWy88caMHz/+aMJqDRW9B7ltaW9v54477uDuu+/m2WefZcWKFfTq1YuRI0ey++67c8QRR/QZOXLkNGBasXomTJjwxRLnKjnmLo7V/LqZ3Qj8E2HO1oGEic3vIsxxmjtIv9C
2019-10-17 17:50:46 +00:00
"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",
"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",
"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",
" 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",
" lfp_results_hemisphere.query(query)[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(-0.05, bins[key].max() - bins[key].max()*0.02)\n",
" despine()\n",
2019-10-17 17:50:46 +00:00
" 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": "markdown",
"metadata": {},
"source": [
"# Plot PSD"
]
},
{
"cell_type": "code",
2019-12-13 10:43:57 +00:00
"execution_count": 15,
2019-10-17 17:50:46 +00:00
"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",
2019-12-13 10:43:57 +00:00
"execution_count": 16,
2019-10-17 17:50:46 +00:00
"metadata": {},
"outputs": [],
"source": [
"from septum_mec.analysis.plotting import plot_bootstrap_timeseries"
]
},
{
"cell_type": "code",
2019-12-13 10:43:57 +00:00
"execution_count": 19,
2019-10-17 17:50:46 +00:00
"metadata": {},
"outputs": [],
"source": [
"freq = freqs.T.iloc[0].values\n",
"\n",
2019-12-13 10:43:57 +00:00
"mask = (freq < 49)"
2019-10-17 17:50:46 +00:00
]
},
{
"cell_type": "code",
2019-12-13 10:43:57 +00:00
"execution_count": 20,
2019-10-17 17:50:46 +00:00
"metadata": {},
"outputs": [
{
"data": {
2019-12-13 10:43:57 +00:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAArsAAAFFCAYAAADsEyV2AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAXEQAAFxEByibzPwAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nOzdeXxcd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arBqGwQ9+8AOee+45iouLmT17NgcOHGDLli1s2bKFffv28d3vfjfnPiM1NiEMwyCdGkzXyrHL5XZYdl6bhJ95VBCyp3n7X+/w9r/ekXnNIiTYPQyqqrYqinIy8D3gS8BCIA2sB+5RVXXtaI5vvDIMg/P/937eaaoZ7aHkxQmTZ7F25dUj9sKgaRqhUIjNmzdzxx13oOs6V199NdOnT8857sEHH+Stt96irKyMBx54gKVLl3betnXrVq699lqam5u5//77ueeeewAIhULceeedANx1112cc845nffZuHEj1113XWfA23FbLBbjmmuuoba2lhUrVvCTn/yEqqoqAJqbm7npppt4/fXXufbaa3nuuefwevvr5te/1tZWXnjhBX74wx/y1a9+FYfDQTKZ5KabbuL555/n97//PZdffnlnXdxIjk1MbIZh8Nt73qSmun20h5IXR84u45pvn2LJee247+0AwHFEGR9eP4dvff8GmdcsQoLdw6SqahS4Ofsl8kT2qxm4r3/96/3efuWVV3L99df3uP7NN9/EbrfzrW99K+cFAWDp0qV85Stf4Z577mHnzo+aiezbt49kMklJSQkrV67Muc9pp53GVVddhaqquFyuzuvXrFlDTU0Nixcv5t57783JjFRWVvKrX/2KlStXUl1dzdq1a7n44osH9fN3d/HFF+f8n3g8Hm688UbWrVtHJpNh69atnHHGGaMyNjGxyUZcAzea81pjNtgFOPWkk2VesxAJdsWYYbPZWLvyailjGKDu/Sh1XScajVJTU0MqleLhhx8mHo9z44035kx6f/zjH0mn032Ozecz90RJJD7aEXvGjBk4nU6CwSCrV6/msssu46ijjuq8/brrruvxOH//u1nJs3Llypzzd/B6vZx11lk89NBDvPbaa0OeeJcvX97jurKyMsrLy2ltbSUUCo3a2MTEZbPZuObbp0gZwwCN5rz2OcPGPFuF2YnBMGResxAJdsWYYrPZ8Lt6LgYQPfXVjzKVSvHMM8/w05/+lMcffxxN07j55ptzjnG5XASDQbZs2UJ1dTUHDhygurqaDz74gJaWFsB8kelQUVHBFVdcwf3338+zzz7Ls88+S2VlJR//+Mc57bTTOP3003u0zunIoKxZs4ZXXnml15+h41x79+497P+HDh0f13XX8VGdpn0UbIz02MTEZrPZcHvk5XYgRnVeA8rxcXzTkSz/SzFnrDxT5jWLkGefEBbjdrv58pe/THNzM/feey9PPvkk3/zmN5k6dSpgrtS99dZbWbduHen0R1l0l8vF4sWLWbhwIRs2bOjxuDfccANLlizh8ccf55133qG5uZl169axbt06nE4nK1eu5Mc//jFFRUWd5wE6F4f0JxwOD/nn7vpRY2+MLn0zR3psQoihGYl57e3/e4s24rwc/YCXf/pjnLffIvOaRUiwK4RFrVixgnvvvRdN09ixY0fni8K1117LW2+9hdfr5Wtf+xrLli1j/vz5zJo1C5fLxZNPPtnriwLAmWeeyZlnnkkkEunswrB+/Xr27t3L888/Tzgc5v777wfMjw07vu/to7jRNJbHJoTo23DOa3sW3soW6nmvsI23y1rZW1Mt85pFyKYSQlhU19q1jnf/W7Zs6WzN87vf/Y7Vq1dz9tlnM2/evM4MQkNDQ4/HSiQSfPjhh3z44YcAFBY
2019-10-17 17:50:46 +00:00
"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",
2019-12-13 10:43:57 +00:00
"axs[0].set_ylim()\n",
"despine()\n",
2019-10-17 17:50:46 +00:00
"\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",
2019-12-13 10:43:57 +00:00
"execution_count": 21,
2019-10-17 17:50:46 +00:00
"metadata": {},
"outputs": [],
"source": [
"action = project.require_action(\"stimulus-lfp-response\")"
]
},
{
"cell_type": "code",
2019-12-13 10:43:57 +00:00
"execution_count": 22,
2019-10-17 17:50:46 +00:00
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['/media/storage/expipe/septum-mec/actions/stimulus-lfp-response/data/data/psd.feather',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response/data/data/freqs.feather',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response/data/figures/lfp-psd-histogram-stim_energy.png',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response/data/figures/lfp-psd-histogram-stim_strength.png',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response/data/figures/lfp-psd.png',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response/data/figures/lfp-psd-histogram-theta_peak.svg',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response/data/figures/lfp-psd-histogram-stim_p_max.png',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response/data/figures/lfp-psd-histogram-theta_freq.png',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response/data/figures/lfp-psd-histogram-theta_energy.svg',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response/data/figures/lfp-psd-histogram-theta_freq.svg',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response/data/figures/lfp-psd-histogram-stim_half_width.png',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response/data/figures/lfp-psd-histogram-stim_half_width.svg',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response/data/figures/lfp-psd-histogram-theta_half_width.svg',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response/data/figures/lfp-psd-histogram-theta_energy.png',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response/data/figures/lfp-psd-histogram-theta_peak.png',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response/data/figures/lfp-psd-histogram-stim_p_max.svg',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response/data/figures/lfp-psd-histogram-theta_half_width.png',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response/data/figures/lfp-psd.svg',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response/data/figures/lfp-psd-histogram-stim_energy.svg',\n",
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response/data/figures/lfp-psd-histogram-stim_strength.svg']"
]
},
2019-12-13 10:43:57 +00:00
"execution_count": 22,
2019-10-17 17:50:46 +00:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"copy_tree(output_path, str(action.data_path()))"
]
},
{
"cell_type": "code",
2019-12-13 10:43:57 +00:00
"execution_count": 23,
2019-10-17 17:50:46 +00:00
"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": 2
}