changed to class #5

Closed
awendt wants to merge 4 commits from dataclass into master
8 changed files with 643 additions and 57 deletions

View File

@ -3,14 +3,16 @@ import os
import numpy as np
from IPython import embed
import matplotlib.pyplot as plt
from scipy.stats import iqr
from scipy.signal import find_peaks
from scipy.ndimage import gaussian_filter1d
from thunderfish.dataloader import DataLoader
from thunderfish.powerspectrum import spectrogram, decibel
from modules.filters import bandpass_filter, envelope, highpass_filter
from modules.filehandling import ConfLoader
from modules.filehandling import ConfLoader, LoadData
from modules.plotstyle import PlotStyle
ps = PlotStyle()
def instantaneos_frequency(
@ -136,22 +138,24 @@ def main(datapath: str) -> None:
# load raw file
file = os.path.join(datapath, "traces-grid1.raw")
data = DataLoader(file, 60.0, 0, channel=-1)
# data = DataLoader(file, 60.0, 0, channel=-1)
data = LoadData(datapath)
# load wavetracker files
time = np.load(datapath + "times.npy", allow_pickle=True)
freq = np.load(datapath + "fund_v.npy", allow_pickle=True)
powers = np.load(datapath + "sign_v.npy", allow_pickle=True)
idx = np.load(datapath + "idx_v.npy", allow_pickle=True)
ident = np.load(datapath + "ident_v.npy", allow_pickle=True)
# time = np.load(datapath + "times.npy", allow_pickle=True)
# freq = np.load(datapath + "fund_v.npy", allow_pickle=True)
# powers = np.load(datapath + "sign_v.npy", allow_pickle=True)
# idx = np.load(datapath + "idx_v.npy", allow_pickle=True)
# ident = np.load(datapath + "ident_v.npy", allow_pickle=True)
# load config file
config = ConfLoader("chirpdetector_conf.yml")
# set time window # <------------------------ Iterate through windows here
window_duration = config.window * data.samplerate
window_overlap = config.overlap * data.samplerate
window_edge = config.edge * data.samplerate
window_duration = config.window * data.raw_rate
window_overlap = config.overlap * data.raw_rate
window_edge = config.edge * data.raw_rate
# check if window duration is even
if window_duration % 2 == 0:
@ -165,11 +169,11 @@ def main(datapath: str) -> None:
else:
raise ValueError("Window overlap must be even.")
raw_time = np.arange(data.shape[0]) / data.samplerate
raw_time = np.arange(data.raw.shape[0]) / data.raw_rate
# good chirp times for data: 2022-06-02-10_00
t0 = (3 * 60 * 60 + 6 * 60 + 43.5) * data.samplerate
dt = 60 * data.samplerate
t0 = (3 * 60 * 60 + 6 * 60 + 43.5) * data.raw_rate
dt = 60 * data.raw_rate
window_starts = np.arange(
t0,
@ -181,31 +185,31 @@ def main(datapath: str) -> None:
for start_index in window_starts:
# make t0 and dt
t0 = start_index / data.samplerate
dt = window_duration / data.samplerate
t0 = start_index / data.raw_rate
dt = window_duration / data.raw_rate
# set index window
stop_index = start_index + window_duration
# t0 = 3 * 60 * 60 + 6 * 60 + 43.5
# dt = 60
# start_index = t0 * data.samplerate
# stop_index = (t0 + dt) * data.samplerate
# start_index = t0 * data.raw_rate
# stop_index = (t0 + dt) * data.raw_rate
# iterate through all fish
for i, track_id in enumerate(np.unique(ident[~np.isnan(ident)])[:2]):
for i, track_id in enumerate(np.unique(data.ident[~np.isnan(data.ident)])[:2]):
# get indices for time array in time window
window_index = np.arange(len(idx))[
(ident == track_id) & (time[idx] >= t0) & (
time[idx] <= (t0 + dt))
window_index = np.arange(len(data.idx))[
(data.ident == track_id) & (data.time[data.idx] >= t0) & (
data.time[data.idx] <= (t0 + dt))
]
# get tracked frequencies and their times
freq_temp = freq[window_index]
powers_temp = powers[window_index, :]
freq_temp = data.freq[window_index]
powers_temp = data.powers[window_index, :]
# time_temp = time[idx[window_index]]
track_samplerate = np.mean(1 / np.diff(time))
track_samplerate = np.mean(1 / np.diff(data.time))
expected_duration = ((t0 + dt) - t0) * track_samplerate
# check if tracked data available in this window
@ -228,7 +232,7 @@ def main(datapath: str) -> None:
for i, electrode in enumerate(best_electrodes):
# load region of interest of raw data file
data_oi = data[start_index:stop_index, :]
data_oi = data.raw[start_index:stop_index, :]
time_oi = raw_time[start_index:stop_index]
# plot wavetracker tracks to spectrogram
@ -255,56 +259,56 @@ def main(datapath: str) -> None:
# filter baseline and above
baseline, search = double_bandpass(
data_oi[:, electrode], data.samplerate, freq_temp, search_freq
data_oi[:, electrode], data.raw_rate, freq_temp, search_freq
)
# compute instantaneous frequency on broad signal
broad_baseline = bandpass_filter(
data_oi[:, electrode],
data.samplerate,
data.raw_rate,
lowf=np.mean(freq_temp)-5,
highf=np.mean(freq_temp)+100
)
# compute instantaneous frequency on narrow signal
baseline_freq_time, baseline_freq = instantaneos_frequency(
baseline, data.samplerate
baseline, data.raw_rate
)
# compute envelopes
baseline_envelope = envelope(
baseline, data.samplerate, config.envelope_cutoff)
baseline_envelope_unfiltered = envelope(
baseline, data.raw_rate, config.envelope_cutoff)
search_envelope = envelope(
search, data.samplerate, config.envelope_cutoff)
search, data.raw_rate, config.envelope_cutoff)
# highpass filter envelopes
baseline_envelope = highpass_filter(
baseline_envelope,
data.samplerate,
baseline_envelope_unfiltered,
data.raw_rate,
config.envelope_highpass_cutoff
)
baseline_envelope = np.abs(baseline_envelope)
# baseline_envelope = np.abs(baseline_envelope)
# search_envelope = highpass_filter(
# search_envelope,
# data.samplerate,
# data.raw_rate,
# config.envelope_highpass_cutoff
# )
# envelopes of filtered envelope of filtered baseline
baseline_envelope = envelope(
np.abs(baseline_envelope),
data.samplerate,
data.raw_rate,
config.envelope_envelope_cutoff
)
# search_envelope = bandpass_filter(
# search_envelope, data.samplerate, lowf=lowf, highf=highf)
# search_envelope, data.raw_rate, lowf=lowf, highf=highf)
# bandpass filter the instantaneous
inst_freq_filtered = bandpass_filter(
baseline_freq,
data.samplerate,
data.raw_rate,
lowf=config.instantaneous_lowf,
highf=config.instantaneous_highf
)
@ -320,13 +324,14 @@ def main(datapath: str) -> None:
int(window_edge), len(baseline_envelope) -
int(window_edge)
)
baseline_envelope_unfiltered = baseline_envelope_unfiltered[valid]
baseline_envelope = baseline_envelope[valid]
search_envelope = search_envelope[valid]
# get inst freq valid snippet
valid_t0 = int(window_edge) / data.samplerate
valid_t0 = int(window_edge) / data.raw_rate
valid_t1 = baseline_freq_time[-1] - \
(int(window_edge) / data.samplerate)
(int(window_edge) / data.raw_rate)
inst_freq_filtered = inst_freq_filtered[(baseline_freq_time >= valid_t0) & (
baseline_freq_time <= valid_t1)]
@ -367,27 +372,26 @@ def main(datapath: str) -> None:
# plot spectrogram
plot_spectrogram(
axs[0, i], data_oi[:, electrode], data.samplerate, t0)
axs[0, i], data_oi[:, electrode], data.raw_rate, t0)
# plot baseline instantaneos frequency
axs[1, i].plot(baseline_freq_time, baseline_freq -
np.median(baseline_freq), marker=".")
np.median(baseline_freq))
# plot waveform of filtered signal
axs[2, i].plot(time_oi, baseline, c="k")
axs[2, i].plot(time_oi, baseline, c=ps.green)
# plot narrow filtered baseline
# plot broad filtered baseline
axs[2, i].plot(
time_oi,
baseline_envelope,
c="orange",
broad_baseline,
)
# plot broad filtered baseline
# plot narrow filtered baseline envelope
axs[2, i].plot(
time_oi,
broad_baseline,
c="green",
baseline_envelope_unfiltered,
c=ps.red
)
# plot waveform of filtered search signal
@ -397,7 +401,7 @@ def main(datapath: str) -> None:
axs[3, i].plot(
time_oi,
search_envelope,
c="orange",
c=ps.red
)
# plot filtered and rectified envelope
@ -405,7 +409,7 @@ def main(datapath: str) -> None:
axs[4, i].scatter(
(time_oi)[baseline_peaks],
baseline_envelope[baseline_peaks],
c="red",
c=ps.red,
)
# plot envelope of search signal
@ -413,7 +417,7 @@ def main(datapath: str) -> None:
axs[5, i].scatter(
(time_oi)[search_peaks],
search_envelope[search_peaks],
c="red",
c=ps.red,
)
# plot filtered instantaneous frequency
@ -421,7 +425,7 @@ def main(datapath: str) -> None:
axs[6, i].scatter(
baseline_freq_time[inst_freq_peaks],
np.abs(inst_freq_filtered)[inst_freq_peaks],
c="red",
c=ps.red,
)
axs[6, i].set_xlabel("Time [s]")

View File

@ -13,7 +13,7 @@ search_boundary: 100
envelope_cutoff: 25
# Cutoff frequency for envelope highpass filter
envelope_highpass_cutoff: 5
envelope_highpass_cutoff: 3
# Cutoff frequency for envelope of envelope
envelope_envelope_cutoff: 5

View File

@ -37,12 +37,13 @@ class LoadData:
# load raw data
self.file = os.path.join(datapath, "traces-grid1.raw")
self.data = DataLoader(self.file, 60.0, 0, channel=-1)
self.samplerate = self.data.samplerate
self.raw = DataLoader(self.file, 60.0, 0, channel=-1)
self.raw_rate = self.raw.samplerate
# load wavetracker files
self.time = np.load(datapath + "times.npy", allow_pickle=True)
self.freq = np.load(datapath + "fund_v.npy", allow_pickle=True)
self.powers = np.load(datapath + "sign_v.npy", allow_pickle=True)
self.idx = np.load(datapath + "idx_v.npy", allow_pickle=True)
self.ident = np.load(datapath + "ident_v.npy", allow_pickle=True)
self.ids = np.unique(self.ident[~np.isnan(self.ident)])

368
code/modules/plotstyle.py Normal file
View File

@ -0,0 +1,368 @@
import cmocean as cmo
Review

add this to the requirements list!

add this to the requirements list!
import matplotlib.pyplot as plt
import numpy as np
from cycler import cycler
from matplotlib.colors import ListedColormap
def PlotStyle() -> None:
class style:
# lightcmap = cmocean.tools.lighten(cmocean.cm.haline, 0.8)
# units
cm = 1 / 2.54
mm = 1 / 25.4
# colors
black = "#111116"
white = "#e0e4f7"
gray = "#6c6e7d"
blue = "#89b4fa"
sapphire = "#74c7ec"
sky = "#89dceb"
teal = "#94e2d5"
green = "#a6e3a1"
yellow = "#f9e2af"
orange = "#fab387"
maroon = "#eba0ac"
red = "#f38ba8"
purple = "#cba6f7"
pink = "#f5c2e7"
lavender = "#b4befe"
@classmethod
def lims(cls, track1, track2):
"""Helper function to get frequency y axis limits from two fundamental frequency tracks.
Args:
track1 (array): First track
track2 (array): Second track
start (int): Index for first value to be plotted
stop (int): Index for second value to be plotted
padding (int): Padding for the upper and lower limit
Returns:
lower (float): lower limit
upper (float): upper limit
"""
allfunds_tmp = (
np.concatenate(
[
track1,
track2,
]
)
.ravel()
.tolist()
)
lower = np.min(allfunds_tmp)
upper = np.max(allfunds_tmp)
return lower, upper
@classmethod
def circled_annotation(cls, text, axis, xpos, ypos, padding=0.25):
axis.text(
xpos,
ypos,
text,
ha="center",
va="center",
zorder=1000,
bbox=dict(
boxstyle=f"circle, pad={padding}", fc="white", ec="black", lw=1
),
)
@classmethod
def fade_cmap(cls, cmap):
my_cmap = cmap(np.arange(cmap.N))
my_cmap[:, -1] = np.linspace(0, 1, cmap.N)
my_cmap = ListedColormap(my_cmap)
return my_cmap
@classmethod
def hide_ax(cls, ax):
ax.xaxis.set_visible(False)
plt.setp(ax.spines.values(), visible=False)
ax.tick_params(left=False, labelleft=False)
ax.patch.set_visible(False)
@classmethod
def set_boxplot_color(cls, bp, color):
plt.setp(bp["boxes"], color=color)
plt.setp(bp["whiskers"], color=color)
plt.setp(bp["caps"], color=color)
plt.setp(bp["medians"], color=color)
@classmethod
def label_subplots(cls, labels, axes, fig):
for axis, label in zip(axes, labels):
X = axis.get_position().x0
Y = axis.get_position().y1
fig.text(X, Y, label, weight="bold")
@classmethod
def letter_subplots(
cls, axes=None, letters=None, xoffset=-0.1, yoffset=1.0, **kwargs
):
"""Add letters to the corners of subplots (panels). By default each axis is
given an uppercase bold letter label placed in the upper-left corner.
Args
axes : list of pyplot ax objects. default plt.gcf().axes.
letters : list of strings to use as labels, default ["A", "B", "C", ...]
xoffset, yoffset : positions of each label relative to plot frame
(default -0.1,1.0 = upper left margin). Can also be a list of
offsets, in which case it should be the same length as the number of
axes.
Other keyword arguments will be passed to annotate() when panel letters
are added.
Returns:
list of strings for each label added to the axes
Examples:
Defaults:
>>> fig, axes = plt.subplots(1,3)
>>> letter_subplots() # boldfaced A, B, C
Common labeling schemes inferred from the first letter:
>>> fig, axes = plt.subplots(1,4)
# panels labeled (a), (b), (c), (d)
>>> letter_subplots(letters='(a)')
Fully custom lettering:
>>> fig, axes = plt.subplots(2,1)
>>> letter_subplots(axes, letters=['(a.1)', '(b.2)'], fontweight='normal')
Per-axis offsets:
>>> fig, axes = plt.subplots(1,2)
>>> letter_subplots(axes, xoffset=[-0.1, -0.15])
Matrix of axes:
>>> fig, axes = plt.subplots(2,2, sharex=True, sharey=True)
# fig.axes is a list when axes is a 2x2 matrix
>>> letter_subplots(fig.axes)
"""
# get axes:
if axes is None:
axes = plt.gcf().axes
# handle single axes:
try:
iter(axes)
except TypeError:
axes = [axes]
# set up letter defaults (and corresponding fontweight):
fontweight = "bold"
ulets = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ"[: len(axes)])
llets = list("abcdefghijklmnopqrstuvwxyz"[: len(axes)])
if letters is None or letters == "A":
letters = ulets
elif letters == "(a)":
letters = ["({})".format(lett) for lett in llets]
fontweight = "normal"
elif letters == "(A)":
letters = ["({})".format(lett) for lett in ulets]
fontweight = "normal"
elif letters in ("lower", "lowercase", "a"):
letters = llets
# make sure there are x and y offsets for each ax in axes:
if isinstance(xoffset, (int, float)):
xoffset = [xoffset] * len(axes)
else:
assert len(xoffset) == len(axes)
if isinstance(yoffset, (int, float)):
yoffset = [yoffset] * len(axes)
else:
assert len(yoffset) == len(axes)
# defaults for annotate (kwargs is second so it can overwrite these defaults):
my_defaults = dict(
fontweight=fontweight,
fontsize="large",
ha="center",
va="center",
xycoords="axes fraction",
annotation_clip=False,
)
kwargs = dict(list(my_defaults.items()) + list(kwargs.items()))
list_txts = []
for ax, lbl, xoff, yoff in zip(axes, letters, xoffset, yoffset):
t = ax.annotate(lbl, xy=(xoff, yoff), **kwargs)
list_txts.append(t)
return list_txts
pass
# rcparams text setup
SMALL_SIZE = 12
MEDIUM_SIZE = 14
BIGGER_SIZE = 16
black = "#111116"
white = "#e0e4f7"
gray = "#6c6e7d"
dark_gray = "#2a2a32"
# rcparams
plt.rc("font", size=MEDIUM_SIZE) # controls default text sizes
plt.rc("axes", titlesize=MEDIUM_SIZE) # fontsize of the axes title
plt.rc("axes", labelsize=MEDIUM_SIZE) # fontsize of the x and y labels
plt.rc("xtick", labelsize=SMALL_SIZE) # fontsize of the tick labels
plt.rc("ytick", labelsize=SMALL_SIZE) # fontsize of the tick labels
plt.rc("legend", fontsize=SMALL_SIZE) # legend fontsize
plt.rc("figure", titlesize=BIGGER_SIZE) # fontsize of the figure title
plt.rcParams["image.cmap"] = 'cmo.haline'
# plt.rcParams["axes.xmargin"] = 0.1
# plt.rcParams["axes.ymargin"] = 0.15
plt.rcParams["axes.titlelocation"] = "left"
plt.rcParams["axes.titlesize"] = BIGGER_SIZE
# plt.rcParams["axes.titlepad"] = -10
plt.rcParams["legend.frameon"] = False
plt.rcParams["legend.loc"] = "best"
plt.rcParams["legend.borderpad"] = 0.4
plt.rcParams["legend.facecolor"] = black
plt.rcParams["legend.edgecolor"] = black
plt.rcParams["legend.framealpha"] = 0.7
plt.rcParams["legend.borderaxespad"] = 0.5
plt.rcParams["legend.fancybox"] = False
# specify the custom font to use
plt.rcParams["font.family"] = "sans-serif"
plt.rcParams["font.sans-serif"] = "Helvetica Now Text"
# dark mode modifications
plt.rcParams["boxplot.flierprops.color"] = white
plt.rcParams["boxplot.flierprops.markeredgecolor"] = gray
plt.rcParams["boxplot.boxprops.color"] = gray
plt.rcParams["boxplot.whiskerprops.color"] = gray
plt.rcParams["boxplot.capprops.color"] = gray
plt.rcParams["boxplot.medianprops.color"] = gray
plt.rcParams["text.color"] = white
plt.rcParams["axes.facecolor"] = black # axes background color
plt.rcParams["axes.edgecolor"] = gray # axes edge color
# plt.rcParams["axes.grid"] = True # display grid or not
# plt.rcParams["axes.grid.axis"] = "y" # which axis the grid is applied to
plt.rcParams["axes.labelcolor"] = white
plt.rcParams["axes.axisbelow"] = True # draw axis gridlines and ticks:
plt.rcParams["axes.spines.left"] = True # display axis spines
plt.rcParams["axes.spines.bottom"] = True
plt.rcParams["axes.spines.top"] = False
plt.rcParams["axes.spines.right"] = False
plt.rcParams["axes.prop_cycle"] = cycler(
'color', [
'#b4befe',
'#89b4fa',
'#74c7ec',
'#89dceb',
'#94e2d5',
'#a6e3a1',
'#f9e2af',
'#fab387',
'#eba0ac',
'#f38ba8',
'#cba6f7',
'#f5c2e7',
])
plt.rcParams["xtick.color"] = gray # color of the ticks
plt.rcParams["ytick.color"] = gray # color of the ticks
plt.rcParams["grid.color"] = dark_gray # grid color
plt.rcParams["figure.facecolor"] = black # figure face color
plt.rcParams["figure.edgecolor"] = "#555169" # figure edge color
plt.rcParams["savefig.facecolor"] = black # figure face color when saving
return style
if __name__ == "__main__":
s = PlotStyle()
import matplotlib.pyplot as plt
import matplotlib.cm as cm
import matplotlib.pyplot as plt
import matplotlib.cbook as cbook
from matplotlib.path import Path
from matplotlib.patches import PathPatch
# Fixing random state for reproducibility
np.random.seed(19680801)
delta = 0.025
x = y = np.arange(-3.0, 3.0, delta)
X, Y = np.meshgrid(x, y)
Z1 = np.exp(-X**2 - Y**2)
Z2 = np.exp(-(X - 1)**2 - (Y - 1)**2)
Z = (Z1 - Z2) * 2
fig1, ax = plt.subplots()
im = ax.imshow(Z, interpolation='bilinear', cmap=cm.RdYlGn,
origin='lower', extent=[-3, 3, -3, 3],
vmax=abs(Z).max(), vmin=-abs(Z).max())
plt.show()
fig, axs = plt.subplots(nrows=1, ncols=2, figsize=(9, 4))
# Fixing random state for reproducibility
np.random.seed(19680801)
# generate some random test data
all_data = [np.random.normal(0, std, 100) for std in range(6, 10)]
# plot violin plot
axs[0].violinplot(all_data,
showmeans=False,
showmedians=True)
axs[0].set_title('Violin plot')
# plot box plot
axs[1].boxplot(all_data)
axs[1].set_title('Box plot')
# adding horizontal grid lines
for ax in axs:
ax.yaxis.grid(True)
ax.set_xticks([y + 1 for y in range(len(all_data))],
labels=['x1', 'x2', 'x3', 'x4'])
ax.set_xlabel('Four separate samples')
ax.set_ylabel('Observed values')
plt.show()
# Fixing random state for reproducibility
np.random.seed(19680801)
# Compute pie slices
N = 20
theta = np.linspace(0.0, 2 * np.pi, N, endpoint=False)
radii = 10 * np.random.rand(N)
width = np.pi / 4 * np.random.rand(N)
colors = cmo.cm.haline(radii / 10.)
ax = plt.subplot(projection='polar')
ax.bar(theta, radii, width=width, bottom=0.0, color=colors, alpha=0.5)
plt.show()
methods = [None, 'none', 'nearest', 'bilinear', 'bicubic', 'spline16',
'spline36', 'hanning', 'hamming', 'hermite', 'kaiser', 'quadric',
'catrom', 'gaussian', 'bessel', 'mitchell', 'sinc', 'lanczos']
# Fixing random state for reproducibility
np.random.seed(19680801)
grid = np.random.rand(4, 4)
fig, axs = plt.subplots(nrows=3, ncols=6, figsize=(9, 6),
subplot_kw={'xticks': [], 'yticks': []})
for ax, interp_method in zip(axs.flat, methods):
ax.imshow(grid, interpolation=interp_method)
ax.set_title(str(interp_method))
plt.tight_layout()
plt.show()

BIN
poster/main.pdf Normal file

Binary file not shown.

83
poster/main.tex Normal file
View File

@ -0,0 +1,83 @@
\documentclass[25pt, a0paper, landscape, margin=0mm, innermargin=20mm,
blockverticalspace=2mm, colspace=20mm, subcolspace=0mm]{tikzposter} %Default values for poster format options.
\input{packages}
\input{style}
\begin{document}
\renewcommand{\baselinestretch}{1}
\title{\parbox{1900pt}{A dark template to make colorful figures pop}}
\author{Sina Prause, Alexander Wendt, Patrick Weygoldt}
\institute{Supervised by Till Raab \& Jan Benda}
\usetitlestyle[]{sampletitle}
\maketitle
\renewcommand{\baselinestretch}{1.4}
\begin{columns}
\column{0.3}
\myblock[TranspBlock]{Introduction}{
\lipsum[1][1-5]
\begin{tikzfigure}[]
\label{griddrawing}
\includegraphics[width=\linewidth]{example-image-a}
\end{tikzfigure}
}
\myblock[TranspBlock]{Methods}{
\begin{tikzfigure}[]
\label{detector}
\includegraphics[width=\linewidth]{example-image-b}
\end{tikzfigure}
}
\column{0.4}
\myblock[TranspBlock]{Results}{
\lipsum[3][1-5]
\begin{tikzfigure}[]
\label{modulations}
\includegraphics[width=\linewidth]{example-image-c}
\end{tikzfigure}
}
\myblock[TranspBlock]{More Stuff}{
\lipsum[3][1-9]
}
\column{0.3}
\myblock[TranspBlock]{More Results}{
\begin{tikzfigure}[]
\label{results}
\includegraphics[width=\linewidth]{example-image-a}
\end{tikzfigure}
\begin{multicols}{2}
\lipsum[5][1-8]
\end{multicols}
\vspace{-1cm}
}
\myblock[TranspBlock]{Conclusion}{
\begin{itemize}
\setlength\itemsep{0.5em}
\item \lipsum[1][1]
\item \lipsum[1][1]
\item \lipsum[1][1]
\end{itemize}
\vspace{0.2cm}
}
\end{columns}
\node[
above right,
text=white,
outer sep=45pt,
minimum width=\paperwidth,
align=center,
draw,
fill=boxes,
color=boxes,
] at (-0.51\paperwidth,-43.5) {
\textcolor{text}{\normalsize Contact: name.surname@student.uni-tuebingen.de}};
\end{document}

11
poster/packages.tex Normal file
View File

@ -0,0 +1,11 @@
\usepackage[utf8]{inputenc}
\usepackage[scaled]{helvet}
\renewcommand\familydefault{\sfdefault}
\usepackage[T1]{fontenc}
\usepackage{wrapfig}
\usepackage{setspace}
\usepackage{multicol}
\setlength{\columnsep}{1.5cm}
\usepackage{xspace}
\usepackage{tikz}
\usepackage{lipsum}

119
poster/style.tex Normal file
View File

@ -0,0 +1,119 @@
\tikzposterlatexaffectionproofoff
\usetheme{Default}
\definecolor{text}{HTML}{e0e4f7}
\definecolor{background}{HTML}{111116}
\definecolor{boxes}{HTML}{2a2a32}
\definecolor{unired}{HTML}{a51e37}
\colorlet{blocktitlefgcolor}{text}
\colorlet{backgroundcolor}{background}
\colorlet{blocktitlebgcolor}{background}
\colorlet{blockbodyfgcolor}{text}
\colorlet{innerblocktitlebgcolor}{background}
\colorlet{innerblocktitlefgcolor}{text}
\colorlet{notefrcolor}{text}
\colorlet{notefgcolor}{background}
\colorlet{notebgcolor}{background}
% Title setup
\settitle{
% Rearrange the order of the minipages to e.g. center the title between the logos
\begin{minipage}[c]{0.6\paperwidth}
% \centering
\vspace{2.5cm}\hspace{1.5cm}
\color{text}{\Huge{\textbf{\@title}} \par}
\vspace*{2em}\hspace{1.5cm}
\color{text}{\LARGE \@author \par}
\vspace*{2em}\hspace{1.5cm}
\color{text}{\Large \@institute}
\vspace{2.5cm}
\end{minipage}
\begin{minipage}[c]{0.2\paperwidth}
% \centering
\vspace{1cm}\hspace{1cm}
\includegraphics[scale=1]{example-image-a}
\end{minipage}
\begin{minipage}[c]{0.2\paperwidth}
% \vspace{1cm}\hspace{1cm}
\centering
\includegraphics[scale=1]{example-image-a}
\end{minipage}}
% definie title style with background box
\definetitlestyle{sampletitle}{
width=1189mm,
roundedcorners=0,
linewidth=0pt,
innersep=15pt,
titletotopverticalspace=0mm,
titletoblockverticalspace=5pt
}{
\begin{scope}[line width=\titlelinewidth, rounded corners=\titleroundedcorners]
\draw[fill=text, color=boxes]
(\titleposleft,\titleposbottom)
rectangle
(\titleposright,\titlepostop);
\end{scope}
}
% define coustom block style for visible blocks
\defineblockstyle{GrayBlock}{
titlewidthscale=1,
bodywidthscale=1,
% titlecenter,
titleleft,
titleoffsetx=0pt,
titleoffsety=-30pt,
bodyoffsetx=0pt,
bodyoffsety=-40pt,
bodyverticalshift=0mm,
roundedcorners=25,
linewidth=1pt,
titleinnersep=20pt,
bodyinnersep=38pt
}{
\draw[rounded corners=\blockroundedcorners, inner sep=\blockbodyinnersep,
line width=\blocklinewidth, color=background,
top color=boxes, bottom color=boxes,
]
(blockbody.south west) rectangle (blockbody.north east); %
\ifBlockHasTitle%
\draw[rounded corners=\blockroundedcorners, inner sep=\blocktitleinnersep,
top color=background, bottom color=background,
line width=2, color=background, %fill=blocktitlebgcolor
]
(blocktitle.south west) rectangle (blocktitle.north east); %
\fi%
}
\newcommand\myblock[3][GrayBlock]{\useblockstyle{#1}\block{#2}{#3}\useblockstyle{Default}}
% Define blockstyle for tranparent block
\defineblockstyle{TranspBlock}{
titlewidthscale=0.99,
bodywidthscale=0.99,
titleleft,
titleoffsetx=15pt,
titleoffsety=-40pt,
bodyoffsetx=0pt,
bodyoffsety=-40pt,
bodyverticalshift=0mm,
roundedcorners=25,
linewidth=1pt,
titleinnersep=20pt,
bodyinnersep=38pt
}{
\draw[rounded corners=\blockroundedcorners, inner sep=\blockbodyinnersep,
line width=\blocklinewidth, color=background,
top color=background, bottom color=background,
]
(blockbody.south west) rectangle (blockbody.north east); %
\ifBlockHasTitle%
\draw[rounded corners=\blockroundedcorners, inner sep=\blocktitleinnersep,
top color=background, bottom color=background,
line width=2, color=background, %fill=blocktitlebgcolor
]
(blocktitle.south west) rectangle (blocktitle.north east); %
\fi%
}
\renewcommand\myblock[3][TranspBlock]{\useblockstyle{#1}\block{#2}{#3}\useblockstyle{Default}}