{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## Brain Observatory Monitor\n", "This notebook demonstrates how to query an BrainObservatoryDataNwbDataSet object to find out what type of stimulus was on the monitor at a given acquisiton frame during an experiment, and align that stimulus on the monitor with stimulus templates from other parts of a session (or other sessions in a container)." ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": true }, "outputs": [], "source": [ "%matplotlib inline\n", "\n", "import matplotlib.pyplot as plt\n", "import pandas as pd\n", "import numpy as np\n", "import allensdk.brain_observatory.stimulus_info as si\n", "from allensdk.core.brain_observatory_cache import BrainObservatoryCache\n", "boc = BrainObservatoryCache(manifest_file='boc/manifest.json')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This dataframe summarizes the epochs of the experiment, and their start and end acquisition frames:" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | stimulus | \n", "start | \n", "end | \n", "
---|---|---|---|
0 | \n", "locally_sparse_noise | \n", "742 | \n", "22417 | \n", "
1 | \n", "spontaneous | \n", "22567 | \n", "31449 | \n", "
2 | \n", "natural_movie_one | \n", "31450 | \n", "40479 | \n", "
3 | \n", "locally_sparse_noise | \n", "41385 | \n", "63058 | \n", "
4 | \n", "natural_movie_two | \n", "63962 | \n", "72991 | \n", "
5 | \n", "spontaneous | \n", "73141 | \n", "82023 | \n", "
6 | \n", "locally_sparse_noise | \n", "82024 | \n", "105502 | \n", "