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

\newcommand{\ptitle}{Photoreceptor activity}
\input{../header.tex}
\firstpagefooter{Supervisor: Jan Grewe}{phone: 29 74588}%
{email: jan.grewe@uni-tuebingen.de}

\begin{document}

\input{../instructions.tex}


%%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%%
\section*{Light responses of an insect photoreceptor.}
Insect R\,1--6 photoreceptors respond to light-on stimuli with graded membrane
potential changes. In the acompanying datasets you find the membrane
potential of a single R\,1-6 photoreceptor from the fly \textit{Calliphora vicina}. The receptor was
stimulated with a light stimulus of different amplitudes.

\begin{questions}
  \question{} The accompanying dataset (photoreceptor\_data.zip)
  contains seven mat files. Each of these holds the data recorded with one
  stimulus intensity and contains three variables. (i)
  \textit{voltage} a matrix with the recorded membrane potential from
  10 consecutive trials, (ii) \textit{time} a matrix with the
  time-axis for each trial, and (iii) \textit{trace\_meta} a structure
  that stores several metadata including the \emph{amplitude} value
  that is the voltage used to drive the light stimulus. (Note that
  this voltage is only a proxy for the true light intensity. Twice the
  voltage does not lead to twice the light intensity. Within this
  project, however, you can treat it as if it was the intensity.)

  \begin{parts}
    \part Create a plot of the raw data. For each light intensity plot
    the individual responses as a function of time.

    \part Intracellular recordings often suffer from drifts in the resting
    potential. This leads to a large variability in the responses which has technical reasons and is not a cellular
    property. To compensate for such drifts trials usually are aligned to the
    resting potential before stimulus onset.
    Replot the data but with the compensation for the drifts.
    
    \part Instead of plotting individual responses plot the average response.
    This plot should also depict the across-trial variability in an appropriate way.
    
    \part You will notice that the responses have three main parts, (i) a
    pre-stimulus phase, (ii) the phase in which the light was on, and (iii)
    a post-stimulus phase. The light-on phase can further be devided into two parts, the onset, and the "steady state" response part. Create an characteristic curve that
    plots the response strength as a function of the stimulus
    intensity for ``onset'' and ``steady state''
    phases of the light response.

    \part The light switches on at time zero. Estimate the delay
    between stimulus and response.

    \part Analyze the across trial variability in the ``onset'' and
    ``steady state''. Check for statistically significant differences.

    \part The membrane potential shows some fluctuations (noise)
    compare the noise before stimulus onset and in the steady state
    phase of the response.

    \part (optional) You may also analyze the post-stimulus response
    in some more detail.
  \end{parts}
\end{questions}

\end{document}