\documentclass[a4paper,12pt,pdftex]{exam}

\newcommand{\ptitle}{Orientation tuning}
\input{../header.tex}
\firstpagefooter{Supervisor: Jan Benda}{phone: 29 74573}%
{email: jan.benda@uni-tuebingen.de}

\begin{document}

\input{../instructions.tex}

%%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%%
\begin{questions}

  \question In the visual cortex V1 orientation sensitive neurons
  respond to bars in dependence on their orientation.

  How is the orientation of a bar encoded by the activity of a
  population of orientation sensitive neurons?

  In an electrophysiological experiment, 6 neurons have been recorded
  simultaneously. First, the tuning of these neurons was characterized
  by presenting them bars in a range of 12 orientation angles. Each
  orientation was presented 50 times. Each of the \texttt{unit*.mat}
  files contains the responses of one of the neurons. In there,
  \texttt{angles} is a vector with the orientation angles of the bars
  in degrees. \texttt{spikes} is a cell array that contains the
  vectors of spike times for each angle and presentation. The spike
  times are given in seconds. The stimulation with the bar starts a
  time $t_0=0$ and ends at time $t_1=200$\,ms.

  Then the population activity of the 6 neurons was measured in
  response to arbitrarily oriented bars. The responses of the 6
  neurons to 50 presentation of a bar are stored in the
  \texttt{spikes} variables of the \texttt{population*.mat} files.
  The \texttt{angle} variable holds the angle of the presented bar.

NOTE: the orientation is angle plu 90 degree!!!!!!

\continue
  \begin{parts}
    \part Illustrate the spiking activity of the V1 cells in response
    to different orientation angles of the bars by means of spike
    raster plots (of one unit).

    \part Plot the firing rate of each of the 6 neurons as a function
    of the orientation angle of the bar. As the firing rate compute
    the number of spikes in the time interval $0<t<200$\,ms divided by
    200\,ms. The resulting curves are the tuning curves $r(\varphi)$
    of the neurons.

    \part Fit the function \[ r(\varphi) =
    g(1-\cos(\varphi-\varphi_0))/2 \] to the measured tuning curves in
    order to estimated the orientation angle at which the neurons
    respond strongest. In this function $\varphi_0$ is the position of
    the peak (really? How exactly is $\varphi_0$ related to the
    position of the peak? Do you find a better function where
    $\varphi_0$ is identical with the peak position?) and $g$ is a
    gain factor that sets the maximum firing rate.

    \part How can the orientation angle of the presented bar be read
    out from one trial of the population activity of the 6 neurons?
    One is the so called ``population vector'' where unit vectors
    pointing into the direction of the maximum response of each neuron
    are weighted by their firing rate. The stimulus orientation is
    then the direction of the averaged vectors.  

    Think of another (simpler) method how the orientation of the bar
    may be approximately read out from the population.

    Load one of the \texttt{population*.mat} files, illustrate the
    data, and estimate the orientation angle of the bar by the two
    different methods.

    \part Compare, illustrate and discuss the performance of your two
    decoding methods by using all of the recorded responses (all
    \texttt{population*.mat} files). How exactly is the orientation of
    the bar encoded? How robust is the estimate of the orientation
    from trial to trial?
  \end{parts}
\end{questions}

NOTE: change data generation such that the phase variable is indeed
the maximum response and not the minumum!

\end{document}

gains and angles of the 6 neurons:

14.6 0
17.1 36
17.6 72
14.1 107
10.7 144
11.4 181