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

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

\begin{document}

\input{../instructions.tex}

%%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%%
\section*{Quantifying the coupling of action potentials to the EOD.}
P-unit electroreceptors are driven by the fish's self-generated field,
the EOD. In this project you have to quantify the strength of this
coulpling using the \textbf{vector strength}:
\begin{equation}
 VS = \sqrt{\left(\frac{1}{n}\sum_{i=1}^{n}\cos
 \alpha_i\right)^2 + \left(\frac{1}{n}\sum_{i = 1}^{n} \sin \alpha_i
 \right)^2},
\end{equation}
with $n$ the number of spikes and $\alpha_i$ the timing of the each
spike expressed as the phase relative to the EOD. The vector strength
varies between $0$ and $1$ for no phase locking to perfect phase
locking, respectively.

\begin{questions}
  \question In the accompanying datasets you find recordings of the
  ``baseline'' activity of P-unit electroreceptors of different weakly
  electric fish of the species \textit{Apteronotus leptorhynchus}.
  The files further contain respective recordings of the \textit{eod},
  i.e. the fish's field The data is sampled with 20\,kHz and the spike
  times are given in seconds.
  \begin{parts}
    \part Plot an average of the single EOD cylces of each fish 
    together with an respective PSTH.
    \part Implement a function that estimates the vector strength
    between the \textit{eod} and the spikes.
    \part Create a polar plot that shows the timing of the spikes 
    relatve to the EOD.
    \part Analyze the baseline responses of each fish and extrace measures as were introduced in chapter 8 of the script. Plot the results
    appropriately.
    \part Does the vector strength correlate with the EOD frequency? 
  \end{parts}
\end{questions}

\end{document}