Merge branch 'master' of whale.am28.uni-tuebingen.de:scientificComputing
This commit is contained in:
commit
294b730647
54
plotting/code/movie_example.m
Normal file
54
plotting/code/movie_example.m
Normal file
@ -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')
|
BIN
plotting/lecture/images/lissajous.png
Normal file
BIN
plotting/lecture/images/lissajous.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.8 KiB |
@ -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}
|
||||
|
26
projects/gradetable.py
Normal file
26
projects/gradetable.py
Normal file
@ -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()
|
@ -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
|
||||
|
Reference in New Issue
Block a user