[projects] fixes and improvements

This commit is contained in:
Jan Grewe 2020-01-20 15:55:31 +01:00
parent d7cda9567f
commit a46fa34b52
4 changed files with 31 additions and 33 deletions

View File

@ -12,7 +12,7 @@
The code and the presentation should be uploaded to The code and the presentation should be uploaded to
ILIAS \textbf{at latest the night before the presentation (23:59h)}. We will ILIAS \textbf{at latest the night before the presentation (23:59h)}. We will
store all presentations on one computer to allow fast store all presentations on one computer to allow fast
transitions between talks. The date of the presentations needs to be fixed. transitions between talks. The date of the presentations will be anounced.
\vspace{1ex} \vspace{1ex}
\textbf{Files:} \textbf{Files:}
@ -21,15 +21,16 @@
everything (the pdf, the code, and the data) into a {\em single} everything (the pdf, the code, and the data) into a {\em single}
zip-file. zip-file.
Hint: make the zip file you want to upload, unpack it somewhere \textbf{Hint:} create the zip file you want to upload, unpack it
else and check if your main script is still running properly. somewhere else and check if your main script is still running
properly.
\vspace{1ex} \vspace{1ex}
\textbf{Code:} \textbf{Code:}
The code must be executable without any further adjustments from The code must be executable without any further adjustments from
our side. (Test it!) A single \texttt{main.m} script coordinates our side. (Test it!) A single \texttt{main.m} script coordinates
the analysis by calling functions and sub-scripts and produces the analysis by calling functions and sub-scripts which produce
the {\em same} figures (\texttt{saveas()}-function, pdf or png the {\em same} figures (\texttt{saveas()}-function, pdf or png
format) that you use in your slides. The code must be format) that you use in your slides. The code must be
comprehensible by a third person (use proper and consistent comprehensible by a third person (use proper and consistent

View File

@ -24,7 +24,7 @@ electroreceptors of the weakly electric fish \textit{Apteronotus
\textit{spike\_times} of an P-unit electroreceptor to a stimulus of \textit{spike\_times} of an P-unit electroreceptor to a stimulus of
a certain intensity, i.e. the \textit{contrast} which is also stored a certain intensity, i.e. the \textit{contrast} which is also stored
in the file. The contrast of the stimulus is a measure relative to in the file. The contrast of the stimulus is a measure relative to
the amplitude of fish's field, it has no unit. The data is sampled the amplitude of fish's field and is given in percent. The data is sampled
with 20\,kHz sampling frequency and spike times are given in with 20\,kHz sampling frequency and spike times are given in
milliseconds (not seconds!) relative to the stimulus onset. milliseconds (not seconds!) relative to the stimulus onset.
\begin{parts} \begin{parts}

View File

@ -12,20 +12,16 @@
%%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%%
\section*{Light responses of an insect photoreceptor.} \section*{Light responses of an insect photoreceptor.}
In this project you will analyse data from intracellular recordings of In this project you will analyze data from intracellular recordings of
a fly R\,1--6 photoreceptor. These cells show graded membrane a fly R\,1--6 photoreceptor. These cells show graded membrane
potential changes in response to a light stimulus. The membrane potential changes in response to a light stimulus. The membrane
potential of the photoreceptor was recorded while the cell was potential of the photoreceptor was recorded while the cell was
stimulated with a light stimulus. Intracellular recordings often stimulated with a light stimulus.
suffer from drifts in the resting potential. This leads to a large
variability in the responses which is technical and not a cellular
property. To compensate for such drifts trials are aligned to the
resting potential before stimulus onset.
\begin{questions} \begin{questions}
\question{} The accompanying dataset (photoreceptor\_data.zip) \question{} The accompanying dataset (photoreceptor\_data.zip)
contains seven mat files. Each of these holds the data from one contains seven mat files. Each of these holds the data from one
stimulus intensity. In each file are three variables. (i) stimulus intensity and contains therr variables. (i)
\textit{voltage} a matrix with the recorded membrane potential from \textit{voltage} a matrix with the recorded membrane potential from
10 consecutive trials, (ii) \textit{time} a matrix with the 10 consecutive trials, (ii) \textit{time} a matrix with the
time-axis for each trial, and (iii) \textit{trace\_meta} a structure time-axis for each trial, and (iii) \textit{trace\_meta} a structure
@ -37,12 +33,20 @@ resting potential before stimulus onset.
\begin{parts} \begin{parts}
\part Create a plot of the raw data. For each light intensity plot \part Create a plot of the raw data. For each light intensity plot
the average response as a function of time. This plot should also the individual responses as a function of time.
depict the across-trial variability in an appropriate way.
\part You will notice that the responses have three main parts, a \part Intracellular recordings often suffer from drifts in the resting
pre-stimulus phase, the phase in which the light was on, and potential. This leads to a large variability in the responses which is technical and not a cellular
finally a post-stimulus phase. Create an characteristic curve that property. To compensate for such drifts trials 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. Create an characteristic curve that
plots the response strength as a function of the stimulus plots the response strength as a function of the stimulus
intensity for the ``onset'' and the ``steady state'' intensity for the ``onset'' and the ``steady state''
phases of the light response. phases of the light response.

View File

@ -20,11 +20,11 @@ $i_{th}$ spike. $\tau$ is a temporal shift relative to the spike
time. For the beginning let $\tau$ assume values in the range time. For the beginning let $\tau$ assume values in the range
$\pm50$\,ms. The STA can be estimated by cutting out snippets from the $\pm50$\,ms. The STA can be estimated by cutting out snippets from the
stimulus that are centered on the respective spike time and by stimulus that are centered on the respective spike time and by
subsequently averaging them. The STA can be used to reconstruct the subsequently averaging these stimulus snippets. The STA can be used to
stimulus from the neuronal response. The reconstructed stimulus can reconstruct the stimulus from the neuronal response (reverse
then be compared to the original stimulus and provides a good reconstruction). The reconstructed stimulus can then be compared to
impression about the features that are encoded in the neuronal the original stimulus and provides a good impression about the
response. features that are encoded in the neuronal response.
\begin{questions} \begin{questions}
\question In the accompanying data files you find the spike \question In the accompanying data files you find the spike
@ -34,22 +34,15 @@ response.
stored in separate files. The neron is stimulated with an amplitude stored in separate files. The neron is stimulated with an amplitude
modulation of the fish's own electric field. The stored stimulus modulation of the fish's own electric field. The stored stimulus
trace is the modulator that is applied to the field and is trace is the modulator that is applied to the field and is
dimensionless, i.e. it has not unit. The data is sampled with dimensionless, i.e. it has no unit. The data is sampled with
20\,kHz temporal resolution and spike times are given in 20\,kHz temporal resolution and spike times are given in
seconds. Start with the P-unit and, in the end, apply the same seconds. Start with the P-unit and, in the end, apply the same
analyzes/functions to the responses from the pyramidal neuron. analyzes/functions to the pyramidal cell.
\begin{parts} \begin{parts}
\part Estimate the STA and plot it. What does it tell? \part Estimate the STA and plot it. What does it tell?
\part Implement a function that does the reverse reconstruction and uses the STA to reconstruct the stimulus. \part Implement a function that does the reverse reconstruction and uses the STA to reconstruct the stimulus.
\part Implement a function that estimates the reconstruction \part Implement a function that estimates the reconstruction quality.
error using the mean-square-error and express it relative to the \part Test the robustness of the reconstruction: Estimate
variance of the original stimulus.
\begin{equation}
err = \frac{1}{N} \cdot \displaystyle\sum^{N}_{i=1}(x_i - \bar{x})^2,
\end{equation}
with $N$ the number of data points, $x_i$ the current value and
$\bar{x}$, the average of all $x$.
\part Analyze the robustness of the reconstruction: Estimate
the STA with less and less data and estimate the reconstruction the STA with less and less data and estimate the reconstruction
error. error.
\part Plot the reconstruction error as a function of the amount of data \part Plot the reconstruction error as a function of the amount of data