{ "cells": [ { "cell_type": "markdown", "id": "modified-broadway", "metadata": {}, "source": [ "# Exploring the public IBL data with ONE\n", "This tutorial will give an introduction into the publicly available data and show how to download\n", "electrophysiology data for a probe insertion and display a simple raster plot" ] }, { "cell_type": "markdown", "id": "narrative-chamber", "metadata": {}, "source": [ "First let's get started by importing the ONE module and connecting to the database" ] }, { "cell_type": "code", "execution_count": 7, "id": "unable-concentrate", "metadata": { "execution": { "iopub.execute_input": "2021-09-07T19:19:10.919690Z", "iopub.status.busy": "2021-09-07T19:19:10.918208Z", "iopub.status.idle": "2021-09-07T19:19:12.136846Z", "shell.execute_reply": "2021-09-07T19:19:12.136846Z" } }, "outputs": [], "source": [ "# Import one and connect to the database\n", "from one.api import ONE\n", "one = ONE(base_url='https://openalyx.internationalbrainlab.org', silent=True)" ] }, { "cell_type": "markdown", "id": "monthly-alcohol", "metadata": {}, "source": [ "We want to see what probe insertions are available on the database. To list them we can use the following command" ] }, { "cell_type": "code", "execution_count": 8, "id": "varying-occupation", "metadata": { "execution": { "iopub.execute_input": "2021-09-07T19:19:12.144967Z", "iopub.status.busy": "2021-09-07T19:19:12.144967Z", "iopub.status.idle": "2021-09-07T19:19:12.493081Z", "shell.execute_reply": "2021-09-07T19:19:12.492003Z" } }, "outputs": [], "source": [ "eid = one.search()[0]\n", "probe_insertions = one.load_dataset(eid, 'probes.description')" ] }, { "cell_type": "markdown", "id": "italian-snapshot", "metadata": {}, "source": [ "We can find the number of probes insertions available and some information about the first probe" ] }, { "cell_type": "code", "execution_count": 9, "id": "devoted-radius", "metadata": { "execution": { "iopub.execute_input": "2021-09-07T19:19:12.501377Z", "iopub.status.busy": "2021-09-07T19:19:12.501121Z", "iopub.status.idle": "2021-09-07T19:19:12.525681Z", "shell.execute_reply": "2021-09-07T19:19:12.525681Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "N probes = 2\n", "{'label': 'probe00',\n", " 'model': '3B2',\n", " 'raw_file_name': 'D:/iblrig_data/Subjects/SWC_043/2020-09-21/001/raw_ephys_data/_spikeglx_ephysData_g0/_spikeglx_ephysData_g0_imec0/_spikeglx_ephysData_g0_t0.imec0.ap.bin',\n", " 'serial': 19108320031}\n" ] } ], "source": [ "from pprint import pprint\n", "print(f'N probes = {len(probe_insertions)}')\n", "pprint(probe_insertions[0])" ] }, { "cell_type": "markdown", "id": "expected-effort", "metadata": {}, "source": [ "Datasets associated with each probe insertion are contained within a collection named\n", "'alf/