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

\newcommand{\ptitle}{Adaptation and interspike-interval correlations}
\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 You are recording the activity of a neuron in response to
  constant stimuli of intensity $I$ (think of that, for example,
  of sound waves with intensities $I$). The neuron has an adaptatation
  current that adapts the firing rate with a slow time constant down.

  Explore the dependence of interspike interval correlations on the firing rate,
  adaptation time constant and noise level.

  The neuron is a neuron with an adaptation current.  It is
  implemented in the file \texttt{lifadaptspikes.m}.  Call it with the
  following parameters:
  \begin{lstlisting}
trials = 10;
tmax = 50.0;
input = 10.0;  % the input I
Dnoise = 1e-2;  % noise strength
adapttau = 0.1;  % adaptation time constant in seconds
adaptincr = 0.5;  % adaptation strength

spikes = lifadaptspikes(trials, input, tmax, Dnoise, adapttau, adaptincr);
    \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},
    and the adaptation time constant via \texttt{adapttau}.

  \begin{parts}
    \part Show a spike-raster plot and a time-resolved firing rate of
    the neuron for an input current of 50 for three different
    adaptation time constants \texttt{adapttau} (10\,m, 100\,ms,
    1\,s). How do the neural responses look like and how do they
    depend on the adaptation time constant?

    \uplevel{For all the following analysis we only use the spike
      times of the steady-state response, i.e. we skip all spikes
      occuring before at least three times the adaptation time
      constant.}

    \part \label{ficurve} Measure the intensity-response curve of the
    neuron, that is the mean firing rate as a function of the input
    for a range of inputs from 0 to 120.

    \part Additionally compute the correlations between each
    interspike interval $T_i$ and the next one $T_{i+1}$ (serial
    interspike interval correlation at lag 1) for the same range of
    inputs as in (\ref{ficurve}). Plot the correlation as a function
    of the input.

    \part How does the intensity-response curve and the
    interspike-interval correlations depend on the adaptation time
    constant \texttt{adapttau}?  Use several values between 10\,ms and
    1\,s for \texttt{adapttau} (logarithmically distributed).

    \part Determine the firing rate at which the minimum interspike
    interval correlation occurs. How does the minimum correlation and
    this firing rate (or the inverse of it, the mean interspike
    interval) depend on the adaptation time constant
    \texttt{adapttau}? Is this dependence siginificant? If yes, can
    you explain this dependence?

    \part How do all the results change if the level of the intrinsic
    noise \texttt{Dnoise} is modified?  Use values of 1e-4, 1e-3,
    1e-2, 1e-1, and 1 for \texttt{Dnoise}.

 \end{parts}

\end{questions}

\end{document}