Notes, assignments, and code for NEUROBIO 735 (Spring 2018).
1/10 – 2/8:
Wednesday, Thursday
3:00 – 4:30
DIBS conference room
Image data in neurobiology can be broadly divided into two types:
This week’s data are available for download on GitHub. The data are recordings of calcium imaging experiments in mouse V1 that come to us courtesy of Ashley Wilson in Lindsey Glickfeld’s lab. The data are once again in .mat
format. This week, they are large by the standards of what we’ve been working with (~200MB), though far smaller than such datasets are for real experiments. In the actual experiments, images are taken at 30 Hz (30 images per second), whereas the sample data are downsampled to 3 Hz.
In the experiment that generated these data, the mice were exposed to a series of drifting grating stimuli, and recorded responses were images reflecting calcium fluorescence levels. The stimuli consisted of drifting gratings at a variety of orientations, probing the sensitivity of cells in V1 to both orientation and motion direction.
The variables in the data file are:
data
: This week, it will be up to you to determine what dimensions correspond to what variables.dirTuningExp
: A structure containing metadata about the experiment. In particular:
nTrials
: Number of trials in the data.stimOffFrames
: Number of frames during which no stimulus was presented.stimOnFrames
: Number of frames during which each stimulus was presented.tGratingDirection
: Direction of drift of the moving grating on each trial.Each trial (and thus the dataset) began with the stimulus off and then switched it on.
data
array is time.In addition to a sequence of images, we can also think of these data as a collection of time series, one per pixel.
For spatiotemporal data, one of the best ways to gain qualitative insight is by using your eye as a pattern detector. For a sequence of images, Matlab, like many languages, will allow us to play them as a movie. The movie
command has facilities for allowing this movie to be stored in standard formats, but a quick and dirty version that allows you to look at the data interactively can be done in only a few lines of code.
drawnow
command. drawnow
ensures the figure will be shown immediately and updated with each plot, instead of showing only the final image.For each recorded neuron in the movie, we might like to assess its sensitivity to both orientation and motion direction. To do this, we first need to find the locations of cells within the image (and they might move), then appropriately average the calcium fluorescence time series, then finally assess whether a stimulus is tuned and to what degree.
But for programming, we should start simple, with the most straightforward version we can think of: let’s try to assess the tuning of each pixel and do so with a back-of-the-envelope sort of calculation that we can refine as we go.
Unfortunately, this method for finding the preferred orientation has a few problems:
Next class, we’ll work to remedy some of these defects.