Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

AMATH 342

HW 2

Working together is encouraged. Please do not refer to previous yearssolutions.

Turn in a write-up of your solutions including discussion/analysis AND plots, neatly organized together with all code you wrote/used for the assignment.  Full points require that writeup be legible, understandably explained,  and reasonably organized, including specifying which question and part you are responding to, with e.g. 1(a),    1(b) etc in your writeup.

On the website will find, among the posted codes, the following:

v1_white_noise_exp.ipynb, and data.mat. Please download all these to the same folder.

_______

We are now going to try describe the responses of a V1 neuron (early visual region of the brain in primates). Since it is visual we will deal with many more parameters than just the one we had for our cockroach (direction). For a 11X11 pixel image there are 121 dimensions (each pixel). It won’t be easy interpreting a histogram with 121 axes! Not only will we be figuring out what the neuron prefers in an image, but also what it prefers in time, another dimension!

We will simulate what is called a white noise experiment. In this experiment an electrophysiologist will be recording from a visual neuron while ‘white noise’ is shown in that neurons receptive field. Essentially each frame looks like random static on a television screen. Our frame rate will be 60 Hz so in only 1 second you’re shown 60 images to the neuron.  All the while the neuron will occasionally be responding when by chance it is shown a preferred series of images.

Lets get the data!

Run the code v1_white_noise_exp.ipynb

put in the number of seconds you want to run the experiment into the variable T (Remember 60 Hz frame rate, so you will get 60 Hz * Number Seconds = total frames, so start with a smaller number (200 say)). Eventually

we would recommend you run for around 1000 seconds to get nice results. (data is saved for 1000 seconds) T(.)he results of the experiment will be in spikeTrain’, and stim’ .

Stim will be a

11 X 11 X second*FrameRate frames array where each of the Frames is one greyscale image shown to our V1 neuron.  The numerical value of an entry in Stim is the greyscale brightness” of a given pixel.  (Please be careful IN INTERPRETING plotting with imshow or another command that gives a colormap these are pseudocolor plots introduced by Python, but do not correspond to real colors in the stimulus itself, which, again, is GREYSCALE.  You can use colormap command in Python to change the color map to greyscale to make things a bit less confusing!).

spikeTrain is a vector with N entries (same as the number of frames) where 0 indicates there was no spike during a frame and 1 indicates there was.

1. Begin by computing and examining the spike triggered average images for different, reasonable time delays   between the image and the spike (you might start by trying a range of values in the range of delays from 0 to 0.5 seconds, for example).  Interpret the stimulus as a movie (stim(x,y,t)), so that the STA is a function of x,y, and time as well (STA(x,y,tau)), as in the spatiotemporal coding in class and in the text.  After a reasonable amount of exploration (no need to write a fancy code that finds the absolute best delay value), choose 5 delays that illustrate how the clarity of the STA depends on the delay.  (a) Plot the STA at each of these 5 delays.  (b) Give the numerical value in seconds for the delay that gave the most clear  STA. (c) Write one sentence on what might cause V1 neurons to have such a dependence on the time delay. (d) Describe in one sentence, as specifically as you can (think of orientation, shape, etc), what types of spatiotemporal stimuli this STA would   suggest the neuron prefers.

2. Sometimes the STA approach works,” in describing what makes a neuron spike, and sometimes it fails.       Describe in three sentences a case where the STA approach would give a misleading description of what makes a neuron spike, AND WHY  (add a hand-drawn diagram or picture if this helps to explain).