diff --git a/plotting/code/movie_example.m b/plotting/code/movie_example.m new file mode 100644 index 0000000..835bb32 --- /dev/null +++ b/plotting/code/movie_example.m @@ -0,0 +1,54 @@ +clear all +close all +max_frames = 500; + +f_x = 1; +f_y = 1.5; +dt = 2*pi/500; + +f = figure(); +set(f, 'visible', 'off'); +set(f, 'PaperUnits', 'centimeter', 'PaperSize', [2.5, 2.5], ... + 'PaperPosition', [0, 0, 2.5, 2.5], 'Color', 'white') + +writer = VideoWriter('../lecture/images/lissajous.mp4', 'MPEG-4'); +writer.FrameRate = 25; +writer.Quality = 50; + +open(writer); +for i = 1:max_frames + x = sin(f_x * 2 * pi * dt * i); + y = sin(f_y * 2 * pi * dt * i); + scatter(x, y, 30, 'r', 'filled'); + xlim([-1.05, 1.05]) + xticks([-1., 0., 1.]) + ylim([-1.05, 1.05]) + yticks([-1., 0., 1.]) + xlabel('x') + ylabel('y') + drawnow; + frame = getframe(f); + writeVideo(writer, frame); +end +close(writer) + +x_positions = zeros(max_frames, 1); +y_positions = zeros(max_frames, 1); +for i = 1:max_frames + x_positions(i) = sin(f_x * 2 * pi * dt * i); + y_positions(i) = sin(f_y * 2 * pi * dt * i); +end + +f = figure(); +set(f, 'PaperUnits', 'centimeter', 'PaperSize', [5, 5], ... + 'PaperPosition', [0, 0, 5, 5], 'Color', 'white') + +scatter(x_positions, y_positions, 10, 'r', 'filled'); +xlim([-1.05, 1.05]) +xticks([-1., 0., 1.]) +ylim([-1.05, 1.05]) +yticks([-1., 0., 1.]) +xlabel('x') +ylabel('y') + +saveas(f, '../lecture/images/lissajous.png') \ No newline at end of file diff --git a/plotting/lecture/images/lissajous.png b/plotting/lecture/images/lissajous.png new file mode 100644 index 0000000..ee30fed Binary files /dev/null and b/plotting/lecture/images/lissajous.png differ diff --git a/projects/evaluation.tex b/projects/evaluation.tex index 30ae766..51a3071 100644 --- a/projects/evaluation.tex +++ b/projects/evaluation.tex @@ -1,14 +1,16 @@ -\documentclass[12pt,a4paper]{article} +\documentclass[12pt,a4paper,landscape]{article} -\usepackage[ngerman]{babel} \usepackage{pslatex} +\usepackage{graphics} %%%%% page style %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage[left=10mm,right=10mm,top=10mm,bottom=10mm,headsep=0ex,headheight=0ex,footskip=0ex]{geometry} \pagestyle{empty} +\newcommand{\rot}[1]{\rotatebox{90}{#1}\,\,} + \newcounter{studentnum} -\newcommand{\num}{\rule{0pt}{5.8ex}{\stepcounter{studentnum}\small \arabic{studentnum}}} +\newcommand{\num}{\rule{0pt}{7.0ex}{\stepcounter{studentnum}\small \arabic{studentnum}}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -17,28 +19,37 @@ \sffamily \section*{Scientific computing WS17/18} -\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}|} +\noindent +\begin{tabular}{|p{0.16\textwidth}|p{0.1\textwidth}|p{0.024\textwidth}|p{0.024\textwidth}|p{0.024\textwidth}|p{0.024\textwidth}|p{0.024\textwidth}|p{0.024\textwidth}|p{0.024\textwidth}|p{0.024\textwidth}|p{0.024\textwidth}|p{0.024\textwidth}|p{0.024\textwidth}|p{0.024\textwidth}|p{0.024\textwidth}|p{0.024\textwidth}|p{0.024\textwidth}|p{0.024\textwidth}|l|l|} +\hline +Name & Project & \multicolumn{5}{l|}{Project} & \multicolumn{3}{l|}{Figures} & \multicolumn{8}{l|}{Code} & Sum & Grade \rule{0.pt}{3ex} \\ + & & \rot{Understanding} & \rot{Presentation}\rot{Structure, didactics} & \rot{Completed} & \rot{Bonus:}\rot{Context} & \rot{Bonus:}\rot{Own ideas} & \rot{Readability}\rot{font size, etc.} & \rot{Labels}\rot{and units} & \rot{Design} & \rot{Runs} & \rot{Names of}\rot{vars and funcs} & \rot{Style: white space}\rot{Spaghetti, structure} & \rot{Functions: used,}\rot{purpose, standalone} & \rot{Docu script} & \rot{Docu functions} & \rot{Figures saved} & \rot{Bonus:}\rot{Interesting code} & & \\ + & & 0--3 & 0--2 & 0--2 & 0, 1 & 0--2 & 0--2 & 0--2 & 0--2 & 0--2 & 0--2 & 0--2 & 0--3 & 0--2 & 0--2 & 0, 2 & 0--2 & 28 & \\ \hline + \num & & & & & & & & & & & & & & & & & & & \\ \hline + \num & & & & & & & & & & & & & & & & & & & \\ \hline + \num & & & & & & & & & & & & & & & & & & & \\ \hline + \num & & & & & & & & & & & & & & & & & & & \\ \hline + \num & & & & & & & & & & & & & & & & & & & \\ \hline + \num & & & & & & & & & & & & & & & & & & & \\ \hline + \num & & & & & & & & & & & & & & & & & & & \\ \hline + \num & & & & & & & & & & & & & & & & & & & \\ \hline +\end{tabular} + +\noindent +\begin{tabular}{|p{0.16\textwidth}|p{0.1\textwidth}|p{0.023\textwidth}|p{0.023\textwidth}|p{0.023\textwidth}|p{0.023\textwidth}|p{0.023\textwidth}|p{0.023\textwidth}|p{0.023\textwidth}|p{0.023\textwidth}|p{0.023\textwidth}|p{0.023\textwidth}|p{0.023\textwidth}|p{0.023\textwidth}|p{0.023\textwidth}|p{0.023\textwidth}|p{0.023\textwidth}|p{0.023\textwidth}|l|l|} \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 +Name & Project & \multicolumn{5}{l|}{Project} & \multicolumn{3}{l|}{Figures} & \multicolumn{8}{l|}{Code} & Sum & Grade \rule{0.pt}{3ex} \\ + & & \rot{Understanding} & \rot{Presentation}\rot{Structure, didactics} & \rot{Completed} & \rot{Bonus:}\rot{Context} & \rot{Bonus:}\rot{Own ideas} & \rot{Readability}\rot{font size, etc.} & \rot{Labels}\rot{and units} & \rot{Design} & \rot{Runs} & \rot{Names of}\rot{vars and funcs} & \rot{Style: white space}\rot{Spaghetti, structure} & \rot{Functions: used,}\rot{purpose, standalone} & \rot{Docu script} & \rot{Docu functions} & \rot{Figures saved} & \rot{Bonus:}\rot{Interesting code} & & \\ + & & 0--3 & 0--2 & 0--2 & 0, 1 & 0--2 & 0--2 & 0--2 & 0--2 & 0--2 & 0--2 & 0--2 & 0--3 & 0--2 & 0--2 & 0, 2 & 0--2 & 28 & \\ \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/gradetable.py b/projects/gradetable.py new file mode 100644 index 0000000..b8cf843 --- /dev/null +++ b/projects/gradetable.py @@ -0,0 +1,26 @@ +import os +import numpy as np +import matplotlib.pylab as plt + +lecture = 'Models of Neural Systems, WS 16/17' +exam = 1 +pmax = 33 # maximum available points +p100 = 28 # points for 100% + +# grades: +gradestable = [ [ 0.9, 1.0 ], [ 0.84, 1.3 ], [ 0.80, 1.7 ], [ 0.76, 2.0 ], [ 0.72, 2.3 ], + [ 0.68, 2.7 ], [ 0.64, 3.0 ], [ 0.60, 3.3 ], [ 0.56, 3.7 ], [ 0.50, 4.0 ] ] + +df = open('notentabelle.dat', 'w') +df.write('# Notentabelle\n') +print '# Notentabelle' +df.write('\n') +df.write('#Key\n') +s = '# Note\tProzent\tPunkte' +df.write(s+'\n') +print s +for f,g in gradestable : + s = ' \t%3.1f\t%5.0f\t%5.1f' % (g, 100.0*f, p100*f) + df.write(s+'\n') + print s +df.close() diff --git a/projects/project_vector_strength/vector_strength.tex b/projects/project_vector_strength/vector_strength.tex index 56e8c78..9952c5a 100644 --- a/projects/project_vector_strength/vector_strength.tex +++ b/projects/project_vector_strength/vector_strength.tex @@ -32,8 +32,7 @@ locking, respectively. i.e. the fish's field The data is sampled with 20\,kHz and the spike times are given in seconds. \begin{parts} - \part Plot an average of the single EOD cylces of each fish - together with an respective PSTH. + \part Plot the average EOD waveform of each fish together with an respective PSTH. \part Implement a function that estimates the vector strength between the \textit{eod} and the spikes. \part Create a polar plot that shows the timing of the spikes