diff --git a/.gitignore b/.gitignore index 62cd817..a7fc20d 100644 --- a/.gitignore +++ b/.gitignore @@ -3,14 +3,19 @@ *.lol *.loe *.idx +*.ilg *.ind *.log +*.loi +*.loiboxf *.aux *.nav *.out *.snm *.toc *.mat +*.pdf +*.eps .#* #*# *.~ diff --git a/plotting/lecture/plotting-chapter.tex b/plotting/lecture/plotting-chapter.tex index 4261202..64c5743 100644 --- a/plotting/lecture/plotting-chapter.tex +++ b/plotting/lecture/plotting-chapter.tex @@ -19,12 +19,15 @@ \section{TODO} \begin{itemize} \item Beispiele schlechter plots sollten mehr Bezug zu den Typen von - plots haben, die wir machen! + plots haben, die wir machen! Check WS1617 presentations for examples. \item subplot \item Uebersicht zu wichtigen plot Befehlen (plot, scatter, bar, step, ...) \item Funktionenplotten (siehe auch Design patterns) und untersampleter Sinus -\item Verschiedene Stile fuer Achsenbeschriftung (gross/kleinschreibungen, Kalmmertyp fuer Einheiten), stay with one style! -\item Stay with a coherent style (font type/style/size, colors schemes, line styles/thickness, point styles) +\item Verschiedene Stile fuer Achsenbeschriftung (gross/kleinschreibungen, Klammertyp fuer Einheiten), stay with one style! +\item Stay with a coherent style (font type/style/size, colors schemes, line styles/thickness, point styles), same line style in all plots for the same quantity. How to do consistent line styles in matlab (python: dictionary for kwargs)? +\item Different plots for journal papers and presentations! +\item Color universal design for color blind people: + \url{http://jfly.iam.u-tokyo.ac.jp/color/} \end{itemize} \end{document} diff --git a/pointprocesses/lecture/pointprocesses-chapter.tex b/pointprocesses/lecture/pointprocesses-chapter.tex index 4570c91..2e48587 100644 --- a/pointprocesses/lecture/pointprocesses-chapter.tex +++ b/pointprocesses/lecture/pointprocesses-chapter.tex @@ -20,6 +20,11 @@ \begin{itemize} \item Add spikeraster function \item Multitrial firing rates +\item Choice of bin width for PSTH, kernel width, also in relation sto + stimulus time scale +\item Kernle firing rate: discuss different kernel shapes, in + particular causal kernels (gamma, exponential), relation to synaptic + potentials \end{itemize} \end{document} diff --git a/pointprocesses/lecture/pointprocessscetchA.tex b/pointprocesses/lecture/pointprocessscetchA.tex deleted file mode 100644 index 302b6a9..0000000 --- a/pointprocesses/lecture/pointprocessscetchA.tex +++ /dev/null @@ -1,95 +0,0 @@ -% GNUPLOT: LaTeX picture with Postscript -\begingroup - \makeatletter - \providecommand\color[2][]{% - \GenericError{(gnuplot) \space\space\space\@spaces}{% - Package color not loaded in conjunction with - terminal option `colourtext'% - }{See the gnuplot documentation for explanation.% - }{Either use 'blacktext' in gnuplot or load the package - color.sty in LaTeX.}% - \renewcommand\color[2][]{}% - }% - \providecommand\includegraphics[2][]{% - \GenericError{(gnuplot) \space\space\space\@spaces}{% - Package graphicx or graphics not loaded% - }{See the gnuplot documentation for explanation.% - }{The gnuplot epslatex terminal needs graphicx.sty or graphics.sty.}% - \renewcommand\includegraphics[2][]{}% - }% - \providecommand\rotatebox[2]{#2}% - \@ifundefined{ifGPcolor}{% - \newif\ifGPcolor - \GPcolortrue - }{}% - \@ifundefined{ifGPblacktext}{% - \newif\ifGPblacktext - \GPblacktexttrue - }{}% - % define a \g@addto@macro without @ in the name: - \let\gplgaddtomacro\g@addto@macro - % define empty templates for all commands taking text: - \gdef\gplbacktext{}% - \gdef\gplfronttext{}% - \makeatother - \ifGPblacktext - % no textcolor at all - \def\colorrgb#1{}% - \def\colorgray#1{}% - \else - % gray or color? - \ifGPcolor - \def\colorrgb#1{\color[rgb]{#1}}% - \def\colorgray#1{\color[gray]{#1}}% - \expandafter\def\csname LTw\endcsname{\color{white}}% - \expandafter\def\csname LTb\endcsname{\color{black}}% - \expandafter\def\csname LTa\endcsname{\color{black}}% - \expandafter\def\csname LT0\endcsname{\color[rgb]{1,0,0}}% - \expandafter\def\csname LT1\endcsname{\color[rgb]{0,1,0}}% - \expandafter\def\csname LT2\endcsname{\color[rgb]{0,0,1}}% - \expandafter\def\csname LT3\endcsname{\color[rgb]{1,0,1}}% - \expandafter\def\csname LT4\endcsname{\color[rgb]{0,1,1}}% - \expandafter\def\csname LT5\endcsname{\color[rgb]{1,1,0}}% - \expandafter\def\csname LT6\endcsname{\color[rgb]{0,0,0}}% - \expandafter\def\csname LT7\endcsname{\color[rgb]{1,0.3,0}}% - \expandafter\def\csname LT8\endcsname{\color[rgb]{0.5,0.5,0.5}}% - \else - % gray - \def\colorrgb#1{\color{black}}% - \def\colorgray#1{\color[gray]{#1}}% - \expandafter\def\csname LTw\endcsname{\color{white}}% - \expandafter\def\csname LTb\endcsname{\color{black}}% - \expandafter\def\csname LTa\endcsname{\color{black}}% - \expandafter\def\csname LT0\endcsname{\color{black}}% - \expandafter\def\csname LT1\endcsname{\color{black}}% - \expandafter\def\csname LT2\endcsname{\color{black}}% - \expandafter\def\csname LT3\endcsname{\color{black}}% - \expandafter\def\csname LT4\endcsname{\color{black}}% - \expandafter\def\csname LT5\endcsname{\color{black}}% - \expandafter\def\csname LT6\endcsname{\color{black}}% - \expandafter\def\csname LT7\endcsname{\color{black}}% - \expandafter\def\csname LT8\endcsname{\color{black}}% - \fi - \fi - \setlength{\unitlength}{0.0500bp}% - \begin{picture}(6462.00,1700.00)% - \gplgaddtomacro\gplbacktext{% - \csname LTb\endcsname% - \put(6329,421){\makebox(0,0){\strut{}Time}}% - \put(910,270){\makebox(0,0){\strut{}$t_{1}$}}% - \put(1412,270){\makebox(0,0){\strut{}$t_{2}$}}% - \put(2123,270){\makebox(0,0){\strut{}$t_{3}$}}% - \put(2413,270){\makebox(0,0){\strut{}$t_{4}$}}% - \put(2717,270){\makebox(0,0){\strut{}$t_{5}$}}% - \put(3167,270){\makebox(0,0){\strut{}$t_{6}$}}% - \put(4033,270){\makebox(0,0){\strut{}$t_{7}$}}% - \put(4650,270){\makebox(0,0){\strut{}$t_{8}$}}% - \put(5685,270){\makebox(0,0){\strut{}$t_{9}$}}% - }% - \gplgaddtomacro\gplfronttext{% - }% - \gplbacktext - \put(0,0){\includegraphics{pointprocessscetchA}}% - \gplfronttext - \end{picture}% -\endgroup diff --git a/pointprocesses/lecture/pointprocessscetchB.tex b/pointprocesses/lecture/pointprocessscetchB.tex deleted file mode 100644 index 14803c3..0000000 --- a/pointprocesses/lecture/pointprocessscetchB.tex +++ /dev/null @@ -1,130 +0,0 @@ -% GNUPLOT: LaTeX picture with Postscript -\begingroup - \makeatletter - \providecommand\color[2][]{% - \GenericError{(gnuplot) \space\space\space\@spaces}{% - Package color not loaded in conjunction with - terminal option `colourtext'% - }{See the gnuplot documentation for explanation.% - }{Either use 'blacktext' in gnuplot or load the package - color.sty in LaTeX.}% - \renewcommand\color[2][]{}% - }% - \providecommand\includegraphics[2][]{% - \GenericError{(gnuplot) \space\space\space\@spaces}{% - Package graphicx or graphics not loaded% - }{See the gnuplot documentation for explanation.% - }{The gnuplot epslatex terminal needs graphicx.sty or graphics.sty.}% - \renewcommand\includegraphics[2][]{}% - }% - \providecommand\rotatebox[2]{#2}% - \@ifundefined{ifGPcolor}{% - \newif\ifGPcolor - \GPcolortrue - }{}% - \@ifundefined{ifGPblacktext}{% - \newif\ifGPblacktext - \GPblacktexttrue - }{}% - % define a \g@addto@macro without @ in the name: - \let\gplgaddtomacro\g@addto@macro - % define empty templates for all commands taking text: - \gdef\gplbacktext{}% - \gdef\gplfronttext{}% - \makeatother - \ifGPblacktext - % no textcolor at all - \def\colorrgb#1{}% - \def\colorgray#1{}% - \else - % gray or color? - \ifGPcolor - \def\colorrgb#1{\color[rgb]{#1}}% - \def\colorgray#1{\color[gray]{#1}}% - \expandafter\def\csname LTw\endcsname{\color{white}}% - \expandafter\def\csname LTb\endcsname{\color{black}}% - \expandafter\def\csname LTa\endcsname{\color{black}}% - \expandafter\def\csname LT0\endcsname{\color[rgb]{1,0,0}}% - \expandafter\def\csname LT1\endcsname{\color[rgb]{0,1,0}}% - \expandafter\def\csname LT2\endcsname{\color[rgb]{0,0,1}}% - \expandafter\def\csname LT3\endcsname{\color[rgb]{1,0,1}}% - \expandafter\def\csname LT4\endcsname{\color[rgb]{0,1,1}}% - \expandafter\def\csname LT5\endcsname{\color[rgb]{1,1,0}}% - \expandafter\def\csname LT6\endcsname{\color[rgb]{0,0,0}}% - \expandafter\def\csname LT7\endcsname{\color[rgb]{1,0.3,0}}% - \expandafter\def\csname LT8\endcsname{\color[rgb]{0.5,0.5,0.5}}% - \else - % gray - \def\colorrgb#1{\color{black}}% - \def\colorgray#1{\color[gray]{#1}}% - \expandafter\def\csname LTw\endcsname{\color{white}}% - \expandafter\def\csname LTb\endcsname{\color{black}}% - \expandafter\def\csname LTa\endcsname{\color{black}}% - \expandafter\def\csname LT0\endcsname{\color{black}}% - \expandafter\def\csname LT1\endcsname{\color{black}}% - \expandafter\def\csname LT2\endcsname{\color{black}}% - \expandafter\def\csname LT3\endcsname{\color{black}}% - \expandafter\def\csname LT4\endcsname{\color{black}}% - \expandafter\def\csname LT5\endcsname{\color{black}}% - \expandafter\def\csname LT6\endcsname{\color{black}}% - \expandafter\def\csname LT7\endcsname{\color{black}}% - \expandafter\def\csname LT8\endcsname{\color{black}}% - \fi - \fi - \setlength{\unitlength}{0.0500bp}% - \begin{picture}(6462.00,3740.00)% - \gplgaddtomacro\gplbacktext{% - \csname LTb\endcsname% - \put(122,3587){\makebox(0,0)[l]{\strut{}\normalsize Event times $\{t_i\}$}}% - \put(6329,2947){\makebox(0,0){\strut{}Time}}% - \put(910,2865){\makebox(0,0){\strut{}$t_{1}$}}% - \put(1412,2865){\makebox(0,0){\strut{}$t_{2}$}}% - \put(2123,2865){\makebox(0,0){\strut{}$t_{3}$}}% - \put(2413,2865){\makebox(0,0){\strut{}$t_{4}$}}% - \put(2717,2865){\makebox(0,0){\strut{}$t_{5}$}}% - \put(3167,2865){\makebox(0,0){\strut{}$t_{6}$}}% - \put(4033,2865){\makebox(0,0){\strut{}$t_{7}$}}% - \put(4650,2865){\makebox(0,0){\strut{}$t_{8}$}}% - \put(5685,2865){\makebox(0,0){\strut{}$t_{9}$}}% - }% - \gplgaddtomacro\gplfronttext{% - }% - \gplgaddtomacro\gplbacktext{% - \csname LTb\endcsname% - \put(122,2465){\makebox(0,0)[l]{\strut{}\normalsize Intervals $\{T_i\}, \; T_i = t_{i+1} - t_i$}}% - \put(6329,1825){\makebox(0,0){\strut{}Time}}% - \put(1161,1770){\makebox(0,0){\strut{}$T_{1}$}}% - \put(1767,1770){\makebox(0,0){\strut{}$T_{2}$}}% - \put(2268,1770){\makebox(0,0){\strut{}$T_{3}$}}% - \put(2565,1770){\makebox(0,0){\strut{}$T_{4}$}}% - \put(2942,1770){\makebox(0,0){\strut{}$T_{5}$}}% - \put(3600,1770){\makebox(0,0){\strut{}$T_{6}$}}% - \put(4341,1770){\makebox(0,0){\strut{}$T_{7}$}}% - \put(5168,1770){\makebox(0,0){\strut{}$T_{8}$}}% - }% - \gplgaddtomacro\gplfronttext{% - }% - \gplgaddtomacro\gplbacktext{% - \colorrgb{0.00,0.00,0.00}% - \put(333,268){\makebox(0,0)[r]{\strut{}$0$}}% - \colorrgb{0.00,0.00,0.00}% - \put(333,460){\makebox(0,0)[r]{\strut{}$2$}}% - \colorrgb{0.00,0.00,0.00}% - \put(333,652){\makebox(0,0)[r]{\strut{}$4$}}% - \colorrgb{0.00,0.00,0.00}% - \put(333,844){\makebox(0,0)[r]{\strut{}$6$}}% - \colorrgb{0.00,0.00,0.00}% - \put(333,1036){\makebox(0,0)[r]{\strut{}$8$}}% - \colorrgb{0.00,0.00,0.00}% - \put(333,1228){\makebox(0,0)[r]{\strut{}$10$}}% - \csname LTb\endcsname% - \put(122,1487){\makebox(0,0)[l]{\strut{}\normalsize Event counts $\{ n_i \}$}}% - \put(6329,57){\makebox(0,0){\strut{}Time}}% - }% - \gplgaddtomacro\gplfronttext{% - }% - \gplbacktext - \put(0,0){\includegraphics{pointprocessscetchB}}% - \gplfronttext - \end{picture}% -\endgroup diff --git a/programming/lecture/programming-chapter.tex b/programming/lecture/programming-chapter.tex index 3c29691..6d3ed40 100644 --- a/programming/lecture/programming-chapter.tex +++ b/programming/lecture/programming-chapter.tex @@ -28,7 +28,11 @@ \item Random-walk behutsam mit einer Schleife, dann zwei Schleifen. Plus Bildchen. \item Random-Walk with drift is model for decision making! See resoures/GoldShadlen2007 paper, Figure 2. Das wird auch in Systems Neurosciene \texttt{9 - Kognitive Kontrolle II.pdf} behandelt. \item Doppelte for-Schleife -\item File output and input (load, save, fprintf, scanf) (extra chapter?) +\item File handling: (extra chapter?) + \begin{itemize} + \item output and input (load, save, fprintf, scanf) + \item dir() function + \end{itemize} \item help() und doc() \item A box about sampling of contiunous data. \item A box about foo and bar? diff --git a/projects/Makefile b/projects/Makefile index d582c40..155aa15 100644 --- a/projects/Makefile +++ b/projects/Makefile @@ -1,9 +1,15 @@ -all: - for d in `ls -d project_*/`; do \ - echo "Processing $$d" ; \ - a=$$(echo $$d*.tex) ; \ - rm $${a%.tex}.zip ; \ - cd $$d; $(MAKE) zip ; cd .. ; \ +all: projects evalutation + +evaluation: evaluation.pdf +evaluation.pdf: evaluation.tex + pdflatex $< + +projects: + for d in `ls -d project_*`; do \ + if test "x$$d" != "xproject_template"; then \ + echo "Processing $$d" ; \ + cd $$d; $(MAKE) zip ; cd .. ; \ + fi \ done mv project_*/*zip . @@ -11,8 +17,10 @@ all: clean: for d in `ls -d project_*/`; do \ echo "Cleaning up $$d" ; \ - cd $$d; $(MAKE) clean ; cd .. ; \ + $(MAKE) -C $$d clean ; \ done + rm -f *~ + rm -f evaluation.aux evaluation.log rm -f *.zip rm -rf auto diff --git a/projects/disclaimer.tex b/projects/disclaimer.tex deleted file mode 100644 index 7d0d834..0000000 --- a/projects/disclaimer.tex +++ /dev/null @@ -1,44 +0,0 @@ - \fbox{\parbox{0.985\linewidth}{ \small - - {\bf Evaluation criteria:} - - Each project has three elements that are graded: (i) the code, - (ii) the slides/figures, and (iii) the presentation. - - \vspace{1ex} - - The {\bf code} and the {\bf presentation} should be uploaded to - ILIAS at latest on Thursday, February 9th, 12:59h. We will - store all presentations on one computer to allow fast - transitions between talks. The presentations start on Thursday, - February 9th at 1:00h c.t.. Please hand in your presentation as - a pdf file. Bundle everything (the pdf, the code, and the data) - into a {\em single} zip-file. - - \vspace{1ex} - - The {\bf code} should be executable without any further - adjustments from our side. A single \texttt{main.m} script should - coordinate the analysis by calling functions and sub-scripts and - should produce the {\em same} figures that you use in your - slides. The code should be properly commented and comprehensible - by a third person (use proper and consistent variable and - function names). - - \vspace{1ex} - - \textbf{Please write your name and matriculation number as a - comment at the top of the \texttt{main.m} script.} - - \vspace{1ex} - - The {\bf presentation} should be {\em at most} 10min long and be - held in English. In the presentation you should (i) briefly - describe the problem, (ii) present figures introducing, showing, - and discussing your results, and (iii) explain how you solved - the problem algorithmically (don't show your entire code). All - data-related figures you show in the presentation should be - produced by your program. It is always a good idea to illustrate - the problem with basic plots of the raw-data. Make sure the axis - labels are large enough! - }} diff --git a/projects/evaluation.tex b/projects/evaluation.tex new file mode 100644 index 0000000..00d2061 --- /dev/null +++ b/projects/evaluation.tex @@ -0,0 +1,44 @@ +\documentclass[12pt,a4paper]{article} + +\usepackage[ngerman]{babel} +\usepackage{pslatex} + +%%%%% page style %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usepackage[left=10mm,right=10mm,top=10mm,bottom=10mm,headsep=0ex,headheight=0ex,footskip=0ex]{geometry} +\pagestyle{empty} + +\newcounter{studentnum} +\newcommand{\num}{\rule{0pt}{5.8ex}{\stepcounter{studentnum}\small \arabic{studentnum}}} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begin{document} + +\sffamily +\section*{Scientific computing WS16/17} + +\begin{tabular}{|p{0.15\textwidth}|p{0.07\textwidth}|p{0.07\textwidth}|p{0.07\textwidth}|p{0.07\textwidth}|p{0.07\textwidth}|p{0.07\textwidth}|p{0.07\textwidth}|p{0.07\textwidth}|p{0.07\textwidth}|} +\hline +Name & \multicolumn{5}{l|}{Code} & \multicolumn{3}{l|}{Functions} & Figures \\ + & runs & docu & variable function script names & style & extras & NOT \newline used as scripts & docu & sep. \newline algo./ plot & saved \\ \hline + \num & & & & & & & & & \\ \hline + \num & & & & & & & & & \\ \hline + \num & & & & & & & & & \\ \hline + \num & & & & & & & & & \\ \hline + \num & & & & & & & & & \\ \hline + \num & & & & & & & & & \\ \hline + \num & & & & & & & & & \\ \hline + \num & & & & & & & & & \\ \hline + \num & & & & & & & & & \\ \hline + \num & & & & & & & & & \\ \hline + \num & & & & & & & & & \\ \hline + \num & & & & & & & & & \\ \hline + \num & & & & & & & & & \\ \hline + \num & & & & & & & & & \\ \hline + \num & & & & & & & & & \\ \hline + \num & & & & & & & & & \\ \hline + \num & & & & & & & & & \\ \hline + \num & & & & & & & & & \\ \hline +\end{tabular} + +\end{document} diff --git a/projects/header.tex b/projects/header.tex new file mode 100644 index 0000000..6b19320 --- /dev/null +++ b/projects/header.tex @@ -0,0 +1,56 @@ +\usepackage{pslatex} +\usepackage[mediumspace,mediumqspace,squaren]{SIunits} % \ohm, \micro +\usepackage{xcolor} +\usepackage{graphicx} +\usepackage[breaklinks=true,bookmarks=true,bookmarksopen=true,pdfpagemode=UseNone,pdfstartview=FitH,colorlinks=true,citecolor=blue]{hyperref} + +%%%%% layout %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usepackage[left=20mm,right=20mm,top=25mm,bottom=25mm]{geometry} +\pagestyle{headandfoot} +\header{{\bfseries\large Scientific Computing}}{{\bfseries\large Project: \ptitle}}{{\bfseries\large Januar 24th, 2017}} +\runningfooter{}{\thepage}{} + +\setlength{\baselineskip}{15pt} +\setlength{\parindent}{0.0cm} +\setlength{\parskip}{0.3cm} +\renewcommand{\baselinestretch}{1.15} + +%%%%% listings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usepackage{listings} +\lstset{ + language=Matlab, + basicstyle=\ttfamily\footnotesize, + numbers=left, + numberstyle=\tiny, + title=\lstname, + showstringspaces=false, + commentstyle=\itshape\color{darkgray}, + breaklines=true, + breakautoindent=true, + columns=flexible, + frame=single, + xleftmargin=1em, + xrightmargin=1em, + aboveskip=10pt +} + +%%%%% math stuff: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\usepackage{amsmath} +\usepackage{amssymb} +\usepackage{bm} +\usepackage{dsfont} +\newcommand{\naZ}{\mathds{N}} +\newcommand{\gaZ}{\mathds{Z}} +\newcommand{\raZ}{\mathds{Q}} +\newcommand{\reZ}{\mathds{R}} +\newcommand{\reZp}{\mathds{R^+}} +\newcommand{\reZpN}{\mathds{R^+_0}} +\newcommand{\koZ}{\mathds{C}} + +%%%%% page breaks %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newcommand{\continue}{\vfill\hspace*{\fill}$\rightarrow$\newpage} + +%%%%% new commands %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\newcommand{\qt}[1]{\textbf{#1}\\} +\newcommand{\code}[1]{\texttt{#1}} + diff --git a/projects/instructions.tex b/projects/instructions.tex new file mode 100644 index 0000000..4e0b1cf --- /dev/null +++ b/projects/instructions.tex @@ -0,0 +1,59 @@ +\setlength{\fboxsep}{2ex} +\fbox{\parbox{1\linewidth}{\small + + {\bf Evaluation criteria:} + + Each project has three elements that are graded: (i) the code, + (ii) the slides/figures, and (iii) the presentation. + + \vspace{1ex} + {\bf Dates:} + + The {\bf code} and the {\bf presentation} should be uploaded to + ILIAS at latest on Thursday, February 9th, 12:59h. We will + store all presentations on one computer to allow fast + transitions between talks. The presentations start on Thursday, + February 9th at 1:00h c.t.. + + \vspace{1ex} + {\bf Files:} + + Please hand in your presentation as a pdf file. Bundle + everything (the pdf, the code, and the data) into a {\em single} + zip-file. + + \vspace{1ex} + {\bf Code:} + + The {\bf code} should be executable without any further + adjustments from our side. A single \texttt{main.m} script + should coordinate the analysis by calling functions and + sub-scripts and should produce the {\em same} figures + (\texttt{saveas()}-function, pdf or png format) that you use in + your slides. The code should be properly commented and + comprehensible by a third person (use proper and consistent + variable and function names). + % Hint: make the zip file you want to upload, unpack it + % somewhere else and check if your main script is running. + + \vspace{1ex} + + \emph{Please write your name and matriculation number as a + comment at the top of the \texttt{main.m} script.} + + + \vspace{1ex} + {\bf Presentation:} + + The {\bf presentation} should be {\em at most} 10min long and be + held in English. In the presentation you should (i) briefly + describe the problem, (ii) present figures introducing, showing, + and discussing your results, and (iii) explain how you solved + the problem algorithmically (don't show your entire code). All + data-related figures you show in the presentation should be + produced by your program --- no editing or labeling by + PowerPoint or other software. It is always a good idea to + illustrate the problem with basic plots of the raw-data. Make + sure the axis labels are large enough! + +}} diff --git a/projects/project.mk b/projects/project.mk new file mode 100644 index 0000000..2f8d3b9 --- /dev/null +++ b/projects/project.mk @@ -0,0 +1,25 @@ +BASENAME=$(subst project_,,$(notdir $(CURDIR))) + +latex: + pdflatex $(BASENAME).tex + pdflatex $(BASENAME).tex + + +pdf: $(BASENAME).pdf + +$(BASENAME).pdf : $(BASENAME).tex ../header.tex ../instructions.tex + pdflatex -interaction=scrollmode $< | tee /dev/stderr | fgrep -q "Rerun to get cross-references right" && pdflatex -interaction=scrollmode $< || true + + +watch : + while true; do ! make -q pdf && make pdf; sleep 0.5; done + +clean: + rm -f *~ code/*~ solution/*~ data/*~ + rm -rf *.log *.aux *.out auto + rm -f `basename *.tex .tex`.pdf + rm -f *.zip + +zip: latex + rm -f zip $(BASENAME).zip + zip $(BASENAME).zip *.pdf *.m data/* $(ZIPFILES) diff --git a/projects/project_adaptation_fit/Makefile b/projects/project_adaptation_fit/Makefile index 437b664..a7b3726 100644 --- a/projects/project_adaptation_fit/Makefile +++ b/projects/project_adaptation_fit/Makefile @@ -1,10 +1,3 @@ -latex: - pdflatex *.tex > /dev/null - pdflatex *.tex > /dev/null +ZIPFILES= -clean: - rm -rf *.log *.aux *.zip *.out auto - rm -f `basename *.tex .tex`.pdf - -zip: latex - zip `basename *.tex .tex`.zip *.pdf *.dat data/*.mat +include ../project.mk diff --git a/projects/project_adaptation_fit/adaptation_fit.tex b/projects/project_adaptation_fit/adaptation_fit.tex index 715deed..13ea510 100644 --- a/projects/project_adaptation_fit/adaptation_fit.tex +++ b/projects/project_adaptation_fit/adaptation_fit.tex @@ -1,32 +1,14 @@ -\documentclass[addpoints,11pt]{exam} -\usepackage{url} -\usepackage{color} -\usepackage{hyperref} - -\pagestyle{headandfoot} -\runningheadrule -\firstpageheadrule -\firstpageheader{Scientific Computing}{Project Assignment}{WS 2016/17} -%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} -\firstpagefooter{}{}{{\bf Supervisor:} Jan Grewe} -\runningfooter{}{}{} -\pointsinmargin -\bracketedpoints - -%\printanswers -%\shadedsolutions +\documentclass[a4paper,12pt,pdftex]{exam} +\newcommand{\ptitle}{Adaptation time-constant} +\input{../header.tex} +\firstpagefooter{Supervisor: Jan Grewe}{phone: 29 74588}% +{email: jan.grewe@uni-tuebingen.de} \begin{document} -%%%%%%%%%%%%%%%%%%%%% Submission instructions %%%%%%%%%%%%%%%%%%%%%%%%% -\sffamily -% \begin{flushright} -% \gradetable[h][questions] -% \end{flushright} -\begin{center} - \input{../disclaimer.tex} -\end{center} +\input{../instructions.tex} + %%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%% \section*{Estimating the adaptation time-constant.} diff --git a/projects/project_eod/Makefile b/projects/project_eod/Makefile index 2574730..a7b3726 100644 --- a/projects/project_eod/Makefile +++ b/projects/project_eod/Makefile @@ -1,10 +1,3 @@ -latex: - pdflatex *.tex > /dev/null - pdflatex *.tex > /dev/null +ZIPFILES= -clean: - rm -rf *.log *.aux *.zip *.out auto - rm -f `basename *.tex .tex`.pdf - -zip: latex - zip `basename *.tex .tex`.zip *.pdf data/*.mat +include ../project.mk diff --git a/projects/project_eod/eod.tex b/projects/project_eod/eod.tex index c0b6e3d..647a756 100644 --- a/projects/project_eod/eod.tex +++ b/projects/project_eod/eod.tex @@ -1,32 +1,14 @@ -\documentclass[addpoints,11pt]{exam} -\usepackage{url} -\usepackage{color} -\usepackage{hyperref} - -\pagestyle{headandfoot} -\runningheadrule -\firstpageheadrule -\firstpageheader{Scientific Computing}{Project Assignment}{WS 2016/17} -%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} -\firstpagefooter{}{}{{\bf Supervisor:} Jan Grewe} -\runningfooter{}{}{} -\pointsinmargin -\bracketedpoints - -%\printanswers -%\shadedsolutions +\documentclass[a4paper,12pt,pdftex]{exam} +\newcommand{\ptitle}{EOD waveform} +\input{../header.tex} +\firstpagefooter{Supervisor: Jan Grewe}{phone: 29 74588}% +{email: jan.grewe@uni-tuebingen.de} \begin{document} -%%%%%%%%%%%%%%%%%%%%% Submission instructions %%%%%%%%%%%%%%%%%%%%%%%%% -\sffamily -% \begin{flushright} -% \gradetable[h][questions] -% \end{flushright} -\begin{center} - \input{../disclaimer.tex} -\end{center} +\input{../instructions.tex} + %%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/projects/project_eyetracker/Makefile b/projects/project_eyetracker/Makefile index 064bfc3..a7b3726 100644 --- a/projects/project_eyetracker/Makefile +++ b/projects/project_eyetracker/Makefile @@ -1,10 +1,3 @@ -latex: - pdflatex *.tex > /dev/null - pdflatex *.tex > /dev/null +ZIPFILES= -clean: - rm -rf *.log *.aux *.zip *.out auto - rm -f `basename *.tex .tex`.pdf - -zip: latex - zip `basename *.tex .tex`.zip *.pdf data/*.mat +include ../project.mk diff --git a/projects/project_eyetracker/eyetracker.tex b/projects/project_eyetracker/eyetracker.tex index 447d6b0..9ad9afb 100644 --- a/projects/project_eyetracker/eyetracker.tex +++ b/projects/project_eyetracker/eyetracker.tex @@ -1,32 +1,14 @@ -\documentclass[addpoints,11pt]{exam} -\usepackage{url} -\usepackage{color} -\usepackage{hyperref} - -\pagestyle{headandfoot} -\runningheadrule -\firstpageheadrule -\firstpageheader{Scientific Computing}{Project Assignment}{WS 2016/17} -%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} -\firstpagefooter{}{}{{\bf Supervisor:} Jan Grewe} -\runningfooter{}{}{} -\pointsinmargin -\bracketedpoints - -%\printanswers -%\shadedsolutions +\documentclass[a4paper,12pt,pdftex]{exam} +\newcommand{\ptitle}{Eye tracker} +\input{../header.tex} +\firstpagefooter{Supervisor: Jan Grewe}{phone: 29 74588}% +{email: jan.grewe@uni-tuebingen.de} \begin{document} -%%%%%%%%%%%%%%%%%%%%% Submission instructions %%%%%%%%%%%%%%%%%%%%%%%%% -\sffamily -% \begin{flushright} -% \gradetable[h][questions] -% \end{flushright} -\begin{center} - \input{../disclaimer.tex} -\end{center} +\input{../instructions.tex} + %%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%% \section*{Analysis of eye trajectories.} diff --git a/projects/project_fano_slope/Makefile b/projects/project_fano_slope/Makefile index 6422eb4..a7b3726 100644 --- a/projects/project_fano_slope/Makefile +++ b/projects/project_fano_slope/Makefile @@ -1,10 +1,3 @@ -latex: - pdflatex *.tex > /dev/null - pdflatex *.tex > /dev/null +ZIPFILES= -clean: - rm -rf *.log *.aux *.zip *.out auto - rm -f `basename *.tex .tex`.pdf - -zip: latex - zip `basename *.tex .tex`.zip *.pdf *.dat *.mat *.m +include ../project.mk diff --git a/projects/project_fano_slope/fano_slope.tex b/projects/project_fano_slope/fano_slope.tex index 477b770..a1f6c89 100644 --- a/projects/project_fano_slope/fano_slope.tex +++ b/projects/project_fano_slope/fano_slope.tex @@ -1,52 +1,14 @@ -\documentclass[addpoints,11pt]{exam} -\usepackage{url} -\usepackage{color} -\usepackage{hyperref} - -\pagestyle{headandfoot} -\runningheadrule -\firstpageheadrule -\firstpageheader{Scientific Computing}{Project Assignment}{11/02/2014 - -- 11/05/2014} -%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} -\firstpagefooter{}{}{{\bf Supervisor:} Jan Benda} -\runningfooter{}{}{} -\pointsinmargin -\bracketedpoints - -%\printanswers -%\shadedsolutions - -%%%%% listings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\usepackage{listings} -\lstset{ - basicstyle=\ttfamily, - numbers=left, - showstringspaces=false, - language=Matlab, - breaklines=true, - breakautoindent=true, - columns=flexible, - frame=single, -% captionpos=t, - xleftmargin=2em, - xrightmargin=1em, -% aboveskip=11pt, - %title=\lstname, -% title={\protect\filename@parse{\lstname}\protect\filename@base.\protect\filename@ext} - } +\documentclass[a4paper,12pt,pdftex]{exam} +\newcommand{\ptitle}{Stimulus discrimination} +\input{../header.tex} +\firstpagefooter{Supervisor: Jan Benda}{phone: 29 74573}% +{email: jan.benda@uni-tuebingen.de} \begin{document} -%%%%%%%%%%%%%%%%%%%%% Submission instructions %%%%%%%%%%%%%%%%%%%%%%%%% -\sffamily -% \begin{flushright} -% \gradetable[h][questions] -% \end{flushright} - -\begin{center} - \input{../disclaimer.tex} -\end{center} + +\input{../instructions.tex} + %%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/projects/project_fano_slope/lifboltzmannspikes.m b/projects/project_fano_slope/lifboltzmannspikes.m new file mode 100644 index 0000000..6da50d8 --- /dev/null +++ b/projects/project_fano_slope/lifboltzmannspikes.m @@ -0,0 +1,35 @@ +function spikes = lifboltzmannspikes(trials, input, tmax, gain) +% Generate spike times of a leaky integrate-and-fire neuron. +% trials: the number of trials to be generated. +% input: the stimulus intensity. +% tmax: the duration of a trial. +% gain: gain of the neuron, i.e. the slope factor of the boltzmann input. + + tau = 0.01; + D = 1e-2; + imax = 25; + ithresh = 10; + slope = gain; + vreset = 0.0; + vthresh = 10.0; + dt = 1e-4; + + n = ceil(tmax/dt); + inb = imax./(1.0+exp(-slope.*(input - ithresh))); + spikes = cell(trials, 1); + for k=1:trials + times = []; + j = 1; + v = vreset + (vthresh - vreset) * rand(); + noise = sqrt(2.0*D)*randn(n, 1)/sqrt(dt); + for i=1:n + v = v + (- v + noise(i) + inb)*dt/tau; + if v >= vthresh + v = vreset; + times(j) = i*dt; + j = j + 1; + end + end + spikes{k} = times; + end +end diff --git a/projects/project_fano_slope/solution/fanoslope.m b/projects/project_fano_slope/solution/fanoslope.m index d2bd643..cd0d27d 100644 --- a/projects/project_fano_slope/solution/fanoslope.m +++ b/projects/project_fano_slope/solution/fanoslope.m @@ -76,7 +76,8 @@ plot(false2s, true1s); T = 0.1; gains = 0.01:0.01:1.0; cmax = 100; -ds = zeros(length(gains), 1); +dstt = zeros(length(gains), 1); +dsff = zeros(length(gains), 1); for k = 1:length(gains) gain = gains(k); spikes1 = lifboltzmannspikes(trials, I1, tmax, gain); @@ -84,9 +85,11 @@ for k = 1:length(gains) [c1, b1] = counthist(spikes1, 0.0, tmax, T, cmax); [c2, b2] = counthist(spikes2, 0.0, tmax, T, cmax); [d, thresholds, true1s, false1s, true2s, false2s, pratio] = discriminability(spikes1, spikes2, tmax, T, cmax); - ds(k) = d; + dstt(k) = d; + dsff(k) = min(false1s + false2s); end figure() -plot(gains, ds) - - +plot(gains, dstt); +hold on; +plot(gains, dsff); +hold off; diff --git a/projects/project_fano_slope/solution/lifboltzmannspikes.m b/projects/project_fano_slope/solution/lifboltzmannspikes.m index 85ea63e..6da50d8 100644 --- a/projects/project_fano_slope/solution/lifboltzmannspikes.m +++ b/projects/project_fano_slope/solution/lifboltzmannspikes.m @@ -20,7 +20,7 @@ function spikes = lifboltzmannspikes(trials, input, tmax, gain) for k=1:trials times = []; j = 1; - v = vreset; + v = vreset + (vthresh - vreset) * rand(); noise = sqrt(2.0*D)*randn(n, 1)/sqrt(dt); for i=1:n v = v + (- v + noise(i) + inb)*dt/tau; diff --git a/projects/project_fano_test/Makefile b/projects/project_fano_test/Makefile index dad25ce..a7b3726 100644 --- a/projects/project_fano_test/Makefile +++ b/projects/project_fano_test/Makefile @@ -1,10 +1,3 @@ -latex: - pdflatex *.tex > /dev/null - pdflatex *.tex > /dev/null +ZIPFILES= -clean: - rm -rf *.log *.aux *.zip *.out auto - rm -f `basename *.tex .tex`.pdf - -zip: latex - zip `basename *.tex .tex`.zip *.pdf *.dat *.mat +include ../project.mk diff --git a/projects/project_fano_test/fano.mat b/projects/project_fano_test/data/fano.mat similarity index 100% rename from projects/project_fano_test/fano.mat rename to projects/project_fano_test/data/fano.mat diff --git a/projects/project_fano_test/fano.tex b/projects/project_fano_test/fano_test.tex similarity index 60% rename from projects/project_fano_test/fano.tex rename to projects/project_fano_test/fano_test.tex index 4e80405..2e488e2 100644 --- a/projects/project_fano_test/fano.tex +++ b/projects/project_fano_test/fano_test.tex @@ -1,37 +1,16 @@ -\documentclass[addpoints,11pt]{exam} -\usepackage{url} -\usepackage{color} -\usepackage{hyperref} - -\pagestyle{headandfoot} -\runningheadrule -\firstpageheadrule -\firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014 - -- 11/06/2014} -%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} -\firstpagefooter{}{}{{\bf Supervisor:} Fabian Sinz} -\runningfooter{}{}{} -\pointsinmargin -\bracketedpoints - -%\printanswers -%\shadedsolutions +\documentclass[a4paper,12pt,pdftex]{exam} +\newcommand{\ptitle}{Fano factor test} +\input{../header.tex} +\firstpagefooter{Supervisor: Jan Benda}{phone: 29 74573}% +{email: jan.benda@uni-tuebingen.de} \begin{document} -%%%%%%%%%%%%%%%%%%%%% Submission instructions %%%%%%%%%%%%%%%%%%%%%%%%% -\sffamily -% \begin{flushright} -% \gradetable[h][questions] -% \end{flushright} -\begin{center} - \input{../disclaimer.tex} -\end{center} - -%%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%% +\input{../instructions.tex} +%%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%% \begin{questions} \question The Fano factor $F=\frac{\sigma^2}{\mu}$ relates the variance of a spike count $\sigma^2$ to the mean spike count diff --git a/projects/project_fano_time/Makefile b/projects/project_fano_time/Makefile index 6422eb4..a7b3726 100644 --- a/projects/project_fano_time/Makefile +++ b/projects/project_fano_time/Makefile @@ -1,10 +1,3 @@ -latex: - pdflatex *.tex > /dev/null - pdflatex *.tex > /dev/null +ZIPFILES= -clean: - rm -rf *.log *.aux *.zip *.out auto - rm -f `basename *.tex .tex`.pdf - -zip: latex - zip `basename *.tex .tex`.zip *.pdf *.dat *.mat *.m +include ../project.mk diff --git a/projects/project_fano_time/fano_time.tex b/projects/project_fano_time/fano_time.tex index 741916d..e2960af 100644 --- a/projects/project_fano_time/fano_time.tex +++ b/projects/project_fano_time/fano_time.tex @@ -1,52 +1,14 @@ -\documentclass[addpoints,11pt]{exam} -\usepackage{url} -\usepackage{color} -\usepackage{hyperref} - -\pagestyle{headandfoot} -\runningheadrule -\firstpageheadrule -\firstpageheader{Scientific Computing}{Project Assignment}{11/02/2014 - -- 11/05/2014} -%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} -\firstpagefooter{}{}{{\bf Supervisor:} Jan Benda} -\runningfooter{}{}{} -\pointsinmargin -\bracketedpoints - -%\printanswers -%\shadedsolutions - -%%%%% listings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\usepackage{listings} -\lstset{ - basicstyle=\ttfamily, - numbers=left, - showstringspaces=false, - language=Matlab, - breaklines=true, - breakautoindent=true, - columns=flexible, - frame=single, -% captionpos=t, - xleftmargin=2em, - xrightmargin=1em, -% aboveskip=11pt, - %title=\lstname, -% title={\protect\filename@parse{\lstname}\protect\filename@base.\protect\filename@ext} - } +\documentclass[a4paper,12pt,pdftex]{exam} +\newcommand{\ptitle}{Stimulus discrimination} +\input{../header.tex} +\firstpagefooter{Supervisor: Jan Benda}{phone: 29 74573}% +{email: jan.benda@uni-tuebingen.de} \begin{document} -%%%%%%%%%%%%%%%%%%%%% Submission instructions %%%%%%%%%%%%%%%%%%%%%%%%% -\sffamily -% \begin{flushright} -% \gradetable[h][questions] -% \end{flushright} - -\begin{center} - \input{../disclaimer.tex} -\end{center} + +\input{../instructions.tex} + %%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/projects/project_fano_time/lifspikes.m b/projects/project_fano_time/lifspikes.m index c1bec46..c079742 100644 --- a/projects/project_fano_time/lifspikes.m +++ b/projects/project_fano_time/lifspikes.m @@ -19,7 +19,7 @@ function spikes = lifspikes(trials, input, tmax) for k=1:trials times = []; j = 1; - v = vreset + (vthresh-vreset)*rand(1); + v = vreset + (vthresh-vreset)*rand(); noise = sqrt(2.0*D)*randn(n, 1)/sqrt(dt); for i=1:length(noise) v = v + (- v + noise(i) + input)*dt/tau; diff --git a/projects/project_fano_time/solution/lifspikes.m b/projects/project_fano_time/solution/lifspikes.m index c1bec46..c079742 100644 --- a/projects/project_fano_time/solution/lifspikes.m +++ b/projects/project_fano_time/solution/lifspikes.m @@ -19,7 +19,7 @@ function spikes = lifspikes(trials, input, tmax) for k=1:trials times = []; j = 1; - v = vreset + (vthresh-vreset)*rand(1); + v = vreset + (vthresh-vreset)*rand(); noise = sqrt(2.0*D)*randn(n, 1)/sqrt(dt); for i=1:length(noise) v = v + (- v + noise(i) + input)*dt/tau; diff --git a/projects/project_input_resistance/Makefile b/projects/project_input_resistance/Makefile index 8c2681a..a7b3726 100644 --- a/projects/project_input_resistance/Makefile +++ b/projects/project_input_resistance/Makefile @@ -1,10 +1,3 @@ -latex: - pdflatex *.tex > /dev/null - pdflatex *.tex > /dev/null +ZIPFILES= -clean: - rm -rf *.log *.aux *.out auto - rm -f `basename *.tex .tex`.pdf - -zip: latex - zip `basename *.tex .tex`.zip *.pdf data/*.mat +include ../project.mk diff --git a/projects/project_input_resistance/data/resistance_CMS_1.mat b/projects/project_input_resistance/data/resistance_CMS_1.mat new file mode 100644 index 0000000..15e3d70 Binary files /dev/null and b/projects/project_input_resistance/data/resistance_CMS_1.mat differ diff --git a/projects/project_input_resistance/data/resistance_CMS_2.mat b/projects/project_input_resistance/data/resistance_CMS_2.mat new file mode 100644 index 0000000..c5f08d2 Binary files /dev/null and b/projects/project_input_resistance/data/resistance_CMS_2.mat differ diff --git a/projects/project_input_resistance/data/resistance_CMS_3.mat b/projects/project_input_resistance/data/resistance_CMS_3.mat new file mode 100644 index 0000000..bdbd377 Binary files /dev/null and b/projects/project_input_resistance/data/resistance_CMS_3.mat differ diff --git a/projects/project_input_resistance/data/resistance_CMS_4.mat b/projects/project_input_resistance/data/resistance_CMS_4.mat new file mode 100644 index 0000000..4b48c01 Binary files /dev/null and b/projects/project_input_resistance/data/resistance_CMS_4.mat differ diff --git a/projects/project_input_resistance/data/resistance_CMS_5.mat b/projects/project_input_resistance/data/resistance_CMS_5.mat new file mode 100644 index 0000000..34940b6 Binary files /dev/null and b/projects/project_input_resistance/data/resistance_CMS_5.mat differ diff --git a/projects/project_input_resistance/data/resistance_MS_1.mat b/projects/project_input_resistance/data/resistance_MS_1.mat new file mode 100644 index 0000000..6d1e55f Binary files /dev/null and b/projects/project_input_resistance/data/resistance_MS_1.mat differ diff --git a/projects/project_input_resistance/data/resistance_MS_2.mat b/projects/project_input_resistance/data/resistance_MS_2.mat new file mode 100644 index 0000000..b5f3ccd Binary files /dev/null and b/projects/project_input_resistance/data/resistance_MS_2.mat differ diff --git a/projects/project_input_resistance/data/resistance_MS_3.mat b/projects/project_input_resistance/data/resistance_MS_3.mat new file mode 100644 index 0000000..3a83f8c Binary files /dev/null and b/projects/project_input_resistance/data/resistance_MS_3.mat differ diff --git a/projects/project_input_resistance/data/resistance_MS_4.mat b/projects/project_input_resistance/data/resistance_MS_4.mat new file mode 100644 index 0000000..e684fda Binary files /dev/null and b/projects/project_input_resistance/data/resistance_MS_4.mat differ diff --git a/projects/project_input_resistance/data/resistance_MS_5.mat b/projects/project_input_resistance/data/resistance_MS_5.mat new file mode 100644 index 0000000..b90e4c8 Binary files /dev/null and b/projects/project_input_resistance/data/resistance_MS_5.mat differ diff --git a/projects/project_input_resistance/input_resistance.tex b/projects/project_input_resistance/input_resistance.tex index 189aefa..68a3b83 100644 --- a/projects/project_input_resistance/input_resistance.tex +++ b/projects/project_input_resistance/input_resistance.tex @@ -1,32 +1,14 @@ -\documentclass[addpoints,11pt]{exam} -\usepackage{url} -\usepackage{color} -\usepackage{hyperref} - -\pagestyle{headandfoot} -\runningheadrule -\firstpageheadrule -\firstpageheader{Scientific Computing}{Project Assignment}{WS 2016/17} -%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} -\firstpagefooter{}{}{{\bf Supervisor:} Jan Grewe} -\runningfooter{}{}{} -\pointsinmargin -\bracketedpoints - -%\printanswers -%\shadedsolutions +\documentclass[a4paper,12pt,pdftex]{exam} +\newcommand{\ptitle}{Cellular properties} +\input{../header.tex} +\firstpagefooter{Supervisor: Jan Grewe}{phone: 29 74588}% +{email: jan.grewe@uni-tuebingen.de} \begin{document} -%%%%%%%%%%%%%%%%%%%%% Submission instructions %%%%%%%%%%%%%%%%%%%%%%%%% -\sffamily -% \begin{flushright} -% \gradetable[h][questions] -% \end{flushright} -\begin{center} - \input{../disclaimer.tex} -\end{center} +\input{../instructions.tex} + %%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%% \section*{Estimating cellular properties of different cell types.} diff --git a/projects/project_isicorrelations/Makefile b/projects/project_isicorrelations/Makefile index 6422eb4..a7b3726 100644 --- a/projects/project_isicorrelations/Makefile +++ b/projects/project_isicorrelations/Makefile @@ -1,10 +1,3 @@ -latex: - pdflatex *.tex > /dev/null - pdflatex *.tex > /dev/null +ZIPFILES= -clean: - rm -rf *.log *.aux *.zip *.out auto - rm -f `basename *.tex .tex`.pdf - -zip: latex - zip `basename *.tex .tex`.zip *.pdf *.dat *.mat *.m +include ../project.mk diff --git a/projects/project_isicorrelations/isicorrelations.tex b/projects/project_isicorrelations/isicorrelations.tex index d54ef58..f9eee80 100644 --- a/projects/project_isicorrelations/isicorrelations.tex +++ b/projects/project_isicorrelations/isicorrelations.tex @@ -1,55 +1,16 @@ -\documentclass[addpoints,11pt]{exam} -\usepackage{url} -\usepackage{color} -\usepackage{hyperref} - -\pagestyle{headandfoot} -\runningheadrule -\firstpageheadrule -\firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014 - -- 11/06/2014} -%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} -\firstpagefooter{}{}{{\bf Supervisor:} Jan Benda} -\runningfooter{}{}{} -\pointsinmargin -\bracketedpoints - -%\printanswers -%\shadedsolutions - -%%%%% listings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\usepackage{listings} -\lstset{ - basicstyle=\ttfamily, - numbers=left, - showstringspaces=false, - language=Matlab, - breaklines=true, - breakautoindent=true, - columns=flexible, - frame=single, -% captionpos=t, - xleftmargin=2em, - xrightmargin=1em, -% aboveskip=11pt, - %title=\lstname, -% title={\protect\filename@parse{\lstname}\protect\filename@base.\protect\filename@ext} - } +\documentclass[a4paper,12pt,pdftex]{exam} +\newcommand{\ptitle}{Interspike-intervall correlations} +\input{../header.tex} +\firstpagefooter{Supervisor: Jan Benda}{phone: 29 74573}% +{email: jan.benda@uni-tuebingen.de} \begin{document} -%%%%%%%%%%%%%%%%%%%%% Submission instructions %%%%%%%%%%%%%%%%%%%%%%%%% -\sffamily -% \begin{flushright} -% \gradetable[h][questions] -% \end{flushright} -\begin{center} - \input{../disclaimer.tex} -\end{center} +\input{../instructions.tex} -%%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%% 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, diff --git a/projects/project_isicorrelations/lifadaptspikes.m b/projects/project_isicorrelations/lifadaptspikes.m index 2ef1874..e2de8fc 100644 --- a/projects/project_isicorrelations/lifadaptspikes.m +++ b/projects/project_isicorrelations/lifadaptspikes.m @@ -32,7 +32,7 @@ function spikes = lifadaptspikes( trials, input, tmaxdt, D, tauadapt, adaptincr for k=1:trials times = []; j = 1; - v = vreset; + v = vreset + (vthresh-vreset)*rand(); a = 0.0; noise = sqrt(2.0*D)*randn( length( input ), 1 )/sqrt(dt); for i=1:length( noise ) diff --git a/projects/project_isipdffit/Makefile b/projects/project_isipdffit/Makefile index 6422eb4..a7b3726 100644 --- a/projects/project_isipdffit/Makefile +++ b/projects/project_isipdffit/Makefile @@ -1,10 +1,3 @@ -latex: - pdflatex *.tex > /dev/null - pdflatex *.tex > /dev/null +ZIPFILES= -clean: - rm -rf *.log *.aux *.zip *.out auto - rm -f `basename *.tex .tex`.pdf - -zip: latex - zip `basename *.tex .tex`.zip *.pdf *.dat *.mat *.m +include ../project.mk diff --git a/projects/project_isipdffit/isipdffit.tex b/projects/project_isipdffit/isipdffit.tex index 4169c81..c6c07cb 100644 --- a/projects/project_isipdffit/isipdffit.tex +++ b/projects/project_isipdffit/isipdffit.tex @@ -1,52 +1,14 @@ -\documentclass[addpoints,11pt]{exam} -\usepackage{url} -\usepackage{color} -\usepackage{hyperref} - -\pagestyle{headandfoot} -\runningheadrule -\firstpageheadrule -\firstpageheader{Scientific Computing}{Project Assignment}{11/02/2014 - -- 11/05/2014} -%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} -\firstpagefooter{}{}{{\bf Supervisor:} Jan Benda} -\runningfooter{}{}{} -\pointsinmargin -\bracketedpoints - -%\printanswers -%\shadedsolutions - -%%%%% listings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\usepackage{listings} -\lstset{ - basicstyle=\ttfamily, - numbers=left, - showstringspaces=false, - language=Matlab, - breaklines=true, - breakautoindent=true, - columns=flexible, - frame=single, -% captionpos=t, - xleftmargin=2em, - xrightmargin=1em, -% aboveskip=11pt, - %title=\lstname, -% title={\protect\filename@parse{\lstname}\protect\filename@base.\protect\filename@ext} - } +\documentclass[a4paper,12pt,pdftex]{exam} +\newcommand{\ptitle}{ISI distributions} +\input{../header.tex} +\firstpagefooter{Supervisor: Jan Benda}{phone: 29 74573}% +{email: jan.benda@uni-tuebingen.de} \begin{document} -%%%%%%%%%%%%%%%%%%%%% Submission instructions %%%%%%%%%%%%%%%%%%%%%%%%% -\sffamily -% \begin{flushright} -% \gradetable[h][questions] -% \end{flushright} - -\begin{center} - \input{../disclaimer.tex} -\end{center} + +\input{../instructions.tex} + %%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/projects/project_isipdffit/lifouspikes.m b/projects/project_isipdffit/lifouspikes.m index fc1f5d5..3bff0d0 100644 --- a/projects/project_isipdffit/lifouspikes.m +++ b/projects/project_isipdffit/lifouspikes.m @@ -28,7 +28,7 @@ function spikes = lifouspikes( trials, input, tmaxdt, D, outau ) times = []; j = 1; n = 0.0; - v = vreset; + v = vreset + (vthresh-vreset)*rand(); noise = sqrt(2.0*D)*randn( length( input ), 1 )/sqrt(dt); for i=1:length( noise ) n = n + ( - n + noise(i))*dt/outau; diff --git a/projects/project_isipdffit/pifouspikes.m b/projects/project_isipdffit/pifouspikes.m index b6516cc..f85cfae 100644 --- a/projects/project_isipdffit/pifouspikes.m +++ b/projects/project_isipdffit/pifouspikes.m @@ -28,7 +28,7 @@ function spikes = pifouspikes( trials, input, tmaxdt, D, outau ) times = []; j = 1; n = 0.0; - v = vreset; + v = vreset + (vthresh-vreset)*rand(); noise = sqrt(2.0*D)*randn( length( input ), 1 )/sqrt(dt); for i=1:length( noise ) n = n + ( - n + noise(i))*dt/outau; diff --git a/projects/project_isipdffit/solution/invgauss.m b/projects/project_isipdffit/solution/invgauss.m new file mode 100644 index 0000000..db07626 --- /dev/null +++ b/projects/project_isipdffit/solution/invgauss.m @@ -0,0 +1,11 @@ +function p = invgauss(x, mu, D) + if abs(x) < 1e-8 + p = zeros(size(x)) + else + if x < 0 + x = -x; + end + p = exp(-(x-mu).^2./4.0./D./x./mu./mu)./sqrt(4.*pi.*D.*x.^3.0); + end + p(p<1e-16) = 1e-16; +end diff --git a/projects/project_isipdffit/solution/isipdffit.m b/projects/project_isipdffit/solution/isipdffit.m new file mode 100644 index 0000000..e518161 --- /dev/null +++ b/projects/project_isipdffit/solution/isipdffit.m @@ -0,0 +1,72 @@ +%% check Pig implementation: +mu = 0.01; +D = 1.0; +dx=0.0001; +x = dx:dx:10.0; + +for D = [0.1 1 10 100] + for mu = [0.01 0.03 0.1 .03] + %pig = exp(-(x-mu).^2/4.0/D./x./mu/mu)./sqrt(4*pi*D*x.^3.0); + pig = invgauss(x,mu,D); + P = sum(pig)*dx; + mig = sum(x.*pig)*dx; + qig = sum(x.*x.*pig)*dx; + vig = qig - mig*mig; + dig = 0.5*vig/mig^3; + fprintf('Integral=%.3f\n', P); + fprintf('Average=%.3f = %.3f\n', mig, mu); + %fprintf('Variance=%.3f\n', vig); + fprintf('Diffusion=%.3f = %.3f\n\n', dig, D); + + plot(x, pig) + hold on + plot([mu mu], [0 max(pig)], 'k') + hold off + xmax = 3.0*mu; + if xmax < 0.1 + xmax = 0.1; + end + xlim([0 xmax]) + text(0.6, 0.8, sprintf('D=%.3g', D), 'units', 'normalized') + pause( 1.0 ) + end +end + + +%% fit to data: +trials = 1; +tmax = 100.0; +input = 10.0; % the input I +Dnoise = 1.0; % noise strength +outau = 0.1; % correlation time of the noise in seconds +%for input = [9.5 10.1 11.7 15.9] +% spikes = lifouspikes(trials, input, tmax, Dnoise, outau); +for input = [1.0 2.0 5.0 10.0] + spikes = pifouspikes(trials, input, tmax, Dnoise, outau); + isis = diff(spikes{1}); + mu = mean(isis); + fprintf('mean firing rate = %.0f Hz\n', 1.0/mu) + v = var(isis); + D = 0.5*v/mu^3; + [h,b] = hist(isis, 0:0.001:1); + h = h/sum(h)/(b(2)-b(1)); + bar(b, h); + hold on; + dx=0.0001; + x = dx:dx:max(isis); + pig = exp(-(x-mu).^2/4.0/D./x./mu/mu)./sqrt(4*pi*D*x.^3.0); + plot(x, pig, 'r', 'linewidth', 2); + % mle fit: + phat = mle(isis, 'pdf', @invgauss, 'start', [0.1 0.1] ); + mu = phat(1); + D = phat(2); + pig = exp(-(x-mu).^2/4.0/D./x./mu/mu)./sqrt(4*pi*D*x.^3.0); + plot(x, pig, 'c', 'linewidth', 2); + xlim([0 4.0*mu]) + hold off; + pause( 4.0 ) +end + + + + diff --git a/projects/project_lif/Makefile b/projects/project_lif/Makefile index 6422eb4..a7b3726 100644 --- a/projects/project_lif/Makefile +++ b/projects/project_lif/Makefile @@ -1,10 +1,3 @@ -latex: - pdflatex *.tex > /dev/null - pdflatex *.tex > /dev/null +ZIPFILES= -clean: - rm -rf *.log *.aux *.zip *.out auto - rm -f `basename *.tex .tex`.pdf - -zip: latex - zip `basename *.tex .tex`.zip *.pdf *.dat *.mat *.m +include ../project.mk diff --git a/projects/project_lif/lif.tex b/projects/project_lif/lif.tex index e42d352..077c472 100644 --- a/projects/project_lif/lif.tex +++ b/projects/project_lif/lif.tex @@ -1,53 +1,14 @@ -\documentclass[addpoints,11pt]{exam} -\usepackage{url} -\usepackage{color} -\usepackage{hyperref} - -\pagestyle{headandfoot} -\runningheadrule -\firstpageheadrule -\firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014 - -- 11/06/2014} -%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} -\firstpagefooter{}{}{} -\runningfooter{}{}{} -\pointsinmargin -\bracketedpoints - -%%%%% listings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\usepackage{listings} -\lstset{ - basicstyle=\ttfamily, - numbers=left, - showstringspaces=false, - language=Matlab, - breaklines=true, - breakautoindent=true, - columns=flexible, - frame=single, -% captionpos=t, - xleftmargin=2em, - xrightmargin=1em, -% aboveskip=11pt, - %title=\lstname, -% title={\protect\filename@parse{\lstname}\protect\filename@base.\protect\filename@ext} - } - - -%\printanswers -%\shadedsolutions +\documentclass[a4paper,12pt,pdftex]{exam} +\newcommand{\ptitle}{Integrate-and-fire neuron} +\input{../header.tex} +\firstpagefooter{Supervisor: Jan Benda}{phone: 29 74573}% +{email: jan.benda@uni-tuebingen.de} \begin{document} -%%%%%%%%%%%%%%%%%%%%% Submission instructions %%%%%%%%%%%%%%%%%%%%%%%%% -\sffamily -% \begin{flushright} -% \gradetable[h][questions] -% \end{flushright} -\begin{center} - \input{../disclaimer.tex} -\end{center} +\input{../instructions.tex} + %%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%% @@ -89,12 +50,15 @@ time = [0.0:dt:tmax]; % t_i and compute $V(t)$ for $t_{max}=50$\,ms. Plot $V(t)$ and compare it to the expected result of $V(t) = \exp(-t/\tau)$. + Vary the time step $\Delta t$ by factors of 10 and discuss + accuracy of numerical solutions. What is a good time step? + Why is $V=0$ the resting potential of this neuron? \part Response of the passive membrane to a step input. Set $V_0=0$. Construct a vector for the input $E(t)$ such that - $E(t)=0$ for $t<20$\,ms and $t>70$\,ms and $E(t)=10$\,mV for + $E(t)=0$ for $t\le 20$\,ms and $t\ge 70$\,ms and $E(t)=10$\,mV for $20$\,ms $ /dev/null - pdflatex *.tex > /dev/null +ZIPFILES= -clean: - rm -rf *.log *.aux *.zip *.out auto - rm -f `basename *.tex .tex`.pdf - -zip: latex - zip `basename *.tex .tex`.zip *.pdf *.dat *.mat +include ../project.mk diff --git a/projects/project_mutualinfo/decisions.mat b/projects/project_mutualinfo/data/decisions.mat similarity index 100% rename from projects/project_mutualinfo/decisions.mat rename to projects/project_mutualinfo/data/decisions.mat diff --git a/projects/project_mutualinfo/mutualinfo.tex b/projects/project_mutualinfo/mutualinfo.tex index f8ae91f..f2eef9b 100644 --- a/projects/project_mutualinfo/mutualinfo.tex +++ b/projects/project_mutualinfo/mutualinfo.tex @@ -1,36 +1,16 @@ -\documentclass[addpoints,11pt]{exam} -\usepackage{url} -\usepackage{color} -\usepackage{hyperref} - -\pagestyle{headandfoot} -\runningheadrule -\firstpageheadrule -\firstpageheader{Scientific Computing}{Project Assignment}{11/02/2014 - -- 11/05/2014} -%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} -\firstpagefooter{}{}{{\bf Supervisor:} Jan Benda} -\runningfooter{}{}{} -\pointsinmargin -\bracketedpoints - -%\printanswers -%\shadedsolutions +\documentclass[a4paper,12pt,pdftex]{exam} +\newcommand{\ptitle}{Mutual information} +\input{../header.tex} +\firstpagefooter{Supervisor: Jan Benda}{phone: 29 74573}% +{email: jan.benda@uni-tuebingen.de} \begin{document} -%%%%%%%%%%%%%%%%%%%%% Submission instructions %%%%%%%%%%%%%%%%%%%%%%%%% -\sffamily -% \begin{flushright} -% \gradetable[h][questions] -% \end{flushright} -\begin{center} - \input{../disclaimer.tex} -\end{center} +\input{../instructions.tex} -%%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%% \begin{questions} \question A subject was presented two possible objects for a very brief time ($50$\,ms). The task of the subject was to report which of diff --git a/projects/project_noiseficurves/Makefile b/projects/project_noiseficurves/Makefile index 6422eb4..a7b3726 100644 --- a/projects/project_noiseficurves/Makefile +++ b/projects/project_noiseficurves/Makefile @@ -1,10 +1,3 @@ -latex: - pdflatex *.tex > /dev/null - pdflatex *.tex > /dev/null +ZIPFILES= -clean: - rm -rf *.log *.aux *.zip *.out auto - rm -f `basename *.tex .tex`.pdf - -zip: latex - zip `basename *.tex .tex`.zip *.pdf *.dat *.mat *.m +include ../project.mk diff --git a/projects/project_noiseficurves/lifspikes.m b/projects/project_noiseficurves/lifspikes.m index 5c06505..313397f 100644 --- a/projects/project_noiseficurves/lifspikes.m +++ b/projects/project_noiseficurves/lifspikes.m @@ -18,7 +18,7 @@ function spikes = lifspikes(trials, input, tmax, D) for k=1:trials times = []; j = 1; - v = vreset; + v = vreset + (vthresh-vreset)*rand(); noise = sqrt(2.0*D)*randn(n, 1)/sqrt(dt); for i=1:n v = v + (- v + noise(i) + input)*dt/tau; diff --git a/projects/project_noiseficurves/noiseficurves.tex b/projects/project_noiseficurves/noiseficurves.tex index dd07115..4894466 100644 --- a/projects/project_noiseficurves/noiseficurves.tex +++ b/projects/project_noiseficurves/noiseficurves.tex @@ -1,55 +1,17 @@ -\documentclass[addpoints,11pt]{exam} -\usepackage{url} -\usepackage{color} -\usepackage{hyperref} - -\pagestyle{headandfoot} -\runningheadrule -\firstpageheadrule -\firstpageheader{Scientific Computing}{Project Assignment}{11/02/2014 - -- 11/05/2014} -%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} -\firstpagefooter{}{}{{\bf Supervisor:} Jan Benda} -\runningfooter{}{}{} -\pointsinmargin -\bracketedpoints - -%\printanswers -%\shadedsolutions - -%%%%% listings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\usepackage{listings} -\lstset{ - basicstyle=\ttfamily, - numbers=left, - showstringspaces=false, - language=Matlab, - breaklines=true, - breakautoindent=true, - columns=flexible, - frame=single, -% captionpos=t, - xleftmargin=2em, - xrightmargin=1em, -% aboveskip=11pt, - %title=\lstname, -% title={\protect\filename@parse{\lstname}\protect\filename@base.\protect\filename@ext} - } +\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} -%%%%%%%%%%%%%%%%%%%%% Submission instructions %%%%%%%%%%%%%%%%%%%%%%%%% -\sffamily -% \begin{flushright} -% \gradetable[h][questions] -% \end{flushright} -\begin{center} - \input{../disclaimer.tex} -\end{center} +\input{../instructions.tex} -%%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%% 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, diff --git a/projects/project_noiseficurves/solution/lifspikes.m b/projects/project_noiseficurves/solution/lifspikes.m index 5c06505..313397f 100644 --- a/projects/project_noiseficurves/solution/lifspikes.m +++ b/projects/project_noiseficurves/solution/lifspikes.m @@ -18,7 +18,7 @@ function spikes = lifspikes(trials, input, tmax, D) for k=1:trials times = []; j = 1; - v = vreset; + v = vreset + (vthresh-vreset)*rand(); noise = sqrt(2.0*D)*randn(n, 1)/sqrt(dt); for i=1:n v = v + (- v + noise(i) + input)*dt/tau; diff --git a/projects/project_numbers/Makefile b/projects/project_numbers/Makefile index dad25ce..a7b3726 100644 --- a/projects/project_numbers/Makefile +++ b/projects/project_numbers/Makefile @@ -1,10 +1,3 @@ -latex: - pdflatex *.tex > /dev/null - pdflatex *.tex > /dev/null +ZIPFILES= -clean: - rm -rf *.log *.aux *.zip *.out auto - rm -f `basename *.tex .tex`.pdf - -zip: latex - zip `basename *.tex .tex`.zip *.pdf *.dat *.mat +include ../project.mk diff --git a/projects/project_numbers/Neuron22.mat b/projects/project_numbers/data/Neuron22.mat similarity index 100% rename from projects/project_numbers/Neuron22.mat rename to projects/project_numbers/data/Neuron22.mat diff --git a/projects/project_numbers/numbers.tex b/projects/project_numbers/numbers.tex index d2f7d29..47d51b4 100644 --- a/projects/project_numbers/numbers.tex +++ b/projects/project_numbers/numbers.tex @@ -1,32 +1,14 @@ -\documentclass[addpoints,11pt]{exam} -\usepackage{url} -\usepackage{color} -\usepackage{hyperref} - -\pagestyle{headandfoot} -\runningheadrule -\firstpageheadrule -\firstpageheader{Scientific Computing}{Project Assignment}{WS 2016/17} -%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} -\firstpagefooter{}{}{{\bf Supervisor:} Jan Grewe} -\runningfooter{}{}{} -\pointsinmargin -\bracketedpoints - -%\printanswers -%\shadedsolutions +\documentclass[a4paper,12pt,pdftex]{exam} +\newcommand{\ptitle}{Number coding} +\input{../header.tex} +\firstpagefooter{Supervisor: Jan Grewe}{phone: 29 74588}% +{email: jan.grewe@uni-tuebingen.de} \begin{document} -%%%%%%%%%%%%%%%%%%%%% Submission instructions %%%%%%%%%%%%%%%%%%%%%%%%% -\sffamily -% \begin{flushright} -% \gradetable[h][questions] -% \end{flushright} -\begin{center} - \input{../disclaimer.tex} -\end{center} +\input{../instructions.tex} + %%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/projects/project_onset_fi/Makefile b/projects/project_onset_fi/Makefile index 437b664..a7b3726 100644 --- a/projects/project_onset_fi/Makefile +++ b/projects/project_onset_fi/Makefile @@ -1,10 +1,3 @@ -latex: - pdflatex *.tex > /dev/null - pdflatex *.tex > /dev/null +ZIPFILES= -clean: - rm -rf *.log *.aux *.zip *.out auto - rm -f `basename *.tex .tex`.pdf - -zip: latex - zip `basename *.tex .tex`.zip *.pdf *.dat data/*.mat +include ../project.mk diff --git a/projects/project_onset_fi/onset_fi.tex b/projects/project_onset_fi/onset_fi.tex index c3aa982..f8df064 100644 --- a/projects/project_onset_fi/onset_fi.tex +++ b/projects/project_onset_fi/onset_fi.tex @@ -1,32 +1,14 @@ -\documentclass[addpoints,11pt]{exam} -\usepackage{url} -\usepackage{color} -\usepackage{hyperref} - -\pagestyle{headandfoot} -\runningheadrule -\firstpageheadrule -\firstpageheader{Scientific Computing}{Project Assignment}{WS 2016/17} -%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} -\firstpagefooter{}{}{{\bf Supervisor:} Jan Grewe} -\runningfooter{}{}{} -\pointsinmargin -\bracketedpoints - -%\printanswers -%\shadedsolutions +\documentclass[a4paper,12pt,pdftex]{exam} +\newcommand{\ptitle}{Onset f-I curve} +\input{../header.tex} +\firstpagefooter{Supervisor: Jan Grewe}{phone: 29 74588}% +{email: jan.grewe@uni-tuebingen.de} \begin{document} -%%%%%%%%%%%%%%%%%%%%% Submission instructions %%%%%%%%%%%%%%%%%%%%%%%%% -\sffamily -% \begin{flushright} -% \gradetable[h][questions] -% \end{flushright} -\begin{center} - \input{../disclaimer.tex} -\end{center} +\input{../instructions.tex} + %%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%% \section*{Quantifying the responsiveness of a neuron using the F-I curve.} diff --git a/projects/project_pca_natural_images/Makefile b/projects/project_pca_natural_images/Makefile new file mode 100644 index 0000000..a7b3726 --- /dev/null +++ b/projects/project_pca_natural_images/Makefile @@ -0,0 +1,3 @@ +ZIPFILES= + +include ../project.mk diff --git a/projects/project_pca_natural_img/natimg.jpg b/projects/project_pca_natural_images/data/natimg.jpg similarity index 100% rename from projects/project_pca_natural_img/natimg.jpg rename to projects/project_pca_natural_images/data/natimg.jpg diff --git a/projects/project_pca_natural_img/pca_natural_images.tex b/projects/project_pca_natural_images/pca_natural_images.tex old mode 100755 new mode 100644 similarity index 59% rename from projects/project_pca_natural_img/pca_natural_images.tex rename to projects/project_pca_natural_images/pca_natural_images.tex index 85ff72f..0091bd7 --- a/projects/project_pca_natural_img/pca_natural_images.tex +++ b/projects/project_pca_natural_images/pca_natural_images.tex @@ -1,33 +1,14 @@ -\documentclass[addpoints,11pt]{exam} -\usepackage{url} -\usepackage{color} -\usepackage{hyperref} - -\pagestyle{headandfoot} -\runningheadrule -\firstpageheadrule -\firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014 - -- 11/06/2014} -%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} -\firstpagefooter{}{}{{\bf Supervisor:} Fabian Sinz} -\runningfooter{}{}{} -\pointsinmargin -\bracketedpoints - -%\printanswers -%\shadedsolutions +\documentclass[a4paper,12pt,pdftex]{exam} +\newcommand{\ptitle}{Image statistics} +\input{../header.tex} +\firstpagefooter{Supervisor: Jan Benda}{phone: 29 74573}% +{email: jan.benda@uni-tuebingen.de} \begin{document} -%%%%%%%%%%%%%%%%%%%%% Submission instructions %%%%%%%%%%%%%%%%%%%%%%%%% -\sffamily -% \begin{flushright} -% \gradetable[h][questions] -% \end{flushright} - -\begin{center} - \input{../disclaimer.tex} -\end{center} + +\input{../instructions.tex} + %%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/projects/project_pca_natural_img/Makefile b/projects/project_pca_natural_img/Makefile deleted file mode 100644 index 3da8318..0000000 --- a/projects/project_pca_natural_img/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -latex: - pdflatex *.tex > /dev/null - pdflatex *.tex > /dev/null - pdflatex *.tex > /dev/null - -clean: - rm -rf *.log *.aux *.zip *.out auto *.bbl *.blg - rm -f `basename *.tex .tex`.pdf - -zip: latex - zip `basename *.tex .tex`.zip *.pdf *.jpg diff --git a/projects/project_photoreceptor/Makefile b/projects/project_photoreceptor/Makefile index fd67389..a7b3726 100644 --- a/projects/project_photoreceptor/Makefile +++ b/projects/project_photoreceptor/Makefile @@ -1,10 +1,3 @@ -latex: - pdflatex *.tex > /dev/null - pdflatex *.tex > /dev/null +ZIPFILES= -clean: - rm -rf *.log *.aux *.out auto - rm -f `basename *.tex .tex`.pdf - -zip: latex - zip `basename *.tex .tex`.zip *.pdf *.dat data/*.mat +include ../project.mk diff --git a/projects/project_photoreceptor/data/R1_6_step_response_0.mat b/projects/project_photoreceptor/data/R1_6_step_response_0.mat new file mode 100644 index 0000000..4f3eb77 Binary files /dev/null and b/projects/project_photoreceptor/data/R1_6_step_response_0.mat differ diff --git a/projects/project_photoreceptor/data/R1_6_step_response_1.mat b/projects/project_photoreceptor/data/R1_6_step_response_1.mat new file mode 100644 index 0000000..edc3266 Binary files /dev/null and b/projects/project_photoreceptor/data/R1_6_step_response_1.mat differ diff --git a/projects/project_photoreceptor/data/R1_6_step_response_2.mat b/projects/project_photoreceptor/data/R1_6_step_response_2.mat new file mode 100644 index 0000000..70c5aaa Binary files /dev/null and b/projects/project_photoreceptor/data/R1_6_step_response_2.mat differ diff --git a/projects/project_photoreceptor/data/R1_6_step_response_3.mat b/projects/project_photoreceptor/data/R1_6_step_response_3.mat new file mode 100644 index 0000000..e71121b Binary files /dev/null and b/projects/project_photoreceptor/data/R1_6_step_response_3.mat differ diff --git a/projects/project_photoreceptor/data/R1_6_step_response_4.mat b/projects/project_photoreceptor/data/R1_6_step_response_4.mat new file mode 100644 index 0000000..f11451b Binary files /dev/null and b/projects/project_photoreceptor/data/R1_6_step_response_4.mat differ diff --git a/projects/project_photoreceptor/data/R1_6_step_response_5.mat b/projects/project_photoreceptor/data/R1_6_step_response_5.mat new file mode 100644 index 0000000..815031d Binary files /dev/null and b/projects/project_photoreceptor/data/R1_6_step_response_5.mat differ diff --git a/projects/project_photoreceptor/data/R1_6_step_response_6.mat b/projects/project_photoreceptor/data/R1_6_step_response_6.mat new file mode 100644 index 0000000..0635702 Binary files /dev/null and b/projects/project_photoreceptor/data/R1_6_step_response_6.mat differ diff --git a/projects/project_photoreceptor/photoreceptor.tex b/projects/project_photoreceptor/photoreceptor.tex index 9bcf78d..bebfbb7 100644 --- a/projects/project_photoreceptor/photoreceptor.tex +++ b/projects/project_photoreceptor/photoreceptor.tex @@ -1,32 +1,14 @@ -\documentclass[addpoints,11pt]{exam} -\usepackage{url} -\usepackage{color} -\usepackage{hyperref} - -\pagestyle{headandfoot} -\runningheadrule -\firstpageheadrule -\firstpageheader{Scientific Computing}{Project Assignment}{WS 2016/17} -%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} -\firstpagefooter{}{}{{\bf Supervisor:} Jan Grewe} -\runningfooter{}{}{} -\pointsinmargin -\bracketedpoints - -%\printanswers -%\shadedsolutions +\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} -%%%%%%%%%%%%%%%%%%%%% Submission instructions %%%%%%%%%%%%%%%%%%%%%%%%% -\sffamily -% \begin{flushright} -% \gradetable[h][questions] -% \end{flushright} -\begin{center} - \input{../disclaimer.tex} -\end{center} +\input{../instructions.tex} + %%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%% \section*{Analysis of insect photoreceptor data.} diff --git a/projects/project_populationvector/Makefile b/projects/project_populationvector/Makefile index 6422eb4..a7b3726 100644 --- a/projects/project_populationvector/Makefile +++ b/projects/project_populationvector/Makefile @@ -1,10 +1,3 @@ -latex: - pdflatex *.tex > /dev/null - pdflatex *.tex > /dev/null +ZIPFILES= -clean: - rm -rf *.log *.aux *.zip *.out auto - rm -f `basename *.tex .tex`.pdf - -zip: latex - zip `basename *.tex .tex`.zip *.pdf *.dat *.mat *.m +include ../project.mk diff --git a/projects/project_populationvector/population01.mat b/projects/project_populationvector/data/population01.mat similarity index 100% rename from projects/project_populationvector/population01.mat rename to projects/project_populationvector/data/population01.mat diff --git a/projects/project_populationvector/population02.mat b/projects/project_populationvector/data/population02.mat similarity index 100% rename from projects/project_populationvector/population02.mat rename to projects/project_populationvector/data/population02.mat diff --git a/projects/project_populationvector/population03.mat b/projects/project_populationvector/data/population03.mat similarity index 100% rename from projects/project_populationvector/population03.mat rename to projects/project_populationvector/data/population03.mat diff --git a/projects/project_populationvector/population04.mat b/projects/project_populationvector/data/population04.mat similarity index 100% rename from projects/project_populationvector/population04.mat rename to projects/project_populationvector/data/population04.mat diff --git a/projects/project_populationvector/population05.mat b/projects/project_populationvector/data/population05.mat similarity index 100% rename from projects/project_populationvector/population05.mat rename to projects/project_populationvector/data/population05.mat diff --git a/projects/project_populationvector/population06.mat b/projects/project_populationvector/data/population06.mat similarity index 100% rename from projects/project_populationvector/population06.mat rename to projects/project_populationvector/data/population06.mat diff --git a/projects/project_populationvector/population07.mat b/projects/project_populationvector/data/population07.mat similarity index 100% rename from projects/project_populationvector/population07.mat rename to projects/project_populationvector/data/population07.mat diff --git a/projects/project_populationvector/population08.mat b/projects/project_populationvector/data/population08.mat similarity index 100% rename from projects/project_populationvector/population08.mat rename to projects/project_populationvector/data/population08.mat diff --git a/projects/project_populationvector/population09.mat b/projects/project_populationvector/data/population09.mat similarity index 100% rename from projects/project_populationvector/population09.mat rename to projects/project_populationvector/data/population09.mat diff --git a/projects/project_populationvector/population10.mat b/projects/project_populationvector/data/population10.mat similarity index 100% rename from projects/project_populationvector/population10.mat rename to projects/project_populationvector/data/population10.mat diff --git a/projects/project_populationvector/population11.mat b/projects/project_populationvector/data/population11.mat similarity index 100% rename from projects/project_populationvector/population11.mat rename to projects/project_populationvector/data/population11.mat diff --git a/projects/project_populationvector/population12.mat b/projects/project_populationvector/data/population12.mat similarity index 100% rename from projects/project_populationvector/population12.mat rename to projects/project_populationvector/data/population12.mat diff --git a/projects/project_populationvector/population13.mat b/projects/project_populationvector/data/population13.mat similarity index 100% rename from projects/project_populationvector/population13.mat rename to projects/project_populationvector/data/population13.mat diff --git a/projects/project_populationvector/population14.mat b/projects/project_populationvector/data/population14.mat similarity index 100% rename from projects/project_populationvector/population14.mat rename to projects/project_populationvector/data/population14.mat diff --git a/projects/project_populationvector/population15.mat b/projects/project_populationvector/data/population15.mat similarity index 100% rename from projects/project_populationvector/population15.mat rename to projects/project_populationvector/data/population15.mat diff --git a/projects/project_populationvector/population16.mat b/projects/project_populationvector/data/population16.mat similarity index 100% rename from projects/project_populationvector/population16.mat rename to projects/project_populationvector/data/population16.mat diff --git a/projects/project_populationvector/population17.mat b/projects/project_populationvector/data/population17.mat similarity index 100% rename from projects/project_populationvector/population17.mat rename to projects/project_populationvector/data/population17.mat diff --git a/projects/project_populationvector/population18.mat b/projects/project_populationvector/data/population18.mat similarity index 100% rename from projects/project_populationvector/population18.mat rename to projects/project_populationvector/data/population18.mat diff --git a/projects/project_populationvector/population19.mat b/projects/project_populationvector/data/population19.mat similarity index 100% rename from projects/project_populationvector/population19.mat rename to projects/project_populationvector/data/population19.mat diff --git a/projects/project_populationvector/population20.mat b/projects/project_populationvector/data/population20.mat similarity index 100% rename from projects/project_populationvector/population20.mat rename to projects/project_populationvector/data/population20.mat diff --git a/projects/project_populationvector/population21.mat b/projects/project_populationvector/data/population21.mat similarity index 100% rename from projects/project_populationvector/population21.mat rename to projects/project_populationvector/data/population21.mat diff --git a/projects/project_populationvector/population22.mat b/projects/project_populationvector/data/population22.mat similarity index 100% rename from projects/project_populationvector/population22.mat rename to projects/project_populationvector/data/population22.mat diff --git a/projects/project_populationvector/population23.mat b/projects/project_populationvector/data/population23.mat similarity index 100% rename from projects/project_populationvector/population23.mat rename to projects/project_populationvector/data/population23.mat diff --git a/projects/project_populationvector/population24.mat b/projects/project_populationvector/data/population24.mat similarity index 100% rename from projects/project_populationvector/population24.mat rename to projects/project_populationvector/data/population24.mat diff --git a/projects/project_populationvector/population25.mat b/projects/project_populationvector/data/population25.mat similarity index 100% rename from projects/project_populationvector/population25.mat rename to projects/project_populationvector/data/population25.mat diff --git a/projects/project_populationvector/population26.mat b/projects/project_populationvector/data/population26.mat similarity index 100% rename from projects/project_populationvector/population26.mat rename to projects/project_populationvector/data/population26.mat diff --git a/projects/project_populationvector/population27.mat b/projects/project_populationvector/data/population27.mat similarity index 100% rename from projects/project_populationvector/population27.mat rename to projects/project_populationvector/data/population27.mat diff --git a/projects/project_populationvector/population28.mat b/projects/project_populationvector/data/population28.mat similarity index 100% rename from projects/project_populationvector/population28.mat rename to projects/project_populationvector/data/population28.mat diff --git a/projects/project_populationvector/population29.mat b/projects/project_populationvector/data/population29.mat similarity index 100% rename from projects/project_populationvector/population29.mat rename to projects/project_populationvector/data/population29.mat diff --git a/projects/project_populationvector/population30.mat b/projects/project_populationvector/data/population30.mat similarity index 100% rename from projects/project_populationvector/population30.mat rename to projects/project_populationvector/data/population30.mat diff --git a/projects/project_populationvector/population31.mat b/projects/project_populationvector/data/population31.mat similarity index 100% rename from projects/project_populationvector/population31.mat rename to projects/project_populationvector/data/population31.mat diff --git a/projects/project_populationvector/population32.mat b/projects/project_populationvector/data/population32.mat similarity index 100% rename from projects/project_populationvector/population32.mat rename to projects/project_populationvector/data/population32.mat diff --git a/projects/project_populationvector/population33.mat b/projects/project_populationvector/data/population33.mat similarity index 100% rename from projects/project_populationvector/population33.mat rename to projects/project_populationvector/data/population33.mat diff --git a/projects/project_populationvector/population34.mat b/projects/project_populationvector/data/population34.mat similarity index 100% rename from projects/project_populationvector/population34.mat rename to projects/project_populationvector/data/population34.mat diff --git a/projects/project_populationvector/population35.mat b/projects/project_populationvector/data/population35.mat similarity index 100% rename from projects/project_populationvector/population35.mat rename to projects/project_populationvector/data/population35.mat diff --git a/projects/project_populationvector/population36.mat b/projects/project_populationvector/data/population36.mat similarity index 100% rename from projects/project_populationvector/population36.mat rename to projects/project_populationvector/data/population36.mat diff --git a/projects/project_populationvector/population37.mat b/projects/project_populationvector/data/population37.mat similarity index 100% rename from projects/project_populationvector/population37.mat rename to projects/project_populationvector/data/population37.mat diff --git a/projects/project_populationvector/population38.mat b/projects/project_populationvector/data/population38.mat similarity index 100% rename from projects/project_populationvector/population38.mat rename to projects/project_populationvector/data/population38.mat diff --git a/projects/project_populationvector/population39.mat b/projects/project_populationvector/data/population39.mat similarity index 100% rename from projects/project_populationvector/population39.mat rename to projects/project_populationvector/data/population39.mat diff --git a/projects/project_populationvector/population40.mat b/projects/project_populationvector/data/population40.mat similarity index 100% rename from projects/project_populationvector/population40.mat rename to projects/project_populationvector/data/population40.mat diff --git a/projects/project_populationvector/population41.mat b/projects/project_populationvector/data/population41.mat similarity index 100% rename from projects/project_populationvector/population41.mat rename to projects/project_populationvector/data/population41.mat diff --git a/projects/project_populationvector/population42.mat b/projects/project_populationvector/data/population42.mat similarity index 100% rename from projects/project_populationvector/population42.mat rename to projects/project_populationvector/data/population42.mat diff --git a/projects/project_populationvector/population43.mat b/projects/project_populationvector/data/population43.mat similarity index 100% rename from projects/project_populationvector/population43.mat rename to projects/project_populationvector/data/population43.mat diff --git a/projects/project_populationvector/population44.mat b/projects/project_populationvector/data/population44.mat similarity index 100% rename from projects/project_populationvector/population44.mat rename to projects/project_populationvector/data/population44.mat diff --git a/projects/project_populationvector/population45.mat b/projects/project_populationvector/data/population45.mat similarity index 100% rename from projects/project_populationvector/population45.mat rename to projects/project_populationvector/data/population45.mat diff --git a/projects/project_populationvector/population46.mat b/projects/project_populationvector/data/population46.mat similarity index 100% rename from projects/project_populationvector/population46.mat rename to projects/project_populationvector/data/population46.mat diff --git a/projects/project_populationvector/population47.mat b/projects/project_populationvector/data/population47.mat similarity index 100% rename from projects/project_populationvector/population47.mat rename to projects/project_populationvector/data/population47.mat diff --git a/projects/project_populationvector/population48.mat b/projects/project_populationvector/data/population48.mat similarity index 100% rename from projects/project_populationvector/population48.mat rename to projects/project_populationvector/data/population48.mat diff --git a/projects/project_populationvector/population49.mat b/projects/project_populationvector/data/population49.mat similarity index 100% rename from projects/project_populationvector/population49.mat rename to projects/project_populationvector/data/population49.mat diff --git a/projects/project_populationvector/population50.mat b/projects/project_populationvector/data/population50.mat similarity index 100% rename from projects/project_populationvector/population50.mat rename to projects/project_populationvector/data/population50.mat diff --git a/projects/project_populationvector/unit1.mat b/projects/project_populationvector/data/unit1.mat similarity index 100% rename from projects/project_populationvector/unit1.mat rename to projects/project_populationvector/data/unit1.mat diff --git a/projects/project_populationvector/unit2.mat b/projects/project_populationvector/data/unit2.mat similarity index 100% rename from projects/project_populationvector/unit2.mat rename to projects/project_populationvector/data/unit2.mat diff --git a/projects/project_populationvector/unit3.mat b/projects/project_populationvector/data/unit3.mat similarity index 100% rename from projects/project_populationvector/unit3.mat rename to projects/project_populationvector/data/unit3.mat diff --git a/projects/project_populationvector/unit4.mat b/projects/project_populationvector/data/unit4.mat similarity index 100% rename from projects/project_populationvector/unit4.mat rename to projects/project_populationvector/data/unit4.mat diff --git a/projects/project_populationvector/unit5.mat b/projects/project_populationvector/data/unit5.mat similarity index 100% rename from projects/project_populationvector/unit5.mat rename to projects/project_populationvector/data/unit5.mat diff --git a/projects/project_populationvector/unit6.mat b/projects/project_populationvector/data/unit6.mat similarity index 100% rename from projects/project_populationvector/unit6.mat rename to projects/project_populationvector/data/unit6.mat diff --git a/projects/project_populationvector/populationvector.tex b/projects/project_populationvector/populationvector.tex index 44c1b62..9ebcf32 100644 --- a/projects/project_populationvector/populationvector.tex +++ b/projects/project_populationvector/populationvector.tex @@ -1,37 +1,17 @@ -\documentclass[addpoints,11pt]{exam} -\usepackage{url} -\usepackage{color} -\usepackage{hyperref} - -\pagestyle{headandfoot} -\runningheadrule -\firstpageheadrule -\firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014 - -- 11/06/2014} -%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} -\firstpagefooter{}{}{} -\runningfooter{}{}{} -\pointsinmargin -\bracketedpoints - -%\printanswers -%\shadedsolutions +\documentclass[a4paper,12pt,pdftex]{exam} +\newcommand{\ptitle}{Orientation tuning} +\input{../header.tex} +\firstpagefooter{Supervisor: Jan Benda}{phone: 29 74573}% +{email: jan.benda@uni-tuebingen.de} \begin{document} -%%%%%%%%%%%%%%%%%%%%% Submission instructions %%%%%%%%%%%%%%%%%%%%%%%%% -\sffamily -% \begin{flushright} -% \gradetable[h][questions] -% \end{flushright} -\begin{center} - \input{../disclaimer.tex} -\end{center} +\input{../instructions.tex} %%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%% - \begin{questions} + \question In the visual cortex V1 orientation sensitive neurons respond to bars in dependence on their orientation. @@ -55,6 +35,9 @@ \texttt{spikes} variables of the \texttt{population*.mat} files. The \texttt{angle} variable holds the angle of the presented bar. +NOTE: the orientation is angle plu 90 degree!!!!!! + +\continue \begin{parts} \part Illustrate the spiking activity of the V1 cells in response to different orientation angles of the bars by means of spike @@ -97,6 +80,9 @@ \end{parts} \end{questions} +NOTE: change data generation such that the phase variable is indeed +the maximum response and not the minumum! + \end{document} gains and angles of the 6 neurons: diff --git a/projects/project_populationvector/solution/populationvector.m b/projects/project_populationvector/solution/populationvector.m index 829e07d..134b8ed 100644 --- a/projects/project_populationvector/solution/populationvector.m +++ b/projects/project_populationvector/solution/populationvector.m @@ -16,6 +16,7 @@ end close all cosine = @(p,xdata)0.5*p(1).*(1.0-cos(2.0*pi*(xdata/180.0-p(2)))); files = dir('../unit*.mat'); +phases = zeros(length(files), 1); figure() for j = 1:length(files) file = files(j); @@ -31,7 +32,11 @@ for j = 1:length(files) p0 = [mr, angles(maxi)/180.0-0.5]; %p = p0; p = lsqcurvefit(cosine, p0, angles, rates'); - phase = p(2)*180.0 + phase = p(2)*180.0 + 90.0; + if phase > 180.0 + phase = phase - 180.0; + end + phases(j) = phase; subplot(2, 3, j); plot(angles, rates, 'b'); hold on; @@ -41,3 +46,73 @@ for j = 1:length(files) ylim([0.0 50.0]) title(sprintf('unit %d', j)) end + + +%% read out: +a = load('../population04.mat'); +spikes = a.spikes; +angle = a.angle; +unitphases = a.phases*180.0 + 90.0; +unitphases(unitphases>180.0) = unitphases(unitphases>180.0) - 180.0; +figure(); +subplot(1, 3, 1); +angleestimates1 = zeros(size(spikes, 2), 1); +angleestimates2 = zeros(size(spikes, 2), 1); +for j = 1:size(spikes, 2) + rates = zeros(size(spikes, 1), 1); + for k = 1:size(spikes, 1) + r = firingrate(spikes(k, j), 0.0, 0.2); + rates(k) = r; + end + [x, inx] = sort(phases); + plot(phases(inx), rates(inx), '-o'); + hold on; + angleestimates1(j) = popvecangle(phases, rates); + [m, i] = max(rates); + angleestimates2(j) = phases(i); +end +hold off; +subplot(1, 3, 2); +hist(angleestimates1); +subplot(1, 3, 3); +hist(angleestimates2); +angle +mean(angleestimates1) +mean(angleestimates2) + + +%% read out robustness: +files = dir('../population*.mat'); +angles = zeros(length(files), 1); +e1m = zeros(length(files), 1); +e1s = zeros(length(files), 1); +e2m = zeros(length(files), 1); +e2s = zeros(length(files), 1); +for i = 1:length(files) + file = files(i); + a = load(strcat('../', file.name)); + spikes = a.spikes; + angle = a.angle; + angleestimates1 = zeros(size(spikes, 2), 1); + angleestimates2 = zeros(size(spikes, 2), 1); + for j = 1:size(spikes, 2) + rates = zeros(size(spikes, 1), 1); + for k = 1:size(spikes, 1) + r = firingrate(spikes(k, j), 0.0, 0.2); + rates(k) = r; + end + angleestimates1(j) = popvecangle(phases, rates); + [m, inx] = max(rates); + angleestimates2(j) = phases(inx); + end + angles(i) = angle; + e1m(i) = mean(angleestimates1); + e1s(i) = std(angleestimates1); + e2m(i) = mean(angleestimates2); + e2s(i) = std(angleestimates2); +end +figure(); +subplot(1, 2, 1); +scatter(angles, e1m); +subplot(1, 2, 2); +scatter(angles, e2m); diff --git a/projects/project_populationvector/solution/popvecangle.m b/projects/project_populationvector/solution/popvecangle.m new file mode 100644 index 0000000..c06a773 --- /dev/null +++ b/projects/project_populationvector/solution/popvecangle.m @@ -0,0 +1,13 @@ +function angle = popvecangle(phases, rates) +% estimate population vector +vecs = zeros(2, length(phases)); +norm = sum(rates); +vecs(1, :) = rates.*cos(2*pi*phases/180.0)/norm; +vecs(2, :) = rates.*sin(2*pi*phases/180.0)/norm; +mvec = mean(vecs, 2); +angle = atan2(mvec(2), mvec(1)); +angle = angle/2/pi*180.0; +if angle < 0 + angle = angle + 180.0; +end +end diff --git a/projects/project_q-values/Makefile b/projects/project_q-values/Makefile deleted file mode 100644 index dad25ce..0000000 --- a/projects/project_q-values/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -latex: - pdflatex *.tex > /dev/null - pdflatex *.tex > /dev/null - -clean: - rm -rf *.log *.aux *.zip *.out auto - rm -f `basename *.tex .tex`.pdf - -zip: latex - zip `basename *.tex .tex`.zip *.pdf *.dat *.mat diff --git a/projects/project_qvalues/Makefile b/projects/project_qvalues/Makefile new file mode 100644 index 0000000..a7b3726 --- /dev/null +++ b/projects/project_qvalues/Makefile @@ -0,0 +1,3 @@ +ZIPFILES= + +include ../project.mk diff --git a/projects/project_q-values/p_values.dat b/projects/project_qvalues/data/p_values.dat similarity index 100% rename from projects/project_q-values/p_values.dat rename to projects/project_qvalues/data/p_values.dat diff --git a/projects/project_q-values/qvalues.tex b/projects/project_qvalues/qvalues.tex similarity index 74% rename from projects/project_q-values/qvalues.tex rename to projects/project_qvalues/qvalues.tex index 349182e..9127ba2 100644 --- a/projects/project_q-values/qvalues.tex +++ b/projects/project_qvalues/qvalues.tex @@ -1,33 +1,13 @@ -\documentclass[addpoints,11pt]{exam} -\usepackage{url} -\usepackage{color} -\usepackage{hyperref} - -\pagestyle{headandfoot} -\runningheadrule -\firstpageheadrule -\firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014 - -- 11/06/2014} -%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} -\firstpagefooter{}{}{{\bf Supervisor:} Fabian Sinz} -\runningfooter{}{}{} -\pointsinmargin -\bracketedpoints - -%\printanswers -%\shadedsolutions +\documentclass[a4paper,12pt,pdftex]{exam} +\newcommand{\ptitle}{q-values} +\input{../header.tex} +\firstpagefooter{Supervisor: Jan Benda}{phone: 29 74573}% +{email: jan.benda@uni-tuebingen.de} \begin{document} -%%%%%%%%%%%%%%%%%%%%% Submission instructions %%%%%%%%%%%%%%%%%%%%%%%%% -\sffamily -% \begin{flushright} -% \gradetable[h][questions] -% \end{flushright} - -\begin{center} - \input{../disclaimer.tex} -\end{center} + +\input{../instructions.tex} %%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/projects/project_random_walk/Makefile b/projects/project_random_walk/Makefile index 437b664..a7b3726 100644 --- a/projects/project_random_walk/Makefile +++ b/projects/project_random_walk/Makefile @@ -1,10 +1,3 @@ -latex: - pdflatex *.tex > /dev/null - pdflatex *.tex > /dev/null +ZIPFILES= -clean: - rm -rf *.log *.aux *.zip *.out auto - rm -f `basename *.tex .tex`.pdf - -zip: latex - zip `basename *.tex .tex`.zip *.pdf *.dat data/*.mat +include ../project.mk diff --git a/projects/project_random_walk/random_walk.tex b/projects/project_random_walk/random_walk.tex index 797623f..db0fb84 100644 --- a/projects/project_random_walk/random_walk.tex +++ b/projects/project_random_walk/random_walk.tex @@ -1,32 +1,14 @@ -\documentclass[addpoints,11pt]{exam} -\usepackage{url} -\usepackage{color} -\usepackage{hyperref} - -\pagestyle{headandfoot} -\runningheadrule -\firstpageheadrule -\firstpageheader{Scientific Computing}{Project Assignment}{WS 2016/17} -%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} -\firstpagefooter{}{}{{\bf Supervisor:} Jan Grewe} -\runningfooter{}{}{} -\pointsinmargin -\bracketedpoints - -%\printanswers -%\shadedsolutions +\documentclass[a4paper,12pt,pdftex]{exam} +\newcommand{\ptitle}{Random walk} +\input{../header.tex} +\firstpagefooter{Supervisor: Jan Grewe}{phone: 29 74588}% +{email: jan.grewe@uni-tuebingen.de} \begin{document} -%%%%%%%%%%%%%%%%%%%%% Submission instructions %%%%%%%%%%%%%%%%%%%%%%%%% -\sffamily -% \begin{flushright} -% \gradetable[h][questions] -% \end{flushright} -\begin{center} - \input{../disclaimer.tex} -\end{center} +\input{../instructions.tex} + %%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%% \section*{Random walk with memory.} diff --git a/projects/project_serialcorrelation/Makefile b/projects/project_serialcorrelation/Makefile index 6422eb4..a7b3726 100644 --- a/projects/project_serialcorrelation/Makefile +++ b/projects/project_serialcorrelation/Makefile @@ -1,10 +1,3 @@ -latex: - pdflatex *.tex > /dev/null - pdflatex *.tex > /dev/null +ZIPFILES= -clean: - rm -rf *.log *.aux *.zip *.out auto - rm -f `basename *.tex .tex`.pdf - -zip: latex - zip `basename *.tex .tex`.zip *.pdf *.dat *.mat *.m +include ../project.mk diff --git a/projects/project_serialcorrelation/baselinespikes.mat b/projects/project_serialcorrelation/data/baselinespikes.mat similarity index 100% rename from projects/project_serialcorrelation/baselinespikes.mat rename to projects/project_serialcorrelation/data/baselinespikes.mat diff --git a/projects/project_serialcorrelation/serialcorrelation.tex b/projects/project_serialcorrelation/serialcorrelation.tex index 74162df..1e583a3 100644 --- a/projects/project_serialcorrelation/serialcorrelation.tex +++ b/projects/project_serialcorrelation/serialcorrelation.tex @@ -1,33 +1,14 @@ -\documentclass[addpoints,11pt]{exam} -\usepackage{url} -\usepackage{color} -\usepackage{hyperref} - -\pagestyle{headandfoot} -\runningheadrule -\firstpageheadrule -\firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014 - -- 11/06/2014} -%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} -\firstpagefooter{}{}{} -\runningfooter{}{}{} -\pointsinmargin -\bracketedpoints - -%\printanswers -%\shadedsolutions +\documentclass[a4paper,12pt,pdftex]{exam} +\newcommand{\ptitle}{Serial ISI correlations} +\input{../header.tex} +\firstpagefooter{Supervisor: Jan Benda}{phone: 29 74573}% +{email: jan.benda@uni-tuebingen.de} \begin{document} -%%%%%%%%%%%%%%%%%%%%% Submission instructions %%%%%%%%%%%%%%%%%%%%%%%%% -\sffamily -% \begin{flushright} -% \gradetable[h][questions] -% \end{flushright} - -\begin{center} - \input{../disclaimer.tex} -\end{center} + +\input{../instructions.tex} + %%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/projects/project_spectra/Makefile b/projects/project_spectra/Makefile index dad25ce..a7b3726 100644 --- a/projects/project_spectra/Makefile +++ b/projects/project_spectra/Makefile @@ -1,10 +1,3 @@ -latex: - pdflatex *.tex > /dev/null - pdflatex *.tex > /dev/null +ZIPFILES= -clean: - rm -rf *.log *.aux *.zip *.out auto - rm -f `basename *.tex .tex`.pdf - -zip: latex - zip `basename *.tex .tex`.zip *.pdf *.dat *.mat +include ../project.mk diff --git a/projects/project_spectra/2014-06-06-ad_p-unit.mat b/projects/project_spectra/data/2014-06-06-ad_p-unit.mat similarity index 100% rename from projects/project_spectra/2014-06-06-ad_p-unit.mat rename to projects/project_spectra/data/2014-06-06-ad_p-unit.mat diff --git a/projects/project_spectra/spectra.tex b/projects/project_spectra/spectra.tex index 51aa2e4..770f57b 100644 --- a/projects/project_spectra/spectra.tex +++ b/projects/project_spectra/spectra.tex @@ -1,33 +1,14 @@ -\documentclass[addpoints,11pt]{exam} -\usepackage{url} -\usepackage{color} -\usepackage{hyperref} - -\pagestyle{headandfoot} -\runningheadrule -\firstpageheadrule -\firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014 - -- 11/06/2014} -%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} -\firstpagefooter{}{}{{\bf Supervisor:} Fabian Sinz} -\runningfooter{}{}{} -\pointsinmargin -\bracketedpoints - -%\printanswers -%\shadedsolutions +\documentclass[a4paper,12pt,pdftex]{exam} +\newcommand{\ptitle}{Spectra} +\input{../header.tex} +\firstpagefooter{Supervisor: Jan Grewe}{phone: 29 74588}% +{email: jan.grewe@uni-tuebingen.de} \begin{document} -%%%%%%%%%%%%%%%%%%%%% Submission instructions %%%%%%%%%%%%%%%%%%%%%%%%% -\sffamily -% \begin{flushright} -% \gradetable[h][questions] -% \end{flushright} - -\begin{center} - \input{../disclaimer.tex} -\end{center} + +\input{../instructions.tex} + %%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/projects/project_steady_fi/Makefile b/projects/project_steady_fi/Makefile deleted file mode 100644 index dad25ce..0000000 --- a/projects/project_steady_fi/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -latex: - pdflatex *.tex > /dev/null - pdflatex *.tex > /dev/null - -clean: - rm -rf *.log *.aux *.zip *.out auto - rm -f `basename *.tex .tex`.pdf - -zip: latex - zip `basename *.tex .tex`.zip *.pdf *.dat *.mat diff --git a/projects/project_steady_state_fi/Makefile b/projects/project_steady_state_fi/Makefile new file mode 100644 index 0000000..a7b3726 --- /dev/null +++ b/projects/project_steady_state_fi/Makefile @@ -0,0 +1,3 @@ +ZIPFILES= + +include ../project.mk diff --git a/projects/project_steady_fi/p_unit_2012-03-30-aa_fi_curve_-14.mat b/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_-14.mat similarity index 100% rename from projects/project_steady_fi/p_unit_2012-03-30-aa_fi_curve_-14.mat rename to projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_-14.mat diff --git a/projects/project_steady_fi/p_unit_2012-03-30-aa_fi_curve_-18.mat b/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_-18.mat similarity index 100% rename from projects/project_steady_fi/p_unit_2012-03-30-aa_fi_curve_-18.mat rename to projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_-18.mat diff --git a/projects/project_steady_fi/p_unit_2012-03-30-aa_fi_curve_-2.mat b/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_-2.mat similarity index 100% rename from projects/project_steady_fi/p_unit_2012-03-30-aa_fi_curve_-2.mat rename to projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_-2.mat diff --git a/projects/project_steady_fi/p_unit_2012-03-30-aa_fi_curve_-6.mat b/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_-6.mat similarity index 100% rename from projects/project_steady_fi/p_unit_2012-03-30-aa_fi_curve_-6.mat rename to projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_-6.mat diff --git a/projects/project_steady_fi/p_unit_2012-03-30-aa_fi_curve_-9.mat b/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_-9.mat similarity index 100% rename from projects/project_steady_fi/p_unit_2012-03-30-aa_fi_curve_-9.mat rename to projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_-9.mat diff --git a/projects/project_steady_fi/p_unit_2012-03-30-aa_fi_curve_12.mat b/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_12.mat similarity index 100% rename from projects/project_steady_fi/p_unit_2012-03-30-aa_fi_curve_12.mat rename to projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_12.mat diff --git a/projects/project_steady_fi/p_unit_2012-03-30-aa_fi_curve_15.mat b/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_15.mat similarity index 100% rename from projects/project_steady_fi/p_unit_2012-03-30-aa_fi_curve_15.mat rename to projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_15.mat diff --git a/projects/project_steady_fi/p_unit_2012-03-30-aa_fi_curve_2.mat b/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_2.mat similarity index 100% rename from projects/project_steady_fi/p_unit_2012-03-30-aa_fi_curve_2.mat rename to projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_2.mat diff --git a/projects/project_steady_fi/p_unit_2012-03-30-aa_fi_curve_5.mat b/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_5.mat similarity index 100% rename from projects/project_steady_fi/p_unit_2012-03-30-aa_fi_curve_5.mat rename to projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_5.mat diff --git a/projects/project_steady_fi/p_unit_2012-03-30-aa_fi_curve_9.mat b/projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_9.mat similarity index 100% rename from projects/project_steady_fi/p_unit_2012-03-30-aa_fi_curve_9.mat rename to projects/project_steady_state_fi/data/p_unit_2012-03-30-aa_fi_curve_9.mat diff --git a/projects/project_steady_fi/steady_state_fi.tex b/projects/project_steady_state_fi/steady_state_fi.tex similarity index 70% rename from projects/project_steady_fi/steady_state_fi.tex rename to projects/project_steady_state_fi/steady_state_fi.tex index 5f6d8c6..abba436 100644 --- a/projects/project_steady_fi/steady_state_fi.tex +++ b/projects/project_steady_state_fi/steady_state_fi.tex @@ -1,33 +1,14 @@ -\documentclass[addpoints,11pt]{exam} -\usepackage{url} -\usepackage{color} -\usepackage{hyperref} - -\pagestyle{headandfoot} -\runningheadrule -\firstpageheadrule -\firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014 - -- 11/06/2014} -%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} -\firstpagefooter{}{}{{\bf Supervisor:} Jan Grewe} -\runningfooter{}{}{} -\pointsinmargin -\bracketedpoints - -%\printanswers -%\shadedsolutions +\documentclass[a4paper,12pt,pdftex]{exam} +\newcommand{\ptitle}{Steady-state f-I curve} +\input{../header.tex} +\firstpagefooter{Supervisor: Jan Grewe}{phone: 29 74588}% +{email: jan.grewe@uni-tuebingen.de} \begin{document} -%%%%%%%%%%%%%%%%%%%%% Submission instructions %%%%%%%%%%%%%%%%%%%%%%%%% -\sffamily -% \begin{flushright} -% \gradetable[h][questions] -% \end{flushright} -\begin{center} - \input{../disclaimer.tex} -\end{center} +\input{../instructions.tex} + %%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%% \section*{Quantifying the responsiveness of a neuron using the F-I curve.} diff --git a/projects/project_stimulus_reconstruction/Makefile b/projects/project_stimulus_reconstruction/Makefile index 2574730..a7b3726 100644 --- a/projects/project_stimulus_reconstruction/Makefile +++ b/projects/project_stimulus_reconstruction/Makefile @@ -1,10 +1,3 @@ -latex: - pdflatex *.tex > /dev/null - pdflatex *.tex > /dev/null +ZIPFILES= -clean: - rm -rf *.log *.aux *.zip *.out auto - rm -f `basename *.tex .tex`.pdf - -zip: latex - zip `basename *.tex .tex`.zip *.pdf data/*.mat +include ../project.mk diff --git a/projects/project_stimulus_reconstruction/stimulus_reconstruction.tex b/projects/project_stimulus_reconstruction/stimulus_reconstruction.tex index 222292d..0730ab0 100644 --- a/projects/project_stimulus_reconstruction/stimulus_reconstruction.tex +++ b/projects/project_stimulus_reconstruction/stimulus_reconstruction.tex @@ -1,32 +1,13 @@ -\documentclass[addpoints,11pt]{exam} -\usepackage{url} -\usepackage{color} -\usepackage{hyperref} - -\pagestyle{headandfoot} -\runningheadrule -\firstpageheadrule -\firstpageheader{Scientific Computing}{Project Assignment}{WS 2016/17} -%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} -\firstpagefooter{}{}{{\bf Supervisor:} Jan Grewe} -\runningfooter{}{}{} -\pointsinmargin -\bracketedpoints - -%\printanswers -%\shadedsolutions +\documentclass[a4paper,12pt,pdftex]{exam} +\newcommand{\ptitle}{Reverse reconstruction} +\input{../header.tex} +\firstpagefooter{Supervisor: Jan Grewe}{phone: 29 74588}% +{email: jan.grewe@uni-tuebingen.de} \begin{document} -%%%%%%%%%%%%%%%%%%%%% Submission instructions %%%%%%%%%%%%%%%%%%%%%%%%% -\sffamily -% \begin{flushright} -% \gradetable[h][questions] -% \end{flushright} -\begin{center} - \input{../disclaimer.tex} -\end{center} +\input{../instructions.tex} %%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%% \section*{Reverse reconstruction of the stimulus evoking neuronal responses.} diff --git a/projects/project_template/Makefile b/projects/project_template/Makefile index 6422eb4..a7b3726 100644 --- a/projects/project_template/Makefile +++ b/projects/project_template/Makefile @@ -1,10 +1,3 @@ -latex: - pdflatex *.tex > /dev/null - pdflatex *.tex > /dev/null +ZIPFILES= -clean: - rm -rf *.log *.aux *.zip *.out auto - rm -f `basename *.tex .tex`.pdf - -zip: latex - zip `basename *.tex .tex`.zip *.pdf *.dat *.mat *.m +include ../project.mk diff --git a/projects/project_template/template.tex b/projects/project_template/template.tex index 8290b77..e8afc87 100644 --- a/projects/project_template/template.tex +++ b/projects/project_template/template.tex @@ -1,33 +1,16 @@ -\documentclass[addpoints,11pt]{exam} -\usepackage{url} -\usepackage{color} -\usepackage{hyperref} - -\pagestyle{headandfoot} -\runningheadrule -\firstpageheadrule -\firstpageheader{Scientific Computing}{Project Assignment}{11/05/2014 - -- 11/06/2014} -%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} -\firstpagefooter{}{}{} -\runningfooter{}{}{} -\pointsinmargin -\bracketedpoints - -%\printanswers -%\shadedsolutions +\documentclass[a4paper,12pt,pdftex]{exam} +\newcommand{\ptitle}{Project title} +\input{../header.tex} +\firstpagefooter{Supervisor: Jan Benda}{phone: 29 74573}% +{email: jan.benda@uni-tuebingen.de} +%\firstpagefooter{Supervisor: Jan Grewe}{phone: 29 74588}% +%{email: jan.grewe@uni-tuebingen.de} \begin{document} -%%%%%%%%%%%%%%%%%%%%% Submission instructions %%%%%%%%%%%%%%%%%%%%%%%%% -\sffamily -% \begin{flushright} -% \gradetable[h][questions] -% \end{flushright} -\begin{center} - \input{../disclaimer.tex} -\end{center} +\input{../instructions.tex} + %%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%% @@ -35,8 +18,4 @@ \question What was the questions for 42? \end{questions} - - - - \end{document} diff --git a/projects/project_vector_strength/Makefile b/projects/project_vector_strength/Makefile index 064bfc3..a7b3726 100644 --- a/projects/project_vector_strength/Makefile +++ b/projects/project_vector_strength/Makefile @@ -1,10 +1,3 @@ -latex: - pdflatex *.tex > /dev/null - pdflatex *.tex > /dev/null +ZIPFILES= -clean: - rm -rf *.log *.aux *.zip *.out auto - rm -f `basename *.tex .tex`.pdf - -zip: latex - zip `basename *.tex .tex`.zip *.pdf data/*.mat +include ../project.mk diff --git a/projects/project_vector_strength/export_data.py b/projects/project_vector_strength/code/export_data.py similarity index 100% rename from projects/project_vector_strength/export_data.py rename to projects/project_vector_strength/code/export_data.py diff --git a/projects/project_vector_strength/data/2012-03-23-aa_baseline.mat b/projects/project_vector_strength/data/2012-03-23-aa_baseline.mat new file mode 100644 index 0000000..16e619b Binary files /dev/null and b/projects/project_vector_strength/data/2012-03-23-aa_baseline.mat differ diff --git a/projects/project_vector_strength/data/2012-04-20-ac_baseline.mat b/projects/project_vector_strength/data/2012-04-20-ac_baseline.mat new file mode 100644 index 0000000..86d7e4b Binary files /dev/null and b/projects/project_vector_strength/data/2012-04-20-ac_baseline.mat differ diff --git a/projects/project_vector_strength/data/2012-04-20-ad_baseline.mat b/projects/project_vector_strength/data/2012-04-20-ad_baseline.mat new file mode 100644 index 0000000..74af274 Binary files /dev/null and b/projects/project_vector_strength/data/2012-04-20-ad_baseline.mat differ diff --git a/projects/project_vector_strength/data/2012-04-20-ah_baseline.mat b/projects/project_vector_strength/data/2012-04-20-ah_baseline.mat new file mode 100644 index 0000000..58d063a Binary files /dev/null and b/projects/project_vector_strength/data/2012-04-20-ah_baseline.mat differ diff --git a/projects/project_vector_strength/data/2012-04-26-aa_baseline.mat b/projects/project_vector_strength/data/2012-04-26-aa_baseline.mat new file mode 100644 index 0000000..d9d9616 Binary files /dev/null and b/projects/project_vector_strength/data/2012-04-26-aa_baseline.mat differ diff --git a/projects/project_vector_strength/data/2012-05-07-ae_baseline.mat b/projects/project_vector_strength/data/2012-05-07-ae_baseline.mat new file mode 100644 index 0000000..ab93ce2 Binary files /dev/null and b/projects/project_vector_strength/data/2012-05-07-ae_baseline.mat differ diff --git a/projects/project_vector_strength/data/2012-05-10-ab_baseline.mat b/projects/project_vector_strength/data/2012-05-10-ab_baseline.mat new file mode 100644 index 0000000..95a06a0 Binary files /dev/null and b/projects/project_vector_strength/data/2012-05-10-ab_baseline.mat differ diff --git a/projects/project_vector_strength/data/2012-06-08-ag_baseline.mat b/projects/project_vector_strength/data/2012-06-08-ag_baseline.mat new file mode 100644 index 0000000..a6401aa Binary files /dev/null and b/projects/project_vector_strength/data/2012-06-08-ag_baseline.mat differ diff --git a/projects/project_vector_strength/data/2012-06-08-ai_baseline.mat b/projects/project_vector_strength/data/2012-06-08-ai_baseline.mat new file mode 100644 index 0000000..90e229c Binary files /dev/null and b/projects/project_vector_strength/data/2012-06-08-ai_baseline.mat differ diff --git a/projects/project_vector_strength/data/2012-06-25-ad_baseline.mat b/projects/project_vector_strength/data/2012-06-25-ad_baseline.mat new file mode 100644 index 0000000..86ce1c8 Binary files /dev/null and b/projects/project_vector_strength/data/2012-06-25-ad_baseline.mat differ diff --git a/projects/project_vector_strength/data/2012-06-27-ah_baseline.mat b/projects/project_vector_strength/data/2012-06-27-ah_baseline.mat new file mode 100644 index 0000000..428b52d Binary files /dev/null and b/projects/project_vector_strength/data/2012-06-27-ah_baseline.mat differ diff --git a/projects/project_vector_strength/data/2012-06-27-ak_baseline.mat b/projects/project_vector_strength/data/2012-06-27-ak_baseline.mat new file mode 100644 index 0000000..d36717a Binary files /dev/null and b/projects/project_vector_strength/data/2012-06-27-ak_baseline.mat differ diff --git a/projects/project_vector_strength/data/2012-07-11-aa_baseline.mat b/projects/project_vector_strength/data/2012-07-11-aa_baseline.mat new file mode 100644 index 0000000..49196b9 Binary files /dev/null and b/projects/project_vector_strength/data/2012-07-11-aa_baseline.mat differ diff --git a/projects/project_vector_strength/data/2012-07-11-an_baseline.mat b/projects/project_vector_strength/data/2012-07-11-an_baseline.mat new file mode 100644 index 0000000..99423da Binary files /dev/null and b/projects/project_vector_strength/data/2012-07-11-an_baseline.mat differ diff --git a/projects/project_vector_strength/data/2012-07-12-ap_baseline.mat b/projects/project_vector_strength/data/2012-07-12-ap_baseline.mat new file mode 100644 index 0000000..0592212 Binary files /dev/null and b/projects/project_vector_strength/data/2012-07-12-ap_baseline.mat differ diff --git a/projects/project_vector_strength/data/2012-10-31-af_baseline.mat b/projects/project_vector_strength/data/2012-10-31-af_baseline.mat new file mode 100644 index 0000000..07de5bb Binary files /dev/null and b/projects/project_vector_strength/data/2012-10-31-af_baseline.mat differ diff --git a/projects/project_vector_strength/data/2012-10-31-ai_baseline.mat b/projects/project_vector_strength/data/2012-10-31-ai_baseline.mat new file mode 100644 index 0000000..2602532 Binary files /dev/null and b/projects/project_vector_strength/data/2012-10-31-ai_baseline.mat differ diff --git a/projects/project_vector_strength/data/2012-12-13-ad_baseline.mat b/projects/project_vector_strength/data/2012-12-13-ad_baseline.mat new file mode 100644 index 0000000..f9e8234 Binary files /dev/null and b/projects/project_vector_strength/data/2012-12-13-ad_baseline.mat differ diff --git a/projects/project_vector_strength/data/2012-12-13-ak_baseline.mat b/projects/project_vector_strength/data/2012-12-13-ak_baseline.mat new file mode 100644 index 0000000..5c80603 Binary files /dev/null and b/projects/project_vector_strength/data/2012-12-13-ak_baseline.mat differ diff --git a/projects/project_vector_strength/data/2012-12-13-ao_baseline.mat b/projects/project_vector_strength/data/2012-12-13-ao_baseline.mat new file mode 100644 index 0000000..045951a Binary files /dev/null and b/projects/project_vector_strength/data/2012-12-13-ao_baseline.mat differ diff --git a/projects/project_vector_strength/data/2012-12-13-ap_baseline.mat b/projects/project_vector_strength/data/2012-12-13-ap_baseline.mat new file mode 100644 index 0000000..712676b Binary files /dev/null and b/projects/project_vector_strength/data/2012-12-13-ap_baseline.mat differ diff --git a/projects/project_vector_strength/data/2012-12-20-ad_baseline.mat b/projects/project_vector_strength/data/2012-12-20-ad_baseline.mat new file mode 100644 index 0000000..adfe630 Binary files /dev/null and b/projects/project_vector_strength/data/2012-12-20-ad_baseline.mat differ diff --git a/projects/project_vector_strength/data/2012-12-21-ai_baseline.mat b/projects/project_vector_strength/data/2012-12-21-ai_baseline.mat new file mode 100644 index 0000000..a96ce47 Binary files /dev/null and b/projects/project_vector_strength/data/2012-12-21-ai_baseline.mat differ diff --git a/projects/project_vector_strength/data/2012-12-21-am_baseline.mat b/projects/project_vector_strength/data/2012-12-21-am_baseline.mat new file mode 100644 index 0000000..8dcec7d Binary files /dev/null and b/projects/project_vector_strength/data/2012-12-21-am_baseline.mat differ diff --git a/projects/project_vector_strength/data/2012-12-21-an_baseline.mat b/projects/project_vector_strength/data/2012-12-21-an_baseline.mat new file mode 100644 index 0000000..4848725 Binary files /dev/null and b/projects/project_vector_strength/data/2012-12-21-an_baseline.mat differ diff --git a/projects/project_vector_strength/data/project_vector_strength.zip b/projects/project_vector_strength/data/project_vector_strength.zip deleted file mode 100644 index 59bd783..0000000 Binary files a/projects/project_vector_strength/data/project_vector_strength.zip and /dev/null differ diff --git a/projects/project_vector_strength/solution/main.m b/projects/project_vector_strength/solution/main.m index 379e349..dd9a3ab 100644 --- a/projects/project_vector_strength/solution/main.m +++ b/projects/project_vector_strength/solution/main.m @@ -6,7 +6,7 @@ vs = zeros(length(files), 1); for i = 1:length(files) load(strcat('../data/', files(i).name)) eod_time = (1:length(eod)) .* dt; - zero_crossings = zeroCrossings(eod, eod_time); + zero_crossings = zeroCrossings(eod, eod_time, 0); while spike_times(1) <= zero_crossings(1) spike_times(1) = []; end diff --git a/projects/project_vector_strength/vector_strength.tex b/projects/project_vector_strength/vector_strength.tex old mode 100755 new mode 100644 index edbfbed..56e8c78 --- a/projects/project_vector_strength/vector_strength.tex +++ b/projects/project_vector_strength/vector_strength.tex @@ -1,32 +1,13 @@ -\documentclass[addpoints,11pt]{exam} -\usepackage{url} -\usepackage{color} -\usepackage{hyperref} - -\pagestyle{headandfoot} -\runningheadrule -\firstpageheadrule -\firstpageheader{Scientific Computing}{Project Assignment}{WS 2016/17} -%\runningheader{Homework 01}{Page \thepage\ of \numpages}{23. October 2014} -\firstpagefooter{}{}{{\bf Supervisor:} Jan Grewe} -\runningfooter{}{}{} -\pointsinmargin -\bracketedpoints - -%\printanswers -%\shadedsolutions +\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} -%%%%%%%%%%%%%%%%%%%%% Submission instructions %%%%%%%%%%%%%%%%%%%%%%%%% -\sffamily -% \begin{flushright} -% \gradetable[h][questions] -% \end{flushright} -\begin{center} - \input{../disclaimer.tex} -\end{center} +\input{../instructions.tex} %%%%%%%%%%%%%% Questions %%%%%%%%%%%%%%%%%%%%%%%%% \section*{Quantifying the coupling of action potentials to the EOD.}