Brain Observatory Stimuli

The next few sections will describe how to understand the various stimulus tables present in the NWB file. First, here is a function we can use to plot when a given stimulus condition is on the screen. We'll use this further down.

Download this notebook in .ipynb format here.

Drifting Gratings

The drifting gratings stimulus describes the temporal frequency and direction of motion of the displayed grating. We can use this information to figure out when a given stimulus condition (temporal frequency + orientation) is visible during the experiment.

Static Gratings Stimulus

This stimulus table is very similar to the drifting grating stimulus table. Static gratings have three parameters: spatial frequency, orientation, and phase. We can make a similar plot to identify frame ranges with a given paramerization.

Natural Scenes Stimulus

The natural scene stimulus is simply a series of static images. The natural scene template section of the NWB file contains the array of images.

The natural scenes stimulus table just describes when a given scene is on the screen. We can use this to find when the images above are visible.

Natural Movie Stimulus

The natural movie stimulus is very similar to the natural scene stimulus in terms of data structures. Let's take a look at one frame of the "natural_movie_one" clip.

We can now take a look at the stimulus table to see when a given frame (or range of frames) is played to the mouse. Here you can see that there are 10 repetitions of the video.

Locally Sparse Noise Stimulus

This is essentially a 28x16 pixel movie, so it is again similar to the natural movie and natural scene stimuli. One extra complication is that a nontrivial number of pixels from the movie are pushed off screen after warping the stimulus, so we provide some helper utilities to identify these pixels.

We can now take a look at the movie to determine the frame numbers for which a given grid location is 'on' or 'off' in the movie.