From eb41a3157c79c31120926ea65be8d2d41e926df0 Mon Sep 17 00:00:00 2001 From: Gaelle Date: Tue, 24 Oct 2023 12:38:59 +0200 Subject: [PATCH] doc raw data probe geometry --- .../loading_data/loading_raw_ephys_data.ipynb | 57 +++++++++---------- 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/examples/loading_data/loading_raw_ephys_data.ipynb b/examples/loading_data/loading_raw_ephys_data.ipynb index 9394b675e..56716f450 100644 --- a/examples/loading_data/loading_raw_ephys_data.ipynb +++ b/examples/loading_data/loading_raw_ephys_data.ipynb @@ -152,7 +152,7 @@ "\n", "# Use spikeglx reader to read in the whole raw data\n", "sr = spikeglx.Reader(bin_file)\n", - "sr.shape\n" + "print(sr.shape)" ] }, { @@ -328,57 +328,56 @@ }, { "cell_type": "markdown", - "id": "723df072", - "metadata": {}, "source": [ "## Get the probe geometry" - ] + ], + "metadata": { + "collapsed": false + } }, { "cell_type": "markdown", - "id": "35a0db60", - "metadata": {}, "source": [ "### Using the `eid` and `probe` information" - ] + ], + "metadata": { + "collapsed": false + } }, { "cell_type": "code", "execution_count": null, - "id": "c2335beb", - "metadata": {}, "outputs": [], "source": [ "from brainbox.io.one import load_channel_locations\n", - "from one.api import ONE\n", - "import spikeglx\n", - "import numpy as np\n", - "one = ONE()\n", - "\n", - "pid = 'da8dfec1-d265-44e8-84ce-6ae9c109b8bd'\n", - "eid, probe = one.pid2eid(pid)\n", - "channels = load_channel_locations(eid, probe)[probe]\n", - "channel_geometry = np.c_[channels['axial_um'], channels['lateral_um']]" - ] + "channels = load_channel_locations(eid, probe)\n", + "channels[probe][\"localCoordinates\"]" + ], + "metadata": { + "collapsed": false + } }, { "cell_type": "markdown", - "id": "360f668c", - "metadata": {}, "source": [ "### Using the reader and the `.cbin` file" - ] + ], + "metadata": { + "collapsed": false + } }, { "cell_type": "code", "execution_count": null, - "id": "763d6ac8", - "metadata": {}, "outputs": [], "source": [ - "sr = spikeglx.Reader(bin_file)\n", + "# You would have loaded the bin file as per the loading example above\n", + "# sr = spikeglx.Reader(bin_file)\n", "sr.geometry" - ] + ], + "metadata": { + "collapsed": false + } }, { "cell_type": "markdown", @@ -397,9 +396,9 @@ "metadata": { "celltoolbar": "Edit Metadata", "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "Python [conda env:iblenv] *", "language": "python", - "name": "python3" + "name": "conda-env-iblenv-py" }, "language_info": { "codemirror_mode": { @@ -411,7 +410,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.16" + "version": "3.9.7" } }, "nbformat": 4,