Visual Stimuli#

Two possible stimulus sets were used in the Visual Coding - Neuropixels project, known as Brain Observatory 1.1 or Functional Connectivity. The former is largely similar to the visual stimuli used in the Visual Coding 2-photon dataset, with some key adaptations (described below). Each mouse only saw one of these two stimulus sets. It addition to these visual stimuli, an optotagging stimulus was also used in each of these sessions.

Brain Observatory 1.1#

These stimulus consisted of session A and session B from Visual Coding 2-photon merged together, with two additional stimuli: Gabor patches and flashes.

Below is a description of each stimulus family and the corresponding intervals tables in the NWB file.

First, import the necessary packages and load a single session file, unpacking only the intervals container.

import pynwb
import pandas as pd
import numpy as np
import matplotlib as plt
nwb_path = "/data/387858_2018-07-12_13-56-26_nwb_2026-08-19_07-52-55/387858_2018-07-12_13-56-26_nwb_2026-08-19_07-52-55.nwb.zarr"
nwbfile = pynwb.read_nwb(nwb_path)
nwbfile.intervals
{'drifting_gratings_presentations': drifting_gratings_presentations pynwb.epoch.TimeIntervals at 0x140078764992032
 Fields:
   colnames: ['start_time' 'stop_time' 'stimulus_name' 'stimulus_block'
  'temporal_frequency' 'color' 'mask' 'opacity' 'phase' 'size' 'units'
  'stimulus_index' 'orientation' 'spatial_frequency' 'contrast' 'tags'
  'timeseries']
   columns: (
     start_time <class 'hdmf.common.table.VectorData'>,
     stop_time <class 'hdmf.common.table.VectorData'>,
     stimulus_name <class 'hdmf.common.table.VectorData'>,
     stimulus_block <class 'hdmf.common.table.VectorData'>,
     temporal_frequency <class 'hdmf.common.table.VectorData'>,
     color <class 'hdmf.common.table.VectorData'>,
     mask <class 'hdmf.common.table.VectorData'>,
     opacity <class 'hdmf.common.table.VectorData'>,
     phase <class 'hdmf.common.table.VectorData'>,
     size <class 'hdmf.common.table.VectorData'>,
     units <class 'hdmf.common.table.VectorData'>,
     stimulus_index <class 'hdmf.common.table.VectorData'>,
     orientation <class 'hdmf.common.table.VectorData'>,
     spatial_frequency <class 'hdmf.common.table.VectorData'>,
     contrast <class 'hdmf.common.table.VectorData'>,
     tags_index <class 'hdmf.common.table.VectorIndex'>,
     tags <class 'hdmf.common.table.VectorData'>,
     timeseries_index <class 'hdmf.common.table.VectorIndex'>,
     timeseries <class 'pynwb.base.TimeSeriesReferenceVectorData'>
   )
   description: Presentation times and stimuli details for 'drifting_gratings' stimuli
   id: id <class 'hdmf.common.table.ElementIdentifiers'>,
 'flashes_presentations': flashes_presentations pynwb.epoch.TimeIntervals at 0x140078764992416
 Fields:
   colnames: ['start_time' 'stop_time' 'stimulus_name' 'stimulus_block' 'color' 'mask'
  'opacity' 'phase' 'size' 'units' 'stimulus_index' 'orientation'
  'spatial_frequency' 'contrast' 'tags' 'timeseries']
   columns: (
     start_time <class 'hdmf.common.table.VectorData'>,
     stop_time <class 'hdmf.common.table.VectorData'>,
     stimulus_name <class 'hdmf.common.table.VectorData'>,
     stimulus_block <class 'hdmf.common.table.VectorData'>,
     color <class 'hdmf.common.table.VectorData'>,
     mask <class 'hdmf.common.table.VectorData'>,
     opacity <class 'hdmf.common.table.VectorData'>,
     phase <class 'hdmf.common.table.VectorData'>,
     size <class 'hdmf.common.table.VectorData'>,
     units <class 'hdmf.common.table.VectorData'>,
     stimulus_index <class 'hdmf.common.table.VectorData'>,
     orientation <class 'hdmf.common.table.VectorData'>,
     spatial_frequency <class 'hdmf.common.table.VectorData'>,
     contrast <class 'hdmf.common.table.VectorData'>,
     tags_index <class 'hdmf.common.table.VectorIndex'>,
     tags <class 'hdmf.common.table.VectorData'>,
     timeseries_index <class 'hdmf.common.table.VectorIndex'>,
     timeseries <class 'pynwb.base.TimeSeriesReferenceVectorData'>
   )
   description: Presentation times and stimuli details for 'flashes' stimuli
   id: id <class 'hdmf.common.table.ElementIdentifiers'>,
 'gabors_presentations': gabors_presentations pynwb.epoch.TimeIntervals at 0x140078764993280
 Fields:
   colnames: ['start_time' 'stop_time' 'stimulus_name' 'stimulus_block'
  'temporal_frequency' 'x_position' 'y_position' 'color' 'mask' 'opacity'
  'phase' 'size' 'units' 'stimulus_index' 'orientation' 'spatial_frequency'
  'contrast' 'tags' 'timeseries']
   columns: (
     start_time <class 'hdmf.common.table.VectorData'>,
     stop_time <class 'hdmf.common.table.VectorData'>,
     stimulus_name <class 'hdmf.common.table.VectorData'>,
     stimulus_block <class 'hdmf.common.table.VectorData'>,
     temporal_frequency <class 'hdmf.common.table.VectorData'>,
     x_position <class 'hdmf.common.table.VectorData'>,
     y_position <class 'hdmf.common.table.VectorData'>,
     color <class 'hdmf.common.table.VectorData'>,
     mask <class 'hdmf.common.table.VectorData'>,
     opacity <class 'hdmf.common.table.VectorData'>,
     phase <class 'hdmf.common.table.VectorData'>,
     size <class 'hdmf.common.table.VectorData'>,
     units <class 'hdmf.common.table.VectorData'>,
     stimulus_index <class 'hdmf.common.table.VectorData'>,
     orientation <class 'hdmf.common.table.VectorData'>,
     spatial_frequency <class 'hdmf.common.table.VectorData'>,
     contrast <class 'hdmf.common.table.VectorData'>,
     tags_index <class 'hdmf.common.table.VectorIndex'>,
     tags <class 'hdmf.common.table.VectorData'>,
     timeseries_index <class 'hdmf.common.table.VectorIndex'>,
     timeseries <class 'pynwb.base.TimeSeriesReferenceVectorData'>
   )
   description: Presentation times and stimuli details for 'gabors' stimuli
   id: id <class 'hdmf.common.table.ElementIdentifiers'>,
 'invalid_times': invalid_times pynwb.epoch.TimeIntervals at 0x140078764990640
 Fields:
   colnames: ['start_time' 'stop_time' 'tags']
   columns: (
     start_time <class 'hdmf.common.table.VectorData'>,
     stop_time <class 'hdmf.common.table.VectorData'>,
     tags_index <class 'hdmf.common.table.VectorIndex'>,
     tags <class 'hdmf.common.table.VectorData'>
   )
   description: experimental intervals
   id: id <class 'hdmf.common.table.ElementIdentifiers'>,
 'natural_movie_one_presentations': natural_movie_one_presentations pynwb.epoch.TimeIntervals at 0x140078764992560
 Fields:
   colnames: ['start_time' 'stop_time' 'stimulus_name' 'stimulus_block' 'color'
  'opacity' 'size' 'units' 'stimulus_index' 'orientation' 'frame'
  'contrast' 'tags' 'timeseries']
   columns: (
     start_time <class 'hdmf.common.table.VectorData'>,
     stop_time <class 'hdmf.common.table.VectorData'>,
     stimulus_name <class 'hdmf.common.table.VectorData'>,
     stimulus_block <class 'hdmf.common.table.VectorData'>,
     color <class 'hdmf.common.table.VectorData'>,
     opacity <class 'hdmf.common.table.VectorData'>,
     size <class 'hdmf.common.table.VectorData'>,
     units <class 'hdmf.common.table.VectorData'>,
     stimulus_index <class 'hdmf.common.table.VectorData'>,
     orientation <class 'hdmf.common.table.VectorData'>,
     frame <class 'hdmf.common.table.VectorData'>,
     contrast <class 'hdmf.common.table.VectorData'>,
     tags_index <class 'hdmf.common.table.VectorIndex'>,
     tags <class 'hdmf.common.table.VectorData'>,
     timeseries_index <class 'hdmf.common.table.VectorIndex'>,
     timeseries <class 'pynwb.base.TimeSeriesReferenceVectorData'>
   )
   description: Presentation times and stimuli details for 'natural_movie_one' stimuli
   id: id <class 'hdmf.common.table.ElementIdentifiers'>,
 'natural_movie_three_presentations': natural_movie_three_presentations pynwb.epoch.TimeIntervals at 0x140078764995728
 Fields:
   colnames: ['start_time' 'stop_time' 'stimulus_name' 'stimulus_block' 'color'
  'opacity' 'size' 'units' 'stimulus_index' 'orientation' 'frame'
  'contrast' 'tags' 'timeseries']
   columns: (
     start_time <class 'hdmf.common.table.VectorData'>,
     stop_time <class 'hdmf.common.table.VectorData'>,
     stimulus_name <class 'hdmf.common.table.VectorData'>,
     stimulus_block <class 'hdmf.common.table.VectorData'>,
     color <class 'hdmf.common.table.VectorData'>,
     opacity <class 'hdmf.common.table.VectorData'>,
     size <class 'hdmf.common.table.VectorData'>,
     units <class 'hdmf.common.table.VectorData'>,
     stimulus_index <class 'hdmf.common.table.VectorData'>,
     orientation <class 'hdmf.common.table.VectorData'>,
     frame <class 'hdmf.common.table.VectorData'>,
     contrast <class 'hdmf.common.table.VectorData'>,
     tags_index <class 'hdmf.common.table.VectorIndex'>,
     tags <class 'hdmf.common.table.VectorData'>,
     timeseries_index <class 'hdmf.common.table.VectorIndex'>,
     timeseries <class 'pynwb.base.TimeSeriesReferenceVectorData'>
   )
   description: Presentation times and stimuli details for 'natural_movie_three' stimuli
   id: id <class 'hdmf.common.table.ElementIdentifiers'>,
 'natural_scenes_presentations': natural_scenes_presentations pynwb.epoch.TimeIntervals at 0x140078764997264
 Fields:
   colnames: ['start_time' 'stop_time' 'stimulus_name' 'stimulus_block'
  'stimulus_index' 'frame' 'tags' 'timeseries']
   columns: (
     start_time <class 'hdmf.common.table.VectorData'>,
     stop_time <class 'hdmf.common.table.VectorData'>,
     stimulus_name <class 'hdmf.common.table.VectorData'>,
     stimulus_block <class 'hdmf.common.table.VectorData'>,
     stimulus_index <class 'hdmf.common.table.VectorData'>,
     frame <class 'hdmf.common.table.VectorData'>,
     tags_index <class 'hdmf.common.table.VectorIndex'>,
     tags <class 'hdmf.common.table.VectorData'>,
     timeseries_index <class 'hdmf.common.table.VectorIndex'>,
     timeseries <class 'pynwb.base.TimeSeriesReferenceVectorData'>
   )
   description: Presentation times and stimuli details for 'natural_scenes' stimuli
   id: id <class 'hdmf.common.table.ElementIdentifiers'>,
 'spontaneous_presentations': spontaneous_presentations pynwb.epoch.TimeIntervals at 0x140078764996880
 Fields:
   colnames: ['start_time' 'stop_time' 'stimulus_name' 'tags' 'timeseries']
   columns: (
     start_time <class 'hdmf.common.table.VectorData'>,
     stop_time <class 'hdmf.common.table.VectorData'>,
     stimulus_name <class 'hdmf.common.table.VectorData'>,
     tags_index <class 'hdmf.common.table.VectorIndex'>,
     tags <class 'hdmf.common.table.VectorData'>,
     timeseries_index <class 'hdmf.common.table.VectorIndex'>,
     timeseries <class 'pynwb.base.TimeSeriesReferenceVectorData'>
   )
   description: Presentation times and stimuli details for 'spontaneous' stimuli
   id: id <class 'hdmf.common.table.ElementIdentifiers'>,
 'static_gratings_presentations': static_gratings_presentations pynwb.epoch.TimeIntervals at 0x140078764997408
 Fields:
   colnames: ['start_time' 'stop_time' 'stimulus_name' 'stimulus_block' 'color' 'mask'
  'opacity' 'phase' 'size' 'units' 'stimulus_index' 'orientation'
  'spatial_frequency' 'contrast' 'tags' 'timeseries']
   columns: (
     start_time <class 'hdmf.common.table.VectorData'>,
     stop_time <class 'hdmf.common.table.VectorData'>,
     stimulus_name <class 'hdmf.common.table.VectorData'>,
     stimulus_block <class 'hdmf.common.table.VectorData'>,
     color <class 'hdmf.common.table.VectorData'>,
     mask <class 'hdmf.common.table.VectorData'>,
     opacity <class 'hdmf.common.table.VectorData'>,
     phase <class 'hdmf.common.table.VectorData'>,
     size <class 'hdmf.common.table.VectorData'>,
     units <class 'hdmf.common.table.VectorData'>,
     stimulus_index <class 'hdmf.common.table.VectorData'>,
     orientation <class 'hdmf.common.table.VectorData'>,
     spatial_frequency <class 'hdmf.common.table.VectorData'>,
     contrast <class 'hdmf.common.table.VectorData'>,
     tags_index <class 'hdmf.common.table.VectorIndex'>,
     tags <class 'hdmf.common.table.VectorData'>,
     timeseries_index <class 'hdmf.common.table.VectorIndex'>,
     timeseries <class 'pynwb.base.TimeSeriesReferenceVectorData'>
   )
   description: Presentation times and stimuli details for 'static_gratings' stimuli
   id: id <class 'hdmf.common.table.ElementIdentifiers'>}

All tables share a common set of timing columns and add a stimulus-specific set of parameter columns.

Common columns#

Column

Description

start_time

Start time of the stimulus (s)

stop_time

Stop time of the stimulus (s)

stimulus_name

Name of the stimulus family

stimulus_block

Index of the contiguous block of trials this presentation belongs to

stimulus_index

Global index of the presentation within the session

tags

User-defined tags

timeseries

References to associated timeseries

Drifting gratings#

The drifting gratings stimulus consists of a sinusoidal grating that is presented on the monitor that moves orthogonal to the orientation of the grating, moving in one of 8 directions (called orientation) and at one of 5 temporal frequencies. The directions are specified in units of degrees and temporal frequency in Hz. The grating has a spatial frequency of 0.04 cycles per degree and a contrast of 80%. Each trial is presented for 2 seconds with 1 second of mean luminance gray in between trials.

Column

Description

orientation

Grating drift direction (deg)

temporal_frequency

Drift rate (Hz)

spatial_frequency

Grating spatial frequency (cyc/deg)

contrast

Stimulus contrast

phase

Spatial phase of the grating

color

Stimulus color

mask

Shape of mask applied to stimulus

opacity

Stimulus opacity [0-1]

size

Size of stimulus

units

Units of size

drifting_gratings = nwbfile.intervals["drifting_gratings_presentations"].to_dataframe()
drifting_gratings.head()
start_time stop_time stimulus_name stimulus_block temporal_frequency color mask opacity phase size units stimulus_index orientation spatial_frequency contrast tags timeseries
id
0 1591.133857 1593.135537 drifting_gratings 2.0 2.0 [1.0, 1.0, 1.0] None 1.0 [42423.86666667, 42423.86666667] [250.0, 250.0] deg 2.0 315.0 0.04 0.8 [stimulus_time_interval] [(3798, 1, timestamps pynwb.base.TimeSeries at...
1 1594.136403 1596.138053 drifting_gratings 2.0 4.0 [1.0, 1.0, 1.0] None 1.0 [42423.86666667, 42423.86666667] [250.0, 250.0] deg 2.0 135.0 0.04 0.8 [stimulus_time_interval] [(3799, 1, timestamps pynwb.base.TimeSeries at...
2 1597.138897 1599.140577 drifting_gratings 2.0 15.0 [1.0, 1.0, 1.0] None 1.0 [42423.86666667, 42423.86666667] [250.0, 250.0] deg 2.0 225.0 0.04 0.8 [stimulus_time_interval] [(3800, 1, timestamps pynwb.base.TimeSeries at...
3 1600.141393 1602.143063 drifting_gratings 2.0 4.0 [1.0, 1.0, 1.0] None 1.0 [42423.86666667, 42423.86666667] [250.0, 250.0] deg 2.0 270.0 0.04 0.8 [stimulus_time_interval] [(3801, 1, timestamps pynwb.base.TimeSeries at...
4 1603.143897 1605.145547 drifting_gratings 2.0 4.0 [1.0, 1.0, 1.0] None 1.0 [42423.86666667, 42423.86666667] [250.0, 250.0] deg 2.0 90.0 0.04 0.8 [stimulus_time_interval] [(3802, 1, timestamps pynwb.base.TimeSeries at...

Static gratings#

The static gratings stimulus consists of a stationary sinusoidal grating that is flasshed on the monitor at one of 6 orientations, one of 5 spatial frequencies, and one of 4 phases. The grating has a contrast of 80%. Each trial is presented for 0.25 seconds and followed immediately by the next trial without any intertrial interval. There are blanksweeps, where the grating is replaced by the mean luminance gray, interleaved among the trials.

Column

Description

orientation

Grating drift direction (deg)

temporal_frequency

Drift rate (Hz)

spatial_frequency

Grating spatial frequency (cyc/deg)

contrast

Stimulus contrast

phase

Spatial phase of the grating

color

Stimulus color

mask

Shape of mask applied to stimulus

opacity

Stimulus opacity [0-1]

size

Size of stimulus

units

Units of size

static_gratings = nwbfile.intervals["static_gratings_presentations"].to_dataframe()
static_gratings.head()
start_time stop_time stimulus_name stimulus_block color mask opacity phase size units stimulus_index orientation spatial_frequency contrast tags timeseries
id
0 5398.313257 5398.563476 static_gratings 8.0 [1.0, 1.0, 1.0] None 1.0 0.5 [250.0, 250.0] deg 6.0 0.0 0.16 0.8 [stimulus_time_interval] [(49432, 1, timestamps pynwb.base.TimeSeries a...
1 5398.563476 5398.813695 static_gratings 8.0 [1.0, 1.0, 1.0] None 1.0 0.0 [250.0, 250.0] deg 6.0 0.0 0.04 0.8 [stimulus_time_interval] [(49433, 1, timestamps pynwb.base.TimeSeries a...
2 5398.813695 5399.063914 static_gratings 8.0 [1.0, 1.0, 1.0] None 1.0 0.5 [250.0, 250.0] deg 6.0 90.0 0.02 0.8 [stimulus_time_interval] [(49434, 1, timestamps pynwb.base.TimeSeries a...
3 5399.063914 5399.314133 static_gratings 8.0 [1.0, 1.0, 1.0] None 1.0 0.75 [250.0, 250.0] deg 6.0 150.0 0.04 0.8 [stimulus_time_interval] [(49435, 1, timestamps pynwb.base.TimeSeries a...
4 5399.314133 5399.564339 static_gratings 8.0 [1.0, 1.0, 1.0] None 1.0 0.0 [250.0, 250.0] deg 6.0 30.0 0.02 0.8 [stimulus_time_interval] [(49436, 1, timestamps pynwb.base.TimeSeries a...

What is the phase of the grating?

The phase refers to the relative position of the grating. Phase 0 and Phase 0.5 are 180° apart so that the peak of the grating of phase 0 lines up with the trough of phase 0.5.

phase

Natural scenes#

The natural scenes stimulus consists of a 118 black and white images that are flashed on the monitor. Each trial is presented for 0.25 seconds and followed immediately by the next trial without any intertrial interval. There are blanksweeps, where the images are replaced by the mean luminance gray, interleaved in among the trials.

Column

Description

frame

Index of the natural-scene image presented on this trial

natural_scenes = nwbfile.intervals["natural_scenes_presentations"].to_dataframe()
natural_scenes.head()
start_time stop_time stimulus_name stimulus_block stimulus_index frame tags timeseries
id
0 5908.739537 5908.989739 natural_scenes 9.0 5.0 34.0 [stimulus_time_interval] [(51353, 1, timestamps pynwb.base.TimeSeries a...
1 5908.989739 5909.239940 natural_scenes 9.0 5.0 6.0 [stimulus_time_interval] [(51354, 1, timestamps pynwb.base.TimeSeries a...
2 5909.239940 5909.490142 natural_scenes 9.0 5.0 28.0 [stimulus_time_interval] [(51355, 1, timestamps pynwb.base.TimeSeries a...
3 5909.490142 5909.740343 natural_scenes 9.0 5.0 109.0 [stimulus_time_interval] [(51356, 1, timestamps pynwb.base.TimeSeries a...
4 5909.740343 5909.990554 natural_scenes 9.0 5.0 105.0 [stimulus_time_interval] [(51357, 1, timestamps pynwb.base.TimeSeries a...

Natural movies#

Short natural movie clips presented multiple times. natural_movie_one and natural_movie_three are two different clips. Each row corresponds to one frame of the movie.

Column

Description

frame

Frame index within the movie clip

natural_movie_one = nwbfile.intervals["natural_movie_one_presentations"].to_dataframe()
natural_movie_one.head()
start_time stop_time stimulus_name stimulus_block color opacity size units stimulus_index orientation frame contrast tags timeseries
id
0 2852.187037 2852.220398 natural_movie_one 4.0 [1.0, 1.0, 1.0] 1.0 [1920.0, 1080.0] pix 3.0 0.0 0.0 1.0 [stimulus_time_interval] [(22000, 1, timestamps pynwb.base.TimeSeries a...
1 2852.220398 2852.253758 natural_movie_one 4.0 [1.0, 1.0, 1.0] 1.0 [1920.0, 1080.0] pix 3.0 0.0 1.0 1.0 [stimulus_time_interval] [(22001, 1, timestamps pynwb.base.TimeSeries a...
2 2852.253758 2852.287119 natural_movie_one 4.0 [1.0, 1.0, 1.0] 1.0 [1920.0, 1080.0] pix 3.0 0.0 2.0 1.0 [stimulus_time_interval] [(22002, 1, timestamps pynwb.base.TimeSeries a...
3 2852.287119 2852.320479 natural_movie_one 4.0 [1.0, 1.0, 1.0] 1.0 [1920.0, 1080.0] pix 3.0 0.0 3.0 1.0 [stimulus_time_interval] [(22003, 1, timestamps pynwb.base.TimeSeries a...
4 2852.320479 2852.353840 natural_movie_one 4.0 [1.0, 1.0, 1.0] 1.0 [1920.0, 1080.0] pix 3.0 0.0 4.0 1.0 [stimulus_time_interval] [(22004, 1, timestamps pynwb.base.TimeSeries a...

Gabor patches#

Small Gabor patches presented at a grid of positions on the monitor. Used to map each unit’s spatial receptive field.

Column

Description

x_position

Horizontal position of the Gabor on the monitor (deg)

y_position

Vertical position of the Gabor on the monitor (deg)

orientation

Gabor orientation (deg)

spatial_frequency

Gabor spatial frequency (cyc/deg)

temporal_frequency

Gabor temporal frequency (Hz)

contrast

Stimulus contrast

size

Gabor patch size (deg)

gabors = nwbfile.intervals["gabors_presentations"].to_dataframe()
gabors.head()
start_time stop_time stimulus_name stimulus_block temporal_frequency x_position y_position color mask opacity phase size units stimulus_index orientation spatial_frequency contrast tags timeseries
id
0 89.896827 90.130356 gabors 0.0 4.0 10.0 -10.0 [1.0, 1.0, 1.0] circle 1.0 [3644.93333333, 3644.93333333] [20.0, 20.0] deg 0.0 0.0 0.08 0.8 [stimulus_time_interval] [(1, 1, timestamps pynwb.base.TimeSeries at 0x...
1 90.130356 90.380565 gabors 0.0 4.0 -30.0 20.0 [1.0, 1.0, 1.0] circle 1.0 [3644.93333333, 3644.93333333] [20.0, 20.0] deg 0.0 90.0 0.08 0.8 [stimulus_time_interval] [(2, 1, timestamps pynwb.base.TimeSeries at 0x...
2 90.380565 90.630774 gabors 0.0 4.0 20.0 -20.0 [1.0, 1.0, 1.0] circle 1.0 [3644.93333333, 3644.93333333] [20.0, 20.0] deg 0.0 0.0 0.08 0.8 [stimulus_time_interval] [(3, 1, timestamps pynwb.base.TimeSeries at 0x...
3 90.630774 90.880983 gabors 0.0 4.0 30.0 20.0 [1.0, 1.0, 1.0] circle 1.0 [3644.93333333, 3644.93333333] [20.0, 20.0] deg 0.0 90.0 0.08 0.8 [stimulus_time_interval] [(4, 1, timestamps pynwb.base.TimeSeries at 0x...
4 90.880983 91.131199 gabors 0.0 4.0 0.0 -40.0 [1.0, 1.0, 1.0] circle 1.0 [3644.93333333, 3644.93333333] [20.0, 20.0] deg 0.0 90.0 0.08 0.8 [stimulus_time_interval] [(5, 1, timestamps pynwb.base.TimeSeries at 0x...

Flashes#

Full-field ON/OFF luminance flashes. Used to characterize ON/OFF responses.

flashes = nwbfile.intervals["flashes_presentations"].to_dataframe()
flashes.head()
start_time stop_time stimulus_name stimulus_block color mask opacity phase size units stimulus_index orientation spatial_frequency contrast tags timeseries
id
0 1290.883097 1291.133309 flashes 1.0 -1.0 None 1.0 [0.0, 0.0] [300.0, 300.0] deg 1.0 0.0 [0.0, 0.0] 0.8 [stimulus_time_interval] [(3647, 1, timestamps pynwb.base.TimeSeries at...
1 1292.884817 1293.135016 flashes 1.0 1.0 None 1.0 [0.0, 0.0] [300.0, 300.0] deg 1.0 0.0 [0.0, 0.0] 0.8 [stimulus_time_interval] [(3648, 1, timestamps pynwb.base.TimeSeries at...
2 1294.886487 1295.136691 flashes 1.0 1.0 None 1.0 [0.0, 0.0] [300.0, 300.0] deg 1.0 0.0 [0.0, 0.0] 0.8 [stimulus_time_interval] [(3649, 1, timestamps pynwb.base.TimeSeries at...
3 1296.888137 1297.138344 flashes 1.0 1.0 None 1.0 [0.0, 0.0] [300.0, 300.0] deg 1.0 0.0 [0.0, 0.0] 0.8 [stimulus_time_interval] [(3650, 1, timestamps pynwb.base.TimeSeries at...
4 1298.889787 1299.140004 flashes 1.0 -1.0 None 1.0 [0.0, 0.0] [300.0, 300.0] deg 1.0 0.0 [0.0, 0.0] 0.8 [stimulus_time_interval] [(3651, 1, timestamps pynwb.base.TimeSeries at...

Spontaneous activity#

Blocks of gray-screen activity presented between stimulus families. Used as a reference for baseline firing.

spontaneous = nwbfile.intervals["spontaneous_presentations"].to_dataframe()
spontaneous.head()
start_time stop_time stimulus_name tags timeseries
id
0 29.830107 89.896827 spontaneous [stimulus_time_interval] [(0, 1, timestamps pynwb.base.TimeSeries at 0x...
1 1001.891772 1290.883097 spontaneous [stimulus_time_interval] [(3646, 1, timestamps pynwb.base.TimeSeries at...
2 1589.382401 1591.133857 spontaneous [stimulus_time_interval] [(3797, 1, timestamps pynwb.base.TimeSeries at...
3 2190.634543 2221.660447 spontaneous [stimulus_time_interval] [(3998, 1, timestamps pynwb.base.TimeSeries at...
4 2822.161967 2852.187037 spontaneous [stimulus_time_interval] [(21999, 1, timestamps pynwb.base.TimeSeries a...

Invalid times#

Intervals during which the recording is considered unreliable and should be excluded from analysis.

invalid_times = nwbfile.intervals["invalid_times"].to_dataframe()
invalid_times.head()
start_time stop_time tags
id
0 970.0 982.0 [EcephysSession, 719161530, stimulus]

Functional Connectivity#

https://allensdk.readthedocs.io/en/latest/_static/neuropixels_stimulus_sets.png

Fig. 19 Neuropixels visual stimulus sets#