654 lines
228 KiB
Plaintext
654 lines
228 KiB
Plaintext
|
{
|
||
|
"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": [
|
||
|
"10:47:08 [I] klustakwik KlustaKwik2 version 0.2.6\n"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"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\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": 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-mec\"\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",
|
||
|
"execution_count": 7,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"lfp_results = pd.merge(sessions, lfp_results, how='left')"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 8,
|
||
|
"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": 9,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"lfp_results['stim_strength'] = lfp_results['stim_p_max'] / lfp_results['theta_energy']"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 10,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"lfp_results = lfp_results.query('stim_location!=\"ms\"')"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 11,
|
||
|
"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>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",
|
||
|
" <tr>\n",
|
||
|
" <th>578</th>\n",
|
||
|
" <td>1833-020719-1-1</td>\n",
|
||
|
" <td>2</td>\n",
|
||
|
" <td>0.019033</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>372</th>\n",
|
||
|
" <td>1833-020719-3-0</td>\n",
|
||
|
" <td>4</td>\n",
|
||
|
" <td>0.001076</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",
|
||
|
"580 1833-020719-1-0 4 0.008427 NaN\n",
|
||
|
"578 1833-020719-1-1 2 0.019033 NaN\n",
|
||
|
"372 1833-020719-3-0 4 0.001076 NaN"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 11,
|
||
|
"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",
|
||
|
"execution_count": 12,
|
||
|
"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",
|
||
|
"execution_count": 13,
|
||
|
"metadata": {
|
||
|
"scrolled": false
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stderr",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"/home/mikkel/.virtualenvs/expipe/lib/python3.6/site-packages/numpy/lib/histograms.py:898: RuntimeWarning: invalid value encountered in true_divide\n",
|
||
|
" return n/db/n.sum(), bin_edges\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAewAAAFICAYAAACSp82YAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAXEQAAFxEByibzPwAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nO3dd5xcVf3/8ddm0xMgjSaBBAh8CEhTQVD8JfqVojQR8KvSAgKCIkUEUYqI0sQvKEVRFKKIICC9KSKigCBSpX1CS0AQgSQEkk3f/f3xOcPe7M7Mzu7e3ZnZfT8fj33cmbnnnntmMpnPPeee0t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7nrrrtwd+bNm8fgwYOZOHEiU6dOZZ999hk9duzY29tlno6/4YYbmD59OjNnzqShoYFJkyb9P9J3yd25//77ufzyy3niiSd4++23GTRoEKuuuiobb7wxn/3sZ5kyZcqn//73vzNt2jQAjj766Bnd/OiKlhPg2Wef5corr+Qf//gHr7/+OkuXLmXMmDFsscUW7LnnnkyZMuWztB/OVXb1rk6W47G0xOdBwGdoXV5zETADuBW4yN3fyOFc55nZX4he3h8nOva9C9xH3Ce/n+i5D+XHlkPMevYusBJwp7uX/M6J9LQeXQ/bzL5MdGQ5xN1/0YXjxxI1ld2JDh9zif90P0jzF3e3fE9NmjRp41tvvbW7WYn0RbkF7FpiZmOIoVkQa4EfWSbtZGK9bYAvpBq8SFX0WA3bzLYirma7evzqRHBen7jyf4II2nsQUy0e6u6X5lFWEal/ZrYP8fvwPHCmu88rkfQTmcePd5DtgWk7hxxvy4h0RY/
|
||
|
"text/plain": [
|
||
|
"<Figure size 525x300 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAewAAAFICAYAAACSp82YAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAXEQAAFxEByibzPwAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nO3dd5xcVf3/8demN0JCQpMQAgl8CCiISBP9EhEQqSJGRVpAQBBEBEEUREAhAv5AKYLUIEWaQaoCIqKAFGlK+0CAhCYCSQgkm7q7vz/OuezN7NTduzt7d9/Px2Mfd247c2Yymc+c3tDS0oKIiIh0b33qnQERERGpTAFbREQkBxSwRUREckABW0REJAcUsEVERHJAAVtERCQHFLBFRERyQAFbREQkBxSwRUREckABW0REJAcUsEVERHJAAVt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MW+biHsKxoE+HHwwuEZTE/5+4H0Dqven9aFxupirv/ntb+CROBn9Ryv0hXa2hpaem0xM3s24Rf1ge7+6XtuH8UodSxO6FH6FzC7EtnxrmfO5q/ZydMmLDBHXdUXNZXpFeYPn06P/rRj5Ldvdz9unrmR0RadVoJ28w2I/SYbe/9qxImRziKMIzl34RSwB7AA2Z2YBb5FBERyYNOCdhmNolQ1bRCB5K5njBv8D3AGHf/NKFzz/GEGZYuilMXioiI9HiZ9hI3s0GEgHoiy09bWGs6kwgdfOYD34wdRJKFAM4ws48TxmCewPJjMUV6nXfffZf33nuv8oUVTJyo378i3VlmAdvMJhB6ha5J6CByInAwrRPv12J
|
||
|
"text/plain": [
|
||
|
"<Figure size 525x300 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAewAAAFICAYAAACSp82YAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAXEQAAFxEByibzPwAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nO3de5xd0/3/8ddkJpJMgkTiVikh4SOu1ZZSVKqoulZJv1VRoaKKXlSpX/mqat2qX6rkyxetKFpFqUv0oqpalKrGNfUJKkFIycUlF0kmM78/1jqdPZNzzpyZ2efss2fez8djHvucvdde+3NGzOestddau6GtrQ0RERGpbwOyDkBERES6poQtIiKSA0rYIiIiOaCELSIikgNK2CIiIjmghC0iIpIDStgiIiI5oIQtIiKSA0rYIiIiOaCELSIikgNK2CIiIjmghC0iIpIDStgiIiI5oIQtIiKSA01ZByBSK2a2nbs/1WnfNOCo+HZDd59X88ASisVYb8xsc+BsYAIwClgEzHT3PTMMS6TPU8KWPs/M1gbOAU6kTv/Nm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n2avXhL2c8HjAkWXKFe5dv1H1iETqzCbnPUPjsI7DN+YufBsufa7Dvgc2fYgVjSsqqnPa3pMZvsaQrgtKtXzF3f/UeWdcovk6wqNCbzWz8XFNirz7AuGWZs8WCuiH6i5hu3urmTmwHTCmWBkzG0hY9QxgVo1CE6kbjcNG0bTWuh32DVix+lpF84c0srxp4Gr7ixm98aaMHJzq48IlBe6+wMyOIjzUZAvCk81KPhAlL9z95axjyJt6fVrXo3G
|
||
|
"text/plain": [
|
||
|
"<Figure size 525x300 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAewAAAFICAYAAACSp82YAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAXEQAAFxEByibzPwAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nO3debxe473//9e2ExmFDKaKSCR8JIZWW1PpEb6minCU9HdUEEN0oKpHqR6KajVFH7TKOY46TVSrilIk2lJTi1IlpuATU4KQksSUedj798d13fbKnXvae697WHu/n4/Hfqx7rXWta133zp39ua9rXUNTa2srIiIi0tjWq3cBREREpDwFbBERkQxQwBYREckABWwREZEMUMAWERHJAAVsERGRDFDAFhERyQAFbBERkQxQwBYREckABWwREZEMUMAWERHJAAVsERGRDFDAFhERyQAFbBERkQzoUe8CSNdgZju5+zN5x6YBx8Xdzd19fs0LllCojI3CzCYBU+PuUe5+Y53KkVtv98/uflCB8/2B84HDgS2AZcDbwDh3n1OrcraHmV1AKDPAHu7+aAfymANsBTzo7mOLpCn4+TKzB4C9gRXu3ru99xbJUcCWTjGzDYELgVNo0M+TmW0G/ATYExhR5+JklpmtB9wN7JE43BvoB8yrS6EagD5fUisN+QdWMuU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U5tej13i7uvhh4MHHo1VgbTqZpyUszz91LPdIodq+3Ca0zcwn//scShoX9nTDN7WaERWceKJFN0c+XSJq6dcAGRo4aNWo8YbiFfjrw4+4zr7nmmuadd96Zvn370rt3b4YNGzZs2bJlrYc
|
||
|
"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",
|
||
|
" 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": 14,
|
||
|
"metadata": {
|
||
|
"scrolled": false
|
||
|
},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAcEAAAFICAYAAAAoBEX4AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAXEQAAFxEByibzPwAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nO3debxd873/8VecJJI4hsggBAmJfIhrSGtoDBXVqltz0Z8SJCpFDW3vNbV6iw60cfWqMWiJsQ23uaWCktAQQ6gGjfBJDBFFSIJwCJFzzu+P73c5Ozt7PGeds0+y3s/H4zzWXnt913d9987O/uzvuLo0NzcjIiKSRWvVugAiIiK1oiAoIiKZpSAoIiKZpSAoIiKZpSAoIiKZpSAoIiKZpSAoIiKZpSAoIiKZpSAoIiKZpSAoIiKZpSAoIiKZpSAoIiKZpSAoIiKZpSAoIiKZpSAonY6ZbV/k+Ylm1hz/BnR0uURkzdO11gUQSZjZ+sDPgFPQZ1NEOoC+aKQz+Q1wfK0LISLZoSAonUldqYPuPgYY0yElEZFMUJ+giIhkloKgiIhkVpfm5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rKI5GvX+wnGppAJwDh3/10rzu9D6Jw/mHAbnvcIvyDHu/sTpc6tMP/nhw4dOnzKlCnlE4tIvjRX1PmAsLzbX9z9oBLpNiD0Ua4N/Mjdf5VWGSSb2q0maGY7s3J/T7Xnb0SYY/YDwsoTzxF+gR5KmCh7fBrlFJH2YWb7mNmfzey/zWzzEul2omV902eLpYuOIgTAFYQl+kTapF2CoJmNIgwHX7dM0lImEVbxfwD
|
||
|
"text/plain": [
|
||
|
"<Figure size 480x300 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAcEAAAFICAYAAAAoBEX4AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAXEQAAFxEByibzPwAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nO3deZhcVZ3/8XdIAkmIrGEzkS2RL0ZRmHGZCEocxV1EEGcUGALCuIzjMgLqwDOgjqAyvxkHhWHU0SiIIjM86giMsomGTcSAAvoNoICCyCZqZMvSvz/OLVI01dXV3dVd1bnv1/P0c6vqnnvqdKfTnzr3nnPulIGBASRJqqMNet0ASZJ6xRCUJNWWIShJqi1DUJJUW4agJKm2DEFJUm0ZgpKk2jIEJUm1ZQhKkmrLEJQk1ZYhKEmqLUNQklRbhqAkqbYMQUlSbU3rdQM0eUXEszPzJy1eXwocWj3dLjPvntCGjVFELAYurZ5+KDM/3qN23AbsAGRm7tpi/3TgGOAgYHtgDfAb4LDMvHLiWtq5iFgCfLF6+ubM/Noo6vgesDdwe2buOESZ9fJ3U91nCGrEImJT4CPA3+HvUC+dCbxp0GubAHf1oC19wd9NjZS/JBqNfwUO73Uj6iwidmVdAN4OfBD4JbB5Zt7es4b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Tv1HLMieddFLjdjx8+ctfvnSocqP5quoD4P3vf/9JoymXmRddcMEFMw888EDmzZvH9OnTmT59OltvvTV77rknH/3oR7n++ut3ufbaaz8xc2aZffLCF77ws53+rMbz+x/8ddpppx3ZeK9FixbNrBbDHuCJmkPw0jYLIbSVmXd
|
||
|
"text/plain": [
|
||
|
"<Figure size 480x300 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAcEAAAFICAYAAAAoBEX4AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAXEQAAFxEByibzPwAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nO3debxd0/3/8VfciCSuKQOpkMggH6Kmmhr0K1VTVQ011BARamxRrfnLr0Jbiu+3RWkNRYwtvjW1lJoajSFUUTF8YkooUkmMl5Dk3vv7Y63tntyc8Z59zrnJfj8fj/vYZ5+99jqfe25yPmetvdbaPdrb2xEREcmiZRodgIiISKMoCYqISGYpCYqISGYpCYqISGYpCYqISGYpCYqISGYpCYqISGYpCYqISGYpCYqISGYpCYqISGYpCYqISGYpCYqISGYpCYqISGYpCYqISGYpCUq3ZGYbFHh+kpm1x59B9Y5LRJYuPRsdgEguM1sJOAv4Afr3KSI1pg8Z6W5+CRzS6CBEJBuUBKW7aSp20N0nABPqEomILPV0TVBERDJLSVBERDKrR3t7e6NjkKWUmRnwfeAbwDDCl645wFPArcCN7r4wlp0InFGgqsnuPjaWmwQcFJ//krvPynm9GcBQ4H/d/QQz+xZwNLAJ0Ay8AfwROM/dP4znbAQcD3wdGBjjexD4qbtPr/ItWIyZjQUeirtjgOeBU4C9gCHAZ8DTwJWE96cm/0Hr+V6Z2TDgMGA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iDRWVxciMbMtgHPTj2jJ1l2T4OeE26r0L1IuuRa4pN1sNHOGnj2NpmZduhWpVpxDfSsVLkRiZt8
|
||
|
"text/plain": [
|
||
|
"<Figure size 480x300 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {
|
||
|
"needs_background": "light"
|
||
|
},
|
||
|
"output_type": "display_data"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAcEAAAFICAYAAAAoBEX4AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAXEQAAFxEByibzPwAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nO3df9yc053/8VdyJyQkiBDRJBJJ5ENaRas0i5Utq7pVquiW+BGWolXb7qKUb8W2qB+7X4o2VkvQpkibon61flQ0CKWJHyGfxI+gqSARKiRIcu8f54yMMT/umbnmnrnv834+HvfjmpnrXGfOTCbznuu6zjlXj/b2dkRERFLUs9kNEBERaRaFoIiIJEshKCIiyVIIiohIshSCIiKSLIWgiIgkSyEoIiLJUgiKiEiyFIIiIpIshaCIiCRLISgiIslSCIqISLIUgiIikiyFoIiIJEshKJ3OzD5Z4vEpZtYe/wZ3drtaRan3J1Vmto6ZbV3k8RF5n5fJzWibdH0KQek0ZrahmV0M/KXZbWlFZjbazG4HftzstrQKM9sTeBz4WrPbIt1Tr2Y3QJLyP8BRzW5EC/s9MBKY0eyGtAIzGwbc2ex2SPemEJTO1FZupbtPBCZ2SktaU9n3J0F6P6ThdDhURESSpRAUEZFk9Whvb292G6QLMjMDvgHsAWxJ+EG1BHgUmA5MdfdVsewk4MwSVc1w9/Gx3BTgiPj45u6+OO/5FgLDgf9295PM7IvACcCngX7Ai8BvgPPd/c24zfbAfwL/BGwa23cP8AN3n1/nW1CSme1BOPf5D8DHgPeAxcBM4Gp3v7eg/L3A7iWq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M0
|
||
|
"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",
|
||
|
" 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",
|
||
|
"execution_count": 16,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"psd = pd.read_feather(pathlib.Path(\"output\") / \"stimulus-lfp-response\" / 'data' / 'psd.feather')\n",
|
||
|
"freqs = pd.read_feather(pathlib.Path(\"output\") / \"stimulus-lfp-response\" / 'data' / 'freqs.feather')"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 17,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"from septum_mec.analysis.plotting import plot_bootstrap_timeseries"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 18,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"freq = freqs.T.iloc[0].values\n",
|
||
|
"\n",
|
||
|
"mask = (freq < 100)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 19,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stderr",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"/home/mikkel/.virtualenvs/expipe/lib/python3.6/site-packages/numpy/core/fromnumeric.py:3257: RuntimeWarning: Mean of empty slice.\n",
|
||
|
" out=out, **kwargs)\n",
|
||
|
"/home/mikkel/.virtualenvs/expipe/lib/python3.6/site-packages/numpy/core/_methods.py:154: RuntimeWarning: invalid value encountered in true_divide\n",
|
||
|
" ret, rcount, out=ret, casting='unsafe', subok=False)\n",
|
||
|
"/home/mikkel/.virtualenvs/expipe/lib/python3.6/site-packages/numpy/core/_methods.py:161: RuntimeWarning: invalid value encountered in double_scalars\n",
|
||
|
" ret = ret.dtype.type(ret / rcount)\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAsQAAAFFCAYAAADrUftjAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAXEQAAFxEByibzPwAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nOzdeZwcZZ348U9V9TX3kUzuEEISCkLkEgS5NAZE4i4qgqsoriAghwdsPLKIyo8VBGXxQAVhFzlVrnAEFxG5A5qIEkIgFLlmcpHMffVZ1++P6unpzhyZo7tm0vN9v14w09NV9TzVM6n+9lPf5/sorusihBBCCCHERKWOdQeEEEIIIYQYSxIQCyGEEEKICU0CYiGEEEIIMaFJQCyEEEIIISY0CYiFEEIIIcSEJgGxEEIIIYSY0CQgFkIIIYQQE5oExEIIIYQQYkKTgFgIIYQQQkxoEhALIYQQQogJTQJiIYQQQggxoUlALIQQQgghJjQJiIUQQgghxIQmAfE4pev6E7quPzHW/RBCCD/INU8IMZYCY90BMaB58+fPXwi4Y90RIcS4pYx1B/JIrnlCiH0p2DVPRoiFEEIIIcSEJgGxEEIIIYSY0CQgFkIIIYQQE5oExEIIIYQQYkKTgFgIIYQQQkxoEhALIYQQQogJTQJiIYQQQggxoUlALIQQQgghJjQJiMWwOckY0XV/wurYM9ZdEUIIIYQYNQmIxbBF33iS+ObVtD9321h3RQghhBBi1CQgFsNmte8GV1ZXFUII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RPRqSree2oG33BiR+901MbIqiEArL2+1QyHUtl1zX/CP/QsUIKLgFmlS3t67VfyC1eyNVJ32RYF3f2cF55ab/5+7fIzmhUIh/+7d/o6mpiVtuuYUHH3yQr3zlK0yfPh3wZiBfd911rFy5EtPsHY0PBoMcdthhHHroobz88st9jnvllVeyaNEi7rvvPl577TWamppYuXIlK1euJBAIsHTpUr7//e9TUVGRaQfITGgZTFdX16jPO/u2Zn+ySwX63TchxOjIda1/cl3LHwmIxcj4VIc4tXsjuC7xzasLGxArKpnKGU5xlJRbsmQJt9xyC7Zt8/bbb2feOC677DJWr15NJBLhC1/4AkcccQQLFixgzpw5BINBHnzwwX7fOABOO+00TjvtNLq7uzOzsF988UW2bNnCE088QVdXF7fddhvg3aLsedzfbb+xNJ77JoQYmFzXBjae+7Y/kEl1Yj/gUqgybxk9eWeui1skNZazc+l6RhHWrl2bKUv0m9/8huXLl3PGGWcwf/78zEjE7t27+xwrkUjwzjvv8M477wBQXl7ORz7yEZYvX85TTz3FsmXLAHj++eczIw899T4HK6BfX1/Pm2++SWtr62hPd1jGc9+EEAOT69rAxnPf9gcSEIthi77xR2JvPevfanWuW/gR6fTxXdcpmkVHXnzxRcB7A1m0aBHgFXzv0fOzbPF4nD/+8Y9Abm7aAw88wCc+8Qm+9a1v9ft7P+GEEzLf9+zXM0Lx8MMP50xk6WFZFpdddhlnn302N95447DPbzTGc9+EEAOT69rAxnPf9gcSEIthi76+Eqt5K2bTZl/ac/0IiHtb87GtwnBdlz//+c+ZW3ynn34606ZNA+Cggw7KbPerX/0qJ9du06ZNXHTRRZncs3g8nnnujDPOIBgM8u6773L99dcTi8Uyz7W2tvLTn/4UgCOOOILq6moAPv/5z1NXV0dDQwOXXnopu3btytnniiuuYPPmzQSDQS644II8vwqDG899E0L0Jde1fRvPfdsfSA6xGLn0EpqF50eA6vaORO8nI8Q//OEPc8oTgTcCsHPnTlpaWgA
|
||
|
"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",
|
||
|
" \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": 20,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"action = project.require_action(\"stimulus-lfp-response-mec\")"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 21,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/plain": [
|
||
|
"['/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-mec/data/figures/lfp-psd-histogram-stim_energy.png',\n",
|
||
|
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-mec/data/figures/lfp-psd-histogram-stim_strength.png',\n",
|
||
|
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-mec/data/figures/lfp-psd.png',\n",
|
||
|
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-mec/data/figures/lfp-psd-histogram-theta_peak.svg',\n",
|
||
|
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-mec/data/figures/lfp-psd-histogram-stim_p_max.png',\n",
|
||
|
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-mec/data/figures/lfp-psd-histogram-theta_freq.png',\n",
|
||
|
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-mec/data/figures/lfp-psd-histogram-theta_energy.svg',\n",
|
||
|
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-mec/data/figures/lfp-psd-histogram-theta_freq.svg',\n",
|
||
|
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-mec/data/figures/lfp-psd-histogram-stim_half_width.png',\n",
|
||
|
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-mec/data/figures/lfp-psd-histogram-stim_half_width.svg',\n",
|
||
|
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-mec/data/figures/lfp-psd-histogram-theta_half_width.svg',\n",
|
||
|
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-mec/data/figures/lfp-psd-histogram-theta_energy.png',\n",
|
||
|
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-mec/data/figures/lfp-psd-histogram-theta_peak.png',\n",
|
||
|
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-mec/data/figures/lfp-psd-histogram-stim_p_max.svg',\n",
|
||
|
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-mec/data/figures/lfp-psd-histogram-theta_half_width.png',\n",
|
||
|
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-mec/data/figures/lfp-psd.svg',\n",
|
||
|
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-mec/data/figures/lfp-psd-histogram-stim_energy.svg',\n",
|
||
|
" '/media/storage/expipe/septum-mec/actions/stimulus-lfp-response-mec/data/figures/lfp-psd-histogram-stim_strength.svg']"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 21,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"copy_tree(output_path, str(action.data_path()))"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 22,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"septum_mec.analysis.registration.store_notebook(action, \"20_stimulus-lfp-response-mec.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
|
||
|
}
|