{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "ExecuteTime": { "end_time": "2019-03-15T21:37:13.941144Z", "start_time": "2019-03-15T21:37:11.881901Z" } }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/mnt/cube/tsainbur/conda_envs/tpy3/lib/python3.6/site-packages/tqdm/autonotebook/__init__.py:14: TqdmExperimentalWarning: Using `tqdm.autonotebook.tqdm` in notebook mode. Use `tqdm.tqdm` instead to force console mode (e.g. in jupyter console)\n", " \" (e.g. in jupyter console)\", TqdmExperimentalWarning)\n" ] } ], "source": [ "from birdbrain.atlas import atlas\n", "from birdbrain.utils import um_to_vox\n", "import numpy as np\n", "from birdbrain.visualization.plotting_2d import widget_controllers_2d" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Load data, create atlas object" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "ExecuteTime": { "end_time": "2019-03-15T21:37:13.951039Z", "start_time": "2019-03-15T21:37:13.948112Z" } }, "outputs": [], "source": [ "regions_to_smooth = ['Arcopallium', 'Auditory1', 'Auditory2', 'Olfactory',\n", " 'Somatosensory_spinal_system_and_body_representation',\n", " 'Somatosensory_trigeminal', 'Somatosensory_wulst', 'Visual_aos',\n", " 'Visual_isthmic', 'Visual_thalamofugal', 'Visual_wulst'] + ['Brain']" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "ExecuteTime": { "end_time": "2019-03-15T21:37:50.612270Z", "start_time": "2019-03-15T21:37:13.952633Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Data already download\n", "Getting voxel data from .img files...\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(IntProgress(value=0, max=4), HTML(value='')))" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\r" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(IntProgress(value=0, max=6), HTML(value='')))" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\r" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(IntProgress(value=0, max=3), HTML(value='')))" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\r" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(IntProgress(value=0, max=3), HTML(value='')))" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\r" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(IntProgress(value=0, max=3), HTML(value='')))" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\r" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(IntProgress(value=0, max=2), HTML(value='')))" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\r" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(IntProgress(value=0, max=2), HTML(value='')))" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\r" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(IntProgress(value=0, max=2), HTML(value='')))" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\r" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(IntProgress(value=0, max=3), HTML(value='')))" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\r" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(IntProgress(value=0, max=3), HTML(value='')))" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\r" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(IntProgress(value=0, max=2), HTML(value='')))" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\r" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(IntProgress(value=0, max=1), HTML(value='')))" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\r", "Getting location for each nucleus/region from voxel data...\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(IntProgress(value=0, max=32), HTML(value='')))" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\r", "Atlas created\n" ] } ], "source": [ "dset_dir = '../../data/processed/pigeon/'\n", "\n", "pigeon_atlas = atlas(\n", " species = 'pigeon',\n", " dset_dir = dset_dir,\n", " um_mult = 1,\n", " smoothing = regions_to_smooth,\n", " updated_y_sinus = [0, 0, 0]\n", ")" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "ExecuteTime": { "end_time": "2019-03-15T21:41:10.194904Z", "start_time": "2019-03-15T21:41:10.177664Z" } }, "outputs": [ { "data": { "text/html": [ "
| \n", " | type_ | \n", "
|---|---|
| Slu-ipc-imc-left | \n", "Slu-ipc-imc-left | \n", "
| Rotundus | \n", "Rotundus | \n", "
| Tectum-right | \n", "Tectum-right | \n", "
| Wulst_ha_hi_hd-frontal-from-a13 | \n", "Wulst_ha_hi_hd-frontal-from-a13 | \n", "
| Gld-and-rotundus | \n", "Gld-and-rotundus | \n", "
| Nbor-lentiformis-mesencephali | \n", "Nbor-lentiformis-mesencephali | \n", "
| Isthmo-opticus | \n", "Isthmo-opticus | \n", "
| Gc_dlp_diva | \n", "Gc_dlp_diva | \n", "
| Entopallium | \n", "Entopallium | \n", "
| Prv-and-basalis | \n", "Prv-and-basalis | \n", "
| Nucleus-taeniae | \n", "Nucleus-taeniae | \n", "
| Slu-ipc-imc-right | \n", "Slu-ipc-imc-right | \n", "
| N-pontis-medialis | \n", "N-pontis-medialis | \n", "
| Brainsurface_right | \n", "Brainsurface_right | \n", "
| Tectum-left | \n", "Tectum-left | \n", "
| Brainsurface_left | \n", "Brainsurface_left | \n", "
| Visual-wulst_ha_hi_hd-until-a13 | \n", "Visual-wulst_ha_hi_hd-until-a13 | \n", "
| Ct | \n", "Ct | \n", "
| T2 | \n", "T2 | \n", "
| T2star | \n", "T2star | \n", "
| Auditory1 | \n", "Auditory1 | \n", "
| Auditory2 | \n", "Auditory2 | \n", "
| Olfactory | \n", "Olfactory | \n", "
| Visual_thalamofugal | \n", "Visual_thalamofugal | \n", "
| Somatosensory_wulst | \n", "Somatosensory_wulst | \n", "
| Somatosensory_spinal_system_and_body_representation | \n", "Somatosensory_spinal_system_and_body_represent... | \n", "
| Somatosensory_trigeminal | \n", "Somatosensory_trigeminal | \n", "
| Hippocampus | \n", "Hippocampus | \n", "
| Visual_isthmic | \n", "Visual_isthmic | \n", "
| Arcopallium | \n", "Arcopallium | \n", "
| Visual_wulst | \n", "Visual_wulst | \n", "
| Visual_aos | \n", "Visual_aos | \n", "
| Brain | \n", "Brain | \n", "
| Nucleus_taeniae | \n", "Nucleus_taeniae | \n", "
| Visual_tectofugal | \n", "Visual_tectofugal | \n", "