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

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

\begin{document}

\input{../instructions.tex}


%%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%%
\section{REPLACE BY SUBTHRESHOLD RESONANCE PROJECT!}
\begin{questions}
  \question You are recording the activity of a neuron in response to
  constant stimuli of intensity $I$ (think of that, for example,
  as a current $I$ injected via a patch-electrode into the neuron).

  Measure the tuning curve (also called the intensity-response curve) of the
  neuron.  That is, what is the mean firing rate of the neuron's response
  as a function of the input $I$?

  How does the intensity-response curve of a neuron depend on the
  level of the intrinsic noise of the neuron?

  The neuron is implemented in the file \texttt{lifspikes.m}.  Call it
  with the following parameters:
    \begin{lstlisting}
trials = 10;
tmax = 50.0;
input = 10.0;  % the input I
Dnoise = 1.0;  % noise strength
spikes = lifspikes(trials, input, tmax, Dnoise);
    \end{lstlisting}
    The returned \texttt{spikes} is a cell array with \texttt{trials}
    elements, each being a vector of spike times (in seconds) computed
    for a duration of \texttt{tmax} seconds.  The input is set via the
    \texttt{input} variable, the noise strength via \texttt{Dnoise}.

    Think of calling the \texttt{lifspikes()} function as a simple way
    of doing an electrophysiological experiment. You are presenting a
    stimulus with a constant intensity $I$ that you set. The neuron
    responds to this stimulus, and you record this response. After
    detecting the timepoints of the spikes in your recordings you get
    what the \texttt{lifspikes()} function returns. In addition you
    can record from different neurons with different noise properties
    by setting the \texttt{Dnoise} parameter to different values.

  \begin{parts}
    \part First set the noise \texttt{Dnoise=0} (no noise). Compute
    and plot neuron's $f$-$I$ curve, i.e. the mean firing rate (number
    of spikes within the recording time \texttt{tmax} divided by
    \texttt{tmax} and averaged over trials) as a function of the input
    for inputs ranging from 0 to 20.

    How are different stimulus intensities encoded by the firing rate
    of this neuron?

    \part Compute the $f$-$I$ curves of neurons with various noise
    strengths \texttt{Dnoise}. Use $D_{noise} = 1e-3$, $1e-2$, and
    $1e-1$. 

    How does the intrinsic noise influence the response curve?

    How is the encoding of stimuli influenced by increasing intrinsic
    noise?

    What are possible sources of this intrinsic noise?

    \part Show spike raster plots and interspike interval histograms
    of the responses for some interesting values of the input and the
    noise strength. For example, you might want to compare the
    responses of the four different neurons to the same input, or by
    the same resulting mean firing rate.

    \part How does the coefficient of variation $CV_{isi}$ (standard
    deviation divided by mean) of the interspike intervalls depend on
    the input and the noise level?

    \part Based o your results, discuss how intrinsic noise might
    improve and how it might deteriote the encoding of different
    stimulus intensities.
    

 \end{parts}

\end{questions}

\end{document}