From 51da47e61f20dc902fb20c1ad7c391fcfbced033 Mon Sep 17 00:00:00 2001 From: Alessio Buccino Date: Tue, 29 Apr 2025 10:33:19 +0200 Subject: [PATCH] Update allen notebook --- .../generate_recordings_with_allen_models.ipynb | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/notebooks/generate_recordings_with_allen_models.ipynb b/notebooks/generate_recordings_with_allen_models.ipynb index a376d56..e7856bb 100644 --- a/notebooks/generate_recordings_with_allen_models.ipynb +++ b/notebooks/generate_recordings_with_allen_models.ipynb @@ -38,7 +38,8 @@ "import json\n", "import matplotlib.pylab as plt\n", "from pprint import pprint\n", - "%matplotlib notebook" + "\n", + "%matplotlib inline" ] }, { @@ -141,7 +142,11 @@ " ax_xz = fig.add_subplot(2,2,2) \n", " ax_yz = fig.add_subplot(2,2,3) \n", " \n", - " for i, (xs, xe, ys, ye, zs, ze) in enumerate(zip(cell.xstart, cell.xend, cell.ystart, cell.yend, cell.zstart, cell.zend)):\n", + " for i in range(len(cell.x)):\n", + " xs, xe = cell.x[i][0], cell.x[i][-1]\n", + " ys, ye = cell.y[i][0], cell.y[i][-1]\n", + " zs, ze = cell.z[i][0], cell.z[i][-1]\n", + " \n", " if i in cell.get_idx('soma'):\n", " ax_xy.plot([xs, xe], [ys, ye], color='k', lw=5)\n", " ax_xz.plot([xs, xe], [zs, ze], color='k', lw=5)\n", @@ -585,9 +590,7 @@ { "cell_type": "code", "execution_count": null, - "metadata": { - "scrolled": false - }, + "metadata": {}, "outputs": [], "source": [ "ax_st = mr.plot_rasters(recgen.spiketrains)\n", @@ -628,9 +631,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.13" + "version": "3.12.9" } }, "nbformat": 4, - "nbformat_minor": 2 + "nbformat_minor": 4 }