Skip to content

Commit

Permalink
Merge branch 'docs' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
oliche committed Dec 10, 2024
2 parents 3c82b30 + 941287f commit cd94130
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 193 deletions.
34 changes: 29 additions & 5 deletions examples/exploring_data/data_download.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
"source": [
"## Installation\n",
"### Environment\n",
"To use IBL data you will need a python environment with python > 3.8. To create a new environment from scratch you can install [anaconda](https://www.anaconda.com/products/distribution#download-section) and follow the instructions below to create a new python environment (more information can also be found [here](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html))\n",
"To use IBL data you will need a python environment with python > 3.10, although Python 3.12 is recommended. To create a new environment from scratch you can install [anaconda](https://www.anaconda.com/products/distribution#download-section) and follow the instructions below to create a new python environment (more information can also be found [here](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html))\n",
"\n",
"```\n",
"conda create --name ibl python=3.11\n",
"conda create --name ibl python=3.12\n",
"```\n",
"Make sure to always activate this environment before installing or working with the IBL data\n",
"```\n",
Expand Down Expand Up @@ -138,9 +138,33 @@
"outputs": [],
"source": [
"# Each session is represented by a unique experiment id (eID)\n",
"print(sessions[0])"
"print(sessions[0],)"
]
},
{
"metadata": {},
"cell_type": "markdown",
"source": [
"### Find recordings of a specific brain region\n",
"If we are interested in a given brain region, we can use the `search_insertions` method to find all recordings associated with that region. For example, to find all recordings associated with the **Rhomboid Nucleus (RH)** region of the thalamus."
]
},
{
"metadata": {},
"cell_type": "code",
"source": [
"# this is the query that yields the few recordings for the Rhomboid Nucleus (RH) region\n",
"insertions_rh = one.search_insertions(atlas_acronym='RH', datasets='spikes.times.npy', project='brainwide')\n",
"\n",
"# if we want to extend the search to all thalamic regions, we can do the following\n",
"insertions_th = one.search_insertions(atlas_acronym='TH', datasets='spikes.times.npy', project='brainwide')\n",
"\n",
"# the Allen brain regions parcellation is hierarchical, and searching for Thalamus will return all child Rhomboid Nucleus (RH) regions\n",
"assert set(insertions_rh).issubset(set(insertions_th))\n"
],
"outputs": [],
"execution_count": null
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -402,9 +426,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.16"
"version": "3.11.9"
}
},
"nbformat": 4,
"nbformat_minor": 1
"nbformat_minor": 4
}
184 changes: 0 additions & 184 deletions examples/loading_data/loading_spike_waveforms.ipynb

This file was deleted.

10 changes: 6 additions & 4 deletions examples/loading_data/loading_spikesorting_data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
"## Relevant Alf objects\n",
"* channels\n",
"* clusters\n",
"* spikes"
"* spikes\n",
"* waveforms"
]
},
{
Expand Down Expand Up @@ -74,9 +75,10 @@
"outputs": [],
"source": [
"pid = 'da8dfec1-d265-44e8-84ce-6ae9c109b8bd' \n",
"sl = SpikeSortingLoader(pid=pid, one=one)\n",
"spikes, clusters, channels = sl.load_spike_sorting()\n",
"clusters = sl.merge_clusters(spikes, clusters, channels)"
"ssl = SpikeSortingLoader(pid=pid, one=one)\n",
"spikes, clusters, channels = ssl.load_spike_sorting()\n",
"clusters = ssl.merge_clusters(spikes, clusters, channels)\n",
"waveforms = ssl.load_spike_sorting_object('waveforms') # loads in the template waveforms"
]
},
{
Expand Down

0 comments on commit cd94130

Please sign in to comment.