write mat&met, improve images

This commit is contained in:
a.ott 2020-08-28 17:40:47 +02:00
parent 659c71673a
commit 0bc3324fb4
25 changed files with 649 additions and 301 deletions

View File

@ -89,6 +89,17 @@ class DatParser(AbstractParser):
return species
def get_gender(self):
gender = "not found"
for metadata in Dl.load(self.info_file):
if "Species" in metadata.keys():
gender = metadata["Gender"]
elif "Subject" in metadata.keys():
if isinstance(metadata["Subject"], dict) and "Gender" in metadata["Subject"].keys():
gender = metadata["Subject"]["Gender"]
return gender
def get_quality(self):
quality = ""
for metadata in Dl.load(self.info_file):

View File

@ -26,6 +26,7 @@ model_cell_3 = {'v_base': 0, 'noise_strength': 0.05081267319483283, 'threshold':
FIG_SIZE_SMALL = (4, 4)
FIG_SIZE_MEDIUM = (6, 6)
FIG_SIZE_LARGE = (8, 8)
FIG_SIZE_SMALL_WIDE = (6, 4)
COLOR_MODEL = "orange"
COLOR_DATA = "blue"

View File

@ -1,15 +1,16 @@
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
import numpy as np
import os
import functions as fu
import helperFunctions as hF
from CellData import CellData
from Baseline import BaselineCellData
from FiCurve import FICurveCellData
import Figure_constants as consts
MODEL_COLOR = "orange"
DATA_COLOR = "blue"
@ -18,25 +19,198 @@ DATA_SAVE_PATH = "data/figure_data/"
def main():
# data_isi_histogram()
data_mean_freq_step_stimulus_examples()
# data_mean_freq_step_stimulus_examples()
# data_mean_freq_step_stimulus_with_detections()
# data_fi_curve()
p_unit_example()
fi_point_detection()
pass
def p_unit_example():
# cell = "data/final/2013-04-17-ac-invivo-1"
cell = "data/final/2012-04-20-af-invivo-1"
cell_data = CellData(cell)
base = BaselineCellData(cell_data)
base.load_values(cell_data.get_data_path())
print("burstiness of example cell:", base.get_burstiness())
fi = FICurveCellData(cell_data, cell_data.get_fi_contrasts(), save_dir=cell_data.get_data_path())
step = cell_data.get_sampling_interval()
# Overview figure for p-unit behaviour
fig = plt.figure(tight_layout=True, figsize=consts.FIG_SIZE_MEDIUM)
gs = gridspec.GridSpec(3, 2)
# a bit of trace with detected spikes
ax = fig.add_subplot(gs[0, :])
v1 = cell_data.get_base_traces(cell_data.V1)[0]
time = cell_data.get_base_traces(cell_data.TIME)[0]
spiketimes = cell_data.get_base_spikes()[0]
start = 0
duration = 0.10
ax.plot(np.array(time[:int(duration/step)]) - start, v1[:int(duration/step)])
ax.eventplot([s for s in spiketimes if start < s < start + duration], lineoffsets=max(v1[:int(duration/step)])+0.75, color="black")
ax.set_ylabel('Voltage in mV')
ax.set_xlabel('Time in s')
ax.set_title("Baseline Firing")
ax.set_xlim((0, duration))
# ISI-hist
ax = fig.add_subplot(gs[1, 0])
eod_period = 1.0 / cell_data.get_eod_frequency()
isi = np.array(base.get_interspike_intervals()) / eod_period # ISI in ms
maximum = max(isi)
bins = np.arange(0, maximum * 1.01, 0.1)
ax.hist(isi, bins=bins)
ax.set_ylabel("Count")
ax.set_xlabel("ISI in EOD periods")
ax.set_title("ISI-histogram")
# Serial correlation
ax = fig.add_subplot(gs[2, 0])
sc = base.get_serial_correlation(10)
ax.plot(range(11), [0 for _ in range(11)], color="darkgrey", alpha=0.8)
ax.plot(range(11), [1] + list(sc))
ax.set_xlabel("Lag")
ax.set_ylabel("SC")
ax.set_title("Serial Correlation")
ax.set_ylim((-1, 1))
ax.set_xlim((0, 10))
ax.set_xticks([0, 2, 4, 6, 8, 10])
# ax.set_xticklabels([0, 2, 4, 6, 8, 10])
# FI-Curve trace
ax = fig.add_subplot(gs[1, 1])
f_trace_times, f_traces = fi.get_mean_time_and_freq_traces()
part = 1 + 0.2 + 0.2 # stim duration + delay up front and a part of the "delay" at the back
idx = int(part/step)
ax.plot(f_trace_times[-1][:idx], f_traces[-1][:idx])
strength = 200
smoothed = np.convolve(f_traces[-1][:idx], np.ones(strength)/strength)
ax.plot(f_trace_times[-1][:idx], smoothed[int(strength/2):idx + int(strength/2)])
ax.set_xlim((-0.2, part-0.2))
ylim = ax.get_ylim()
ax.set_ylim((0, ylim[1]))
ax.set_xlabel("Time in s")
ax.set_ylabel("Frequency in Hz")
ax.set_title("Step Response")
# FI-Curve
ax = fig.add_subplot(gs[2, 1])
contrasts = fi.stimulus_values
f_zeros = fi.get_f_zero_frequencies()
f_infties = fi.get_f_inf_frequencies()
ax.plot(contrasts, f_zeros, 'x')
ax.plot(contrasts, f_infties, 'o')
x_values = np.arange(min(contrasts), max(contrasts) + 0.0001, (max(contrasts)-min(contrasts)) / 1000)
f_zero_fit = [fu.full_boltzmann(x, fi.f_zero_fit[0], fi.f_zero_fit[1], fi.f_zero_fit[2], fi.f_zero_fit[3]) for x in x_values]
f_inf_fit = [fu.clipped_line(x, fi.f_inf_fit[0], fi.f_inf_fit[1]) for x in x_values]
ax.plot(x_values, f_zero_fit)
ax.plot(x_values, f_inf_fit)
# ax.set_xlim((0, 10))
# ax.set_ylim((-1, 1))
ax.set_xlabel("Contrast")
ax.set_ylabel("Frequency in Hz")
ax.set_title("FI-Curve")
plt.tight_layout()
plt.savefig("thesis/figures/p_unit_example.png")
plt.close()
def fi_point_detection():
# cell = "data/final/2013-04-17-ac-invivo-1"
cell = "data/final/2012-04-20-af-invivo-1"
cell_data = CellData(cell)
fi = FICurveCellData(cell_data, cell_data.get_fi_contrasts())
step = cell_data.get_sampling_interval()
fig, axes = plt.subplots(1, 2, figsize=consts.FIG_SIZE_SMALL_WIDE, sharey="row")
f_trace_times, f_traces = fi.get_mean_time_and_freq_traces()
part = 1 + 0.2 + 0.2 # stim duration + delay up front and a part of the "delay" at the back
idx = int(part / step)
f_zero = fi.get_f_zero_frequencies()[-1]
f_zero_idx = fi.indices_f_zero[-1]
f_inf = fi.get_f_inf_frequencies()[-1]
f_inf_idx = fi.indices_f_inf[-1]
axes[0].plot(f_trace_times[-1][:idx], f_traces[-1][:idx])
axes[0].plot([f_trace_times[-1][idx] for idx in f_zero_idx], (f_zero, ), "o")
axes[0].plot([f_trace_times[-1][idx] for idx in f_inf_idx], (f_inf, f_inf), color="orange", linewidth=4)
# mark stim start and end:
stim_start = cell_data.get_stimulus_start()
stim_end = cell_data.get_stimulus_end()
axes[0].plot([stim_start]*2, (0, fi.get_f_baseline_frequencies()[0]), color="darkgrey")
axes[0].plot([stim_end]*2, (0, fi.get_f_baseline_frequencies()[0]), color="darkgrey")
axes[0].set_xlim((-0.2, part - 0.2))
ylimits = axes[0].get_ylim()
axes[0].set_xlabel("Time in s")
axes[0].set_ylabel("Frequency in Hz")
axes[0].set_title("Step Response")
contrasts = fi.stimulus_values
f_zeros = fi.get_f_zero_frequencies()
f_infties = fi.get_f_inf_frequencies()
axes[1].plot(contrasts, f_zeros, 'x')
axes[1].plot(contrasts, f_infties, 'o')
x_values = np.arange(min(contrasts), max(contrasts) + 0.0001, (max(contrasts) - min(contrasts)) / 1000)
f_zero_fit = [fu.full_boltzmann(x, fi.f_zero_fit[0], fi.f_zero_fit[1], fi.f_zero_fit[2], fi.f_zero_fit[3]) for x in
x_values]
f_inf_fit = [fu.clipped_line(x, fi.f_inf_fit[0], fi.f_inf_fit[1]) for x in x_values]
axes[1].plot(x_values, f_zero_fit)
axes[1].plot(x_values, f_inf_fit)
axes[1].set_xlabel("Contrast in %")
# axes[1].set_ylabel("Frequency in Hz")
axes[1].set_title("FI-Curve")
axes[1].set_ylim((0, ylimits[1]))
plt.tight_layout()
plt.savefig("thesis/figures/f_point_detection.png")
plt.close()
def data_fi_curve():
cell = "data/invivo/2013-04-17-ac-invivo-1/"
cell = "data/final/2013-04-17-ac-invivo-1/"
cell_data = CellData(cell)
fi = FICurveCellData(cell_data, cell_data.get_fi_contrasts())
fi.plot_fi_curve()
def data_mean_freq_step_stimulus_with_detections():
cell = "data/invivo/2013-04-17-ac-invivo-1/"
cell = "data/final/2013-04-17-ac-invivo-1/"
cell_data = CellData(cell)
fi = FICurveCellData(cell_data, cell_data.get_fi_contrasts())
time_traces, freq_traces = fi.get_time_and_freq_traces()
mean_times, mean_freqs = fi.get_mean_time_and_freq_traces()
idx = -1
time = np.array(mean_times[idx])

View File

@ -9,9 +9,9 @@ import models.smallModels as sM
def main():
# stimulus_development()
stimulus_development()
# model_adaption_example()
model_comparison()
# model_comparison()
pass
@ -30,7 +30,7 @@ def model_comparison():
stimulus[int(0.9/step):int(1.1/step)] = 0
stimulus[int(1.1/step):int(1.3/step)] = 0.5
fig, axes = plt.subplots(5, 2, sharex=True, sharey="col", figsize=consts.FIG_SIZE_LARGE)
fig, axes = plt.subplots(4, 2, sharex=True, sharey="col", figsize=consts.FIG_SIZE_LARGE)
axes[0, 0].plot(np.arange(-0.5, duration, step)[:len(stimulus)], stimulus)
axes[0, 0].set_title("Stimulus")
@ -40,6 +40,7 @@ def model_comparison():
axes[0, 0].set_ylim((-0.1, 1.5))
axes[0, 0].set_xlim((0, duration-0.5))
v1, spikes = sM.pif_simulation(stimulus, step)
spikes = np.array(spikes)-0.5
axes[1, 0].plot(np.arange(-0.5, duration, step)[:len(v1)], v1)
@ -48,6 +49,7 @@ def model_comparison():
axes[1, 1].plot(time, freq)
axes[1, 0].set_title("PIF")
axes[1, 0].set_ylabel("V in mV")
axes[1, 1].set_ylabel("Frequency in Hz")
v1, spikes = sM.lif_simulation(stimulus, step)
spikes = np.array(spikes)-0.5
@ -57,6 +59,7 @@ def model_comparison():
axes[2, 1].plot(time, freq)
axes[2, 0].set_title("LIF")
axes[2, 0].set_ylabel("V in mV")
axes[2, 1].set_ylabel("Frequency in Hz")
v1, spikes = sM.lifac_simulation(stimulus, step)
spikes = np.array(spikes) - 0.5
@ -66,17 +69,20 @@ def model_comparison():
axes[3, 1].plot(time, freq)
axes[3, 0].set_title("LIFAC")
axes[3, 0].set_ylabel("V in mV")
v1, spikes = sM.lifac_ref_simulation(stimulus, step)
spikes = np.array(spikes) - 0.5
axes[4, 0].plot(np.arange(-0.5, duration, step)[:len(v1)], v1)
axes[4, 0].eventplot(spikes, lineoffsets=1.2, linelengths=0.2, colors="black")
time, freq = hF.calculate_time_and_frequency_trace(spikes, step)
axes[4, 1].plot(time, freq)
axes[4, 0].set_title("LIFAC + ref")
axes[4, 0].set_ylabel("V in mV")
axes[4, 0].set_xlabel("Time [s]")
axes[4, 1].set_xlabel("Time [s]")
axes[3, 1].set_ylabel("Frequency in Hz")
axes[3, 0].set_xlabel("Time in s")
axes[3, 1].set_xlabel("Time in s")
# v1, spikes = sM.lifac_ref_simulation(stimulus, step)
# spikes = np.array(spikes) - 0.5
# axes[4, 0].plot(np.arange(-0.5, duration, step)[:len(v1)], v1)
# axes[4, 0].eventplot(spikes, lineoffsets=1.2, linelengths=0.2, colors="black")
# time, freq = hF.calculate_time_and_frequency_trace(spikes, step)
# axes[4, 1].plot(time, freq)
# axes[4, 0].set_title("LIFAC + ref")
# axes[4, 0].set_ylabel("V in mV")
# axes[4, 0].set_xlabel("Time [s]")
# axes[4, 1].set_xlabel("Time [s]")
# v1, spikes = sM.lifac_ref_noise_simulation(stimulus, step)
@ -111,7 +117,7 @@ def stimulus_development():
axes[1].set_title("rectified stimulus")
axes[2].plot(time, filtered)
axes[2].set_title("rectified with dendritic filter")
axes[2].set_title("rectified plus dendritic filter")
axes[0].set_ylim((-1.15, 1.15))
axes[1].set_ylim((-1.15, 1.15))

View File

@ -1,34 +1,42 @@
from stimuli.SinusoidalStepStimulus import SinusoidalStepStimulus
from stimuli.SinusAmplitudeModulation import SinusAmplitudeModulationStimulus
from CellData import CellData
import numpy as np
import matplotlib.pyplot as plt
import Figure_constants as consts
def main():
stimuli_protocol_examples()
# stimuli_protocol_examples()
am_generation()
pass
def am_generation():
cell = "data/final/2013-04-17-ac-invivo-1"
cell_data = CellData(cell)
fig, axes = plt.subplots(3, 1, sharey=True, sharex=True, figsize=consts.FIG_SIZE_MEDIUM)
start = 0
end = 1
end = 0.05
time_start = -0.2
time_end = 1.2
time_start = -0.025
time_end = 0.075
step_size = 0.00005
frequency = 55
contrast = 0.5
# frequency = 55
contrast = 0.3
base_stim = SinusoidalStepStimulus(frequency, 0, start, end - start)
eod = cell_data.get_base_traces(cell_data.EOD)[0]
step = cell_data.get_sampling_interval()
values = base_stim.as_array(time_start, time_end - time_start, step_size)
time = np.arange(time_start, time_end, step_size)
values = eod[:int(round((time_end-time_start)/step))]
# base_stim = SinusoidalStepStimulus(frequency, 0, start, end - start)
#
# values = base_stim.as_array(time_start, time_end - time_start, step_size)
time = np.arange(time_start, time_end, step_size) * 1000
axes[0].set_title("Fish EOD")
axes[0].plot(time, values)
@ -39,12 +47,13 @@ def am_generation():
axes[1].set_title("Amplitude modulation")
axes[1].plot(time, values*am)
axes[1].plot(time, am)
axes[1].set_ylabel("Voltage [mV]")
axes[1].set_ylabel("Voltage in mV")
axes[2].set_title("Resulting stimulus")
axes[2].plot(time, (values*am) + values)
axes[2].set_xlabel("Time [s]")
axes[2].set_xlim((time_start, time_end))
axes[2].set_xlabel("Time in ms")
axes[2].set_xlim((time[0], time[-1]))
axes[2].set_xticks([-25, 0, 25, 50, 75])
plt.tight_layout()
plt.savefig("thesis/figures/amGeneration.pdf")
plt.close()

View File

@ -94,6 +94,7 @@ class Fitter:
self.f_zero_fit = fi_curve.f_zero_fit
# self.f_zero_slopes = [fi_curve.get_f_zero_fit_slope_at_stimulus_value(c) for c in self.fi_contrasts]
self.f_zero_slope_at_straight = fi_curve.get_f_zero_fit_slope_at_straight()
self.f_zero_slope_at_zero = fi_curve.get_f_zero_fit_slope_at_stimulus_value(0)
self.f_zero_straight_contrast = self.f_zero_fit[3]
max_contrast = max(contrasts)

View File

@ -50,7 +50,7 @@ def main():
# del fits_info[cell]
# print("burstiness bad")
plot_overview_plus_hist(fits_info)
# plot_overview_plus_hist(fits_info)
print("'good' fits of total fits: {} / {}".format(len(fits_info), total_fits))

View File

@ -19,7 +19,7 @@ def main():
def metadata_analysis(data_folder, filter_double_fish=False):
gender = {}
species = {}
sampling_interval = {}
eod_freqs = []
@ -37,6 +37,7 @@ def metadata_analysis(data_folder, filter_double_fish=False):
cell_data = CellData(cell_path)
species = count_with_dict(species, parser.get_species())
gender = count_with_dict(gender, parser.get_gender())
sampling_interval = count_with_dict(sampling_interval, parser.get_sampling_interval())
sizes.append(float(parser.get_fish_size()))
# eod_freqs.append(cell_data.get_eod_frequency())
@ -49,6 +50,7 @@ def metadata_analysis(data_folder, filter_double_fish=False):
for k in sampling_interval.keys():
print("sampling:", np.rint(1.0/float(k)), "count:", sampling_interval[k])
print("# of Fish (by dates):", len(dates.keys()))
print("Fish genders:", gender)
# print("EOD-freq: min {:.2f}, mean {:.2f}, max {:.2f}, std {:.2f}".format(min(eod_freqs), np.mean(eod_freqs), max(eod_freqs), np.std(eod_freqs)))
print("Sizes: min {:.2f}, mean {:.2f}, max {:.2f}, std {:.2f}".format(min(sizes), np.mean(sizes), max(sizes), np.std(sizes)))
@ -59,9 +61,9 @@ def metadata_analysis(data_folder, filter_double_fish=False):
print("duration:", np.unique([r[2] for r in fi_curve_stimulus], return_counts=True))
print("after:", np.unique([r[3] for r in fi_curve_stimulus]))
print("Contrasts:")
for c in fi_curve_contrasts:
print("min: {:.1f}, max: {:.1f}, count: {},".format(c[0], c[-1], len(c)))
# print("Contrasts:")
# for c in fi_curve_contrasts:
# print("min: {:.1f}, max: {:.1f}, count: {},".format(c[0], c[-1], len(c)))
# bins = np.arange(-1, 1.01, 0.05)
# all_contrasts = []
# for c in fi_curve_contrasts:

View File

@ -4,6 +4,7 @@ import matplotlib.pyplot as plt
import pyrelacs.DataLoader as Dl
test_cell = "data/final/2010-11-08-al-invivo-1/"
test_cell = "data/final/2012-04-20-af-invivo-1/" # mostly well detected
def main():
@ -24,7 +25,7 @@ def main():
break
count += 1
height = max(v1)+i
time_offset = 2 # expected time shift per stimulus: with 0.2 delay 1 sec step and 0.8s after stimulus, but doesn't work
plt.eventplot(np.array(fi_spiketimes[i]), colors="black", lineoffsets=height)
plt.plot(np.array(time), v1)
plt.show()

View File

@ -5,7 +5,30 @@ import helperFunctions as hF
def main():
pass
time = 30
adaption_time = 1
step = 0.00005
stimulus = np.zeros(int((time + adaption_time)/step))
v1, spikes = pif_simulation(stimulus, step)
spikes = np.array(spikes)
count = len(spikes[spikes > adaption_time])
print("Baseline freq PIF: {:.2f}".format(count / time))
v1, spikes = lif_simulation(stimulus, step)
spikes = np.array(spikes)
count = len(spikes[spikes > adaption_time])
print("Baseline freq LIF: {:.2f}".format(count / time))
v1, spikes = lifac_simulation(stimulus, step)
spikes = np.array(spikes)
count = len(spikes[spikes > adaption_time])
print("Baseline freq LIFAC: {:.2f}".format(count / time))
v1, spikes = lifac_ref_simulation(stimulus, step)
spikes = np.array(spikes)
count = len(spikes[spikes > adaption_time])
print("Baseline freq LIFAC+ref: {:.2f}".format(count / time))
def pif_simulation(stimulus, step_size):
@ -35,7 +58,7 @@ def lif_simulation(stimulus, step_size):
v_0 = 0
v_base = 0
threshold = 1
v_offset = 1.0013
v_offset = 1.001255
mem_tau = 0.015
v_1 = np.zeros(len(stimulus))
@ -56,7 +79,7 @@ def lifac_simulation(stimulus, step_size):
v_0 = 0
v_base = 0
threshold = 1
v_offset = 1.35
v_offset = 1.3445
mem_tau = 0.015
adaption_tau = 0.1
adaption_step = 0.05
@ -82,7 +105,7 @@ def lifac_ref_simulation(stimulus, step_size):
v_0 = 0
v_base = 0
threshold = 1
v_offset = 1.35
v_offset = 1.3445
mem_tau = 0.015
adaption_tau = 0.1
adaption_step = 0.05

View File

@ -20,34 +20,44 @@
\@writefile{toc}{\select@language{english}}
\@writefile{lof}{\select@language{english}}
\@writefile{lot}{\select@language{english}}
\@writefile{toc}{\contentsline {section}{\numberline {1}Zusammenfassung}{4}{section.1}}
\@writefile{toc}{\contentsline {section}{\numberline {2}Abstract}{4}{section.2}}
\@writefile{toc}{\contentsline {section}{\numberline {3}Introduction}{4}{section.3}}
\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Example behavior of a p-unit with a high baseline firing rate. Baseline Firing: A 100\tmspace +\thinmuskip {.1667em}ms voltage trace of the recording with spikes marked by the black lines. ISI-histogram: The histogram of the ISI with the x-axis in EOD periods, showing the phase locking of the firing. Serial Correlation: The serial correlation of the ISI showing a negative correlation for lags one and two. Step Response: The response of the p-unit to a step increase in EOD amplitude. In {\color {red}(TODO: color)} the averaged frequency over 10 trials and in {\color {red}(TODO: color)} smoothed with an running average with a window of 10\tmspace +\thinmuskip {.1667em}ms. The p-unit strongly reacts to the onset of the stimulus but very quickly adapts to the new stimulus and then shows a steady state response. FI-Curve: The fi-curve visualizes the onset and steady-state response of the neuron for different step sizes (contrasts). In {\color {red}(TODO: color)} the detected onset responses and the fitted Boltzmann, in {\color {red}(TODO: color)} the detected steady-state response and the linear fit.}}{4}{figure.1}}
\newlabel{fig:p_unit_example}{{1}{4}{Example behavior of a p-unit with a high baseline firing rate. Baseline Firing: A 100\,ms voltage trace of the recording with spikes marked by the black lines. ISI-histogram: The histogram of the ISI with the x-axis in EOD periods, showing the phase locking of the firing. Serial Correlation: The serial correlation of the ISI showing a negative correlation for lags one and two. Step Response: The response of the p-unit to a step increase in EOD amplitude. In \todo {color} the averaged frequency over 10 trials and in \todo {color} smoothed with an running average with a window of 10\,ms. The p-unit strongly reacts to the onset of the stimulus but very quickly adapts to the new stimulus and then shows a steady state response. FI-Curve: The fi-curve visualizes the onset and steady-state response of the neuron for different step sizes (contrasts). In \todo {color} the detected onset responses and the fitted Boltzmann, in \todo {color} the detected steady-state response and the linear fit}{figure.1}{}}
\citation{walz2013Phd}
\citation{walz2014static}
\citation{todd1999identification}
\@writefile{toc}{\contentsline {section}{\numberline {1}Zusammenfassung}{3}{section.1}}
\@writefile{toc}{\contentsline {section}{\numberline {2}Abstract}{3}{section.2}}
\@writefile{toc}{\contentsline {section}{\numberline {3}Introduction}{3}{section.3}}
\@writefile{toc}{\contentsline {section}{\numberline {4}Materials and Methods}{3}{section.4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {4.1}Cell recordings}{3}{subsection.4.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {4.2}Stimulus Protocols}{4}{subsection.4.2}}
\newlabel{eq:am_generation}{{1}{4}{Stimulus Protocols}{equation.4.1}{}}
\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces use real EOD data? A) B) {\color {red}(TODO: !)} }}{4}{figure.1}}
\newlabel{fig:stim_examples}{{1}{4}{use real EOD data? A) B) \todo {!}}{figure.1}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {4.3}Cell Characteristics}{5}{subsection.4.3}}
\newlabel{eq:vector_strength}{{2}{5}{Cell Characteristics}{equation.4.2}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {4.4}Leaky Integrate and Fire Model}{5}{subsection.4.4}}
\newlabel{basic_voltage_dynamics}{{6}{6}{Leaky Integrate and Fire Model}{equation.4.6}{}}
\newlabel{currents_lifac}{{7}{6}{Leaky Integrate and Fire Model}{equation.4.7}{}}
\newlabel{Adaption_dynamics}{{8}{6}{Leaky Integrate and Fire Model}{equation.4.8}{}}
\newlabel{full_voltage_dynamics}{{9}{6}{Leaky Integrate and Fire Model}{equation.4.9}{}}
\newlabel{fig:model_comparison}{{4.4}{7}{Leaky Integrate and Fire Model}{equation.4.9}{}}
\@writefile{lof}{\contentsline {figure}{\numberline {2}{\ignorespaces Comparison of different simple models normed to a baseline fire rate of ~10 Hz stimulated with a step stimulus. In the left column y-axis in mV in the right column the y-axis shows the frequency in Hz. PIF: Shows a continuously increasing membrane voltage with a fixed slope and as such constant frequency for a given stimulus strength. LIF: Approaches a stimulus dependent membrane voltage steady state exponentially Also has constant frequency for a fixed stimulus value. LIFAC: Exponentially approaches its new membrane voltage value but also shows adaption after changes in the stimulus the frequency takes some time to adapt and arrive at the new stable value. LIFAC + ref: Very similar to LIFAC the added absolute refractory period keeps the voltage constant for a short time after the spike and limits high fire rates. {\color {red}(TODO: how to deal with the parameters)} }}{7}{figure.2}}
\@writefile{toc}{\contentsline {section}{\numberline {4}Materials and Methods}{5}{section.4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {4.1}Cell recordings}{5}{subsection.4.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {4.2}Stimulus Protocols}{6}{subsection.4.2}}
\newlabel{eq:am_generation}{{1}{6}{Stimulus Protocols}{equation.4.1}{}}
\newlabel{fig:stim_examples}{{2}{6}{Example of the Stimuli construction. At the top a recording of the fish's EOD. In the middle a part of the recording multiplied with the AM, a step with a contrast of 130\% between 0 and 50\,ms (marked in \todo {color}). At the bottom the resulting stimulus trace when the AM is added to the EOD. This example stimulus is for visualization purposes 50\,ms short. During the measurements the stimulus was 0.4\,s or 1\,s long}{figure.2}{}}
\@writefile{lof}{\contentsline {figure}{\numberline {2}{\ignorespaces Example of the Stimuli construction. At the top a recording of the fish's EOD. In the middle a part of the recording multiplied with the AM, a step with a contrast of 130\% between 0 and 50\tmspace +\thinmuskip {.1667em}ms (marked in {\color {red}(TODO: color)}). At the bottom the resulting stimulus trace when the AM is added to the EOD. This example stimulus is for visualization purposes 50\tmspace +\thinmuskip {.1667em}ms short. During the measurements the stimulus was 0.4\tmspace +\thinmuskip {.1667em}s or 1\tmspace +\thinmuskip {.1667em}s long. }}{6}{figure.2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {4.3}Cell Characteristics}{7}{subsection.4.3}}
\newlabel{eq:CV}{{2}{7}{Cell Characteristics}{equation.4.2}{}}
\newlabel{eq:VS}{{3}{7}{Cell Characteristics}{equation.4.3}{}}
\newlabel{eq:SC}{{4}{7}{Cell Characteristics}{equation.4.4}{}}
\@writefile{lof}{\contentsline {figure}{\numberline {3}{\ignorespaces {\color {red}(TODO: place right in text)}On the left: The averaged response of a cell to a step in EOD amplitude. The beginning (at 0\tmspace +\thinmuskip {.1667em}s) and end (at 1\tmspace +\thinmuskip {.1667em}s) of the stimulus are marked by the gray lines. The detected values for the onset ($f_0$) and steady-state ($f_{inf}$) response are marked in {\color {red}(TODO: color)}. $f_0$ is detected as the highest deviation from the mean frequency before the stimulus while $f_{inf}$ is the average frequency in the 0.1\tmspace +\thinmuskip {.1667em}s time window, 25\tmspace +\thinmuskip {.1667em}ms before the end of the stimulus. On the right: The fi-curve visualizes the onset and steady-state response of the neuron for different stimuli contrasts. In {\color {red}(TODO: color)} the detected onset responses and the fitted Boltzmann, in {\color {red}(TODO: color)} the detected steady-state response and the linear fit.}}{8}{figure.3}}
\newlabel{fig:f_point_detection}{{3}{8}{\todo {place right in text}On the left: The averaged response of a cell to a step in EOD amplitude. The beginning (at 0\,s) and end (at 1\,s) of the stimulus are marked by the gray lines. The detected values for the onset ($f_0$) and steady-state ($f_{inf}$) response are marked in \todo {color}. $f_0$ is detected as the highest deviation from the mean frequency before the stimulus while $f_{inf}$ is the average frequency in the 0.1\,s time window, 25\,ms before the end of the stimulus. On the right: The fi-curve visualizes the onset and steady-state response of the neuron for different stimuli contrasts. In \todo {color} the detected onset responses and the fitted Boltzmann, in \todo {color} the detected steady-state response and the linear fit}{figure.3}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {4.4}Leaky Integrate and Fire Model}{8}{subsection.4.4}}
\citation{benda2003universal}
\newlabel{eq:basic_voltage_dynamics}{{5}{9}{Leaky Integrate and Fire Model}{equation.4.5}{}}
\newlabel{eq:adaption_dynamics}{{6}{9}{Leaky Integrate and Fire Model}{equation.4.6}{}}
\newlabel{eq:currents_lifac}{{7}{9}{Leaky Integrate and Fire Model}{equation.4.7}{}}
\@writefile{lof}{\contentsline {figure}{\numberline {4}{\ignorespaces Comparison of different simple models normed to a spontaneous firing rate of ~10 Hz stimulated with a step stimulus. In the left column y-axis in mV in the right column the y-axis shows the frequency in Hz. PIF: Shows a continuously increasing membrane voltage with a fixed slope and as such constant frequency for a given stimulus strength. LIF: Approaches a stimulus dependent membrane voltage steady state exponentially Also has constant frequency for a fixed stimulus value. LIFAC: Exponentially approaches its new membrane voltage value but also shows adaption after changes in the stimulus the frequency takes some time to adapt and arrive at the new stable value. }}{10}{figure.4}}
\newlabel{fig:model_comparison}{{4}{10}{Comparison of different simple models normed to a spontaneous firing rate of ~10 Hz stimulated with a step stimulus. In the left column y-axis in mV in the right column the y-axis shows the frequency in Hz. PIF: Shows a continuously increasing membrane voltage with a fixed slope and as such constant frequency for a given stimulus strength. LIF: Approaches a stimulus dependent membrane voltage steady state exponentially Also has constant frequency for a fixed stimulus value. LIFAC: Exponentially approaches its new membrane voltage value but also shows adaption after changes in the stimulus the frequency takes some time to adapt and arrive at the new stable value}{figure.4}{}}
\newlabel{eq:full_voltage_dynamics}{{8}{10}{Leaky Integrate and Fire Model}{equation.4.8}{}}
\@writefile{lof}{\contentsline {figure}{\numberline {5}{\ignorespaces The stimulus modification in the model. The fish's EOD is simulated with a sin wave. It is rectified at the synapse and then further low-pass filtered in the dendrite.}}{11}{figure.5}}
\newlabel{fig:stim_development}{{5}{11}{The stimulus modification in the model. The fish's EOD is simulated with a sin wave. It is rectified at the synapse and then further low-pass filtered in the dendrite}{figure.5}{}}
\@writefile{lot}{\contentsline {table}{\numberline {1}{\ignorespaces Overview about all variables of the model that are fitted.}}{11}{table.1}}
\newlabel{tab:parameter_explanation}{{1}{11}{Overview about all variables of the model that are fitted}{table.1}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {4.5}Fitting of the Model}{11}{subsection.4.5}}
\bibdata{citations}
\bibcite{todd1999identification}{{1}{1999}{{Todd and Andrews}}{{}}}
\bibcite{walz2013Phd}{{2}{2013}{{Walz}}{{}}}
\bibcite{walz2014static}{{3}{2014}{{Walz et~al.}}{{}}}
\bibcite{benda2003universal}{{1}{2003}{{Benda and Herz}}{{}}}
\bibcite{todd1999identification}{{2}{1999}{{Todd and Andrews}}{{}}}
\bibcite{walz2013Phd}{{3}{2013}{{Walz}}{{}}}
\bibcite{walz2014static}{{4}{2014}{{Walz et~al.}}{{}}}
\bibstyle{apalike}
\newlabel{fig:stim_development}{{4.4}{8}{Leaky Integrate and Fire Model}{figure.2}{}}
\@writefile{lof}{\contentsline {figure}{\numberline {3}{\ignorespaces }}{8}{figure.3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {4.5}Fitting of the Model}{8}{subsection.4.5}}
\@writefile{toc}{\contentsline {section}{\numberline {5}Results}{8}{section.5}}
\@writefile{toc}{\contentsline {section}{\numberline {6}Discussion}{8}{section.6}}
\@writefile{toc}{\contentsline {section}{\numberline {5}Results}{12}{section.5}}
\@writefile{toc}{\contentsline {section}{\numberline {6}Discussion}{12}{section.6}}

View File

@ -1,5 +1,10 @@
\begin{thebibliography}{}
\bibitem[Benda and Herz, 2003]{benda2003universal}
Benda, J. and Herz, A.~V. (2003).
\newblock A universal model for spike-frequency adaptation.
\newblock {\em Neural computation}, 15(11):2523--2564.
\bibitem[Todd and Andrews, 1999]{todd1999identification}
Todd, B.~S. and Andrews, D.~C. (1999).
\newblock The identification of peaks in physiological signals.

View File

@ -3,44 +3,44 @@ Capacity: max_strings=35307, hash_size=35307, hash_prime=30011
The top-level auxiliary file: Masterthesis.aux
The style file: apalike.bst
Database file #1: citations.bib
You've used 3 entries,
You've used 4 entries,
1935 wiz_defined-function locations,
493 strings with 4255 characters,
and the built_in function-call counts, 1117 in all, are:
= -- 112
> -- 38
< -- 2
+ -- 14
- -- 12
* -- 96
:= -- 202
add.period$ -- 9
call.type$ -- 3
change.case$ -- 20
chr.to.int$ -- 3
cite$ -- 3
duplicate$ -- 40
empty$ -- 78
format.name$ -- 17
if$ -- 210
502 strings with 4397 characters,
and the built_in function-call counts, 1543 in all, are:
= -- 156
> -- 51
< -- 3
+ -- 20
- -- 16
* -- 135
:= -- 272
add.period$ -- 12
call.type$ -- 4
change.case$ -- 27
chr.to.int$ -- 4
cite$ -- 4
duplicate$ -- 54
empty$ -- 110
format.name$ -- 24
if$ -- 293
int.to.chr$ -- 1
int.to.str$ -- 0
missing$ -- 2
newline$ -- 18
num.names$ -- 9
pop$ -- 14
missing$ -- 3
newline$ -- 23
num.names$ -- 12
pop$ -- 18
preamble$ -- 1
purify$ -- 21
purify$ -- 28
quote$ -- 0
skip$ -- 32
skip$ -- 43
stack$ -- 0
substring$ -- 88
swap$ -- 3
substring$ -- 133
swap$ -- 4
text.length$ -- 0
text.prefix$ -- 0
top$ -- 0
type$ -- 18
type$ -- 24
warning$ -- 0
while$ -- 10
while$ -- 14
width$ -- 0
write$ -- 41
write$ -- 54

View File

@ -1,4 +1,4 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=pdflatex 2018.11.12) 24 AUG 2020 17:24
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=pdflatex 2018.11.12) 28 AUG 2020 17:32
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
@ -345,25 +345,33 @@ Package floatrow Info: Modified rotfloat package code loaded on input line 473.
\LTright=\skip62
\flrow@types=\toks28
)
(/usr/share/texlive/texmf-dist/tex/latex/wrapfig/wrapfig.sty
\wrapoverhang=\dimen138
\WF@size=\dimen139
\c@WF@wrappedlines=\count123
\WF@box=\box31
\WF@everypar=\toks29
Package: wrapfig 2003/01/31 v 3.6
)
(/usr/share/texlive/texmf-dist/tex/latex/listings/listings.sty
\lst@mode=\count123
\lst@gtempboxa=\box31
\lst@token=\toks29
\lst@length=\count124
\lst@currlwidth=\dimen138
\lst@column=\count125
\lst@pos=\count126
\lst@lostspace=\dimen139
\lst@width=\dimen140
\lst@newlines=\count127
\lst@lineno=\count128
\lst@maxwidth=\dimen141
\lst@mode=\count124
\lst@gtempboxa=\box32
\lst@token=\toks30
\lst@length=\count125
\lst@currlwidth=\dimen140
\lst@column=\count126
\lst@pos=\count127
\lst@lostspace=\dimen141
\lst@width=\dimen142
\lst@newlines=\count128
\lst@lineno=\count129
\lst@maxwidth=\dimen143
(/usr/share/texlive/texmf-dist/tex/latex/listings/lstmisc.sty
File: lstmisc.sty 2015/06/04 1.6 (Carsten Heinz)
\c@lstnumber=\count129
\lst@skipnumbers=\count130
\lst@framebox=\box32
\c@lstnumber=\count130
\lst@skipnumbers=\count131
\lst@framebox=\box33
)
(/usr/share/texlive/texmf-dist/tex/latex/listings/listings.cfg
File: listings.cfg 2015/06/04 1.6 listings configuration
@ -373,20 +381,20 @@ Package: listings 2015/06/04 1.6 (Carsten Heinz)
(./Masterthesis.aux)
\openout1 = `Masterthesis.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 24.
LaTeX Font Info: ... okay on input line 24.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 24.
LaTeX Font Info: ... okay on input line 24.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 24.
LaTeX Font Info: ... okay on input line 24.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 24.
LaTeX Font Info: ... okay on input line 24.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 24.
LaTeX Font Info: ... okay on input line 24.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 24.
LaTeX Font Info: ... okay on input line 24.
LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 24.
LaTeX Font Info: ... okay on input line 24.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 25.
LaTeX Font Info: ... okay on input line 25.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 25.
LaTeX Font Info: ... okay on input line 25.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 25.
LaTeX Font Info: ... okay on input line 25.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 25.
LaTeX Font Info: ... okay on input line 25.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 25.
LaTeX Font Info: ... okay on input line 25.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 25.
LaTeX Font Info: ... okay on input line 25.
LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 25.
LaTeX Font Info: ... okay on input line 25.
*geometry* detected driver: pdftex
*geometry* verbose mode - [ preamble ] result:
@ -423,17 +431,17 @@ LaTeX Font Info: ... okay on input line 24.
(/usr/share/texlive/texmf-dist/tex/context/base/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count131
\scratchdimen=\dimen142
\scratchbox=\box33
\nofMPsegments=\count132
\nofMParguments=\count133
\everyMPshowfont=\toks30
\MPscratchCnt=\count134
\MPscratchDim=\dimen143
\MPnumerator=\count135
\makeMPintoPDFobject=\count136
\everyMPtoPDFconversion=\toks31
\scratchcounter=\count132
\scratchdimen=\dimen144
\scratchbox=\box34
\nofMPsegments=\count133
\nofMParguments=\count134
\everyMPshowfont=\toks31
\MPscratchCnt=\count135
\MPscratchDim=\dimen145
\MPnumerator=\count136
\makeMPintoPDFobject=\count137
\everyMPtoPDFconversion=\toks32
) (/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
Package: epstopdf-base 2010/02/09 v2.5 Base part for package epstopdf
@ -449,8 +457,8 @@ G,.JBIG2,.JB2,.eps]
File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv
e
))
\AtBeginShipoutBox=\box34
Package hyperref Info: Link coloring OFF on input line 24.
\AtBeginShipoutBox=\box35
Package hyperref Info: Link coloring OFF on input line 25.
(/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty
Package: nameref 2012/10/27 v2.43 Cross-referencing by name of section
@ -458,11 +466,11 @@ Package: nameref 2012/10/27 v2.43 Cross-referencing by name of section
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/gettitlestring.sty
Package: gettitlestring 2010/12/03 v1.4 Cleanup title references (HO)
)
\c@section@level=\count137
\c@section@level=\count138
)
LaTeX Info: Redefining \ref on input line 24.
LaTeX Info: Redefining \pageref on input line 24.
LaTeX Info: Redefining \nameref on input line 24.
LaTeX Info: Redefining \ref on input line 25.
LaTeX Info: Redefining \pageref on input line 25.
LaTeX Info: Redefining \nameref on input line 25.
(./Masterthesis.out) (./Masterthesis.out)
\@outlinefile=\write3
@ -483,7 +491,7 @@ File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
)
Package color Info: Driver file: pdftex.def on input line 143.
)
\c@lstlisting=\count138
\c@lstlisting=\count139
(/usr/share/texlive/texmf-dist/tex/latex/ucs/data/uni-0.def
File: uni-0.def 2013/05/13 UCS: Unicode data U+0000..U+00FF
@ -494,91 +502,91 @@ ination with the same identifier (name{page.1}) has been already used, duplicat
e ignored
<to be read again>
\relax
l.73 \newpage
l.74 \newpage
\newpage [1] (./Masterthesis.toc)
\tf@toc=\write4
\openout4 = `Masterthesis.toc'.
[2]
LaTeX Font Info: Try loading font information for OMS+cmr on input line 93.
(/usr/share/texlive/texmf-dist/tex/latex/base/omscmr.fd
File: omscmr.fd 2014/09/29 v2.5h Standard LaTeX font definitions
)
LaTeX Font Info: Font shape `OMS/cmr/m/n' in size <12> not available
(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 93.
<figures/p_unit_example.png, id=76, 433.62pt x 433.62pt>
File: figures/p_unit_example.png Graphic file (type png)
<use figures/p_unit_example.png>
Package pdftex.def Info: figures/p_unit_example.png used on input line 127.
(pdftex.def) Requested size: 409.71692pt x 409.73999pt.
[3] [4 <./figures/p_unit_example.png>]
(/usr/share/texlive/texmf-dist/tex/latex/ucs/data/uni-32.def
File: uni-32.def 2013/05/13 UCS: Unicode data U+2000..U+20FF
)
(/usr/share/texlive/texmf-dist/tex/latex/ucs/data/uni-34.def
File: uni-34.def 2013/05/13 UCS: Unicode data U+2200..U+22FF
) [3]
<figures/amGeneration.pdf, id=97, 433.62pt x 433.62pt>
) [5]
<figures/amGeneration.pdf, id=110, 433.62pt x 433.62pt>
File: figures/amGeneration.pdf Graphic file (type pdf)
<use figures/amGeneration.pdf>
Package pdftex.def Info: figures/amGeneration.pdf used on input line 181.
(pdftex.def) Requested size: 211.91782pt x 211.91988pt.
Overfull \hbox (0.77333pt too wide) in paragraph at lines 180--182
[][] []
[]
<figures/stimuliExamples.pdf, id=98, 433.62pt x 433.62pt>
File: figures/stimuliExamples.pdf Graphic file (type pdf)
<use figures/stimuliExamples.pdf>
Package pdftex.def Info: figures/stimuliExamples.pdf used on input line 185.
(pdftex.def) Requested size: 223.07211pt x 223.07529pt.
Overfull \hbox (11.9693pt too wide) in paragraph at lines 184--187
[][] []
[]
[4 <./figures/amGeneration.pdf> <./figures/stimuliExamples.pdf
pdfTeX warning: pdflatex (file ./figures/stimuliExamples.pdf): PDF inclusion: m
ultiple pdfs with page group included in a single page
>]
LaTeX Warning: Reference `eq:vector_strength' on page 5 undefined on input line
198.
Package pdftex.def Info: figures/amGeneration.pdf used on input line 188.
(pdftex.def) Requested size: 204.85846pt x 204.86006pt.
File: figures/amGeneration.pdf Graphic file (type pdf)
<use figures/amGeneration.pdf>
Package pdftex.def Info: figures/amGeneration.pdf used on input line 188.
(pdftex.def) Requested size: 204.85846pt x 204.86006pt.
File: figures/amGeneration.pdf Graphic file (type pdf)
[5] <figures/model_comparison.pdf, id=197, 578.16pt x 578.16pt>
<use figures/amGeneration.pdf>
Package pdftex.def Info: figures/amGeneration.pdf used on input line 188.
(pdftex.def) Requested size: 204.85846pt x 204.86006pt.
[6 <./figures/amGeneration.pdf>]
<figures/f_point_detection.png, id=154, 433.62pt x 289.08pt>
File: figures/f_point_detection.png Graphic file (type png)
<use figures/f_point_detection.png>
Package pdftex.def Info: figures/f_point_detection.png used on input line 264.
(pdftex.def) Requested size: 301.37201pt x 208.5021pt.
[7] [8 <./figures/f_point_detection.png>]
<figures/model_comparison.pdf, id=184, 578.16pt x 578.16pt>
File: figures/model_comparison.pdf Graphic file (type pdf)
<use figures/model_comparison.pdf>
Package pdftex.def Info: figures/model_comparison.pdf used on input line 285.
Package pdftex.def Info: figures/model_comparison.pdf used on input line 322.
(pdftex.def) Requested size: 346.89867pt x 346.89867pt.
[6]
<figures/stimulus_development.pdf, id=204, 433.62pt x 433.62pt>
[9]
<figures/stimulus_development.pdf, id=196, 433.62pt x 433.62pt>
File: figures/stimulus_development.pdf Graphic file (type pdf)
<use figures/stimulus_development.pdf>
Package pdftex.def Info: figures/stimulus_development.pdf used on input line 29
4.
Package pdftex.def Info: figures/stimulus_development.pdf used on input line 34
0.
(pdftex.def) Requested size: 260.17401pt x 260.17401pt.
[7 <./figures/model_comparison.pdf>]
(./Masterthesis.bbl)
Package atveryend Info: Empty hook `BeforeClearDocument' on input line 317.
[8 <./figures/stimulus_development.pdf>]
Package atveryend Info: Empty hook `AfterLastShipout' on input line 317.
[10 <./figures/model_comparison.pdf>]
[11 <./figures/stimulus_development.pdf>] (./Masterthesis.bbl)
Package atveryend Info: Empty hook `BeforeClearDocument' on input line 405.
[12]
Package atveryend Info: Empty hook `AfterLastShipout' on input line 405.
(./Masterthesis.aux)
Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 317.
Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 317.
Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 405.
Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 405.
Package rerunfilecheck Info: File `Masterthesis.out' has not changed.
(rerunfilecheck) Checksum: 7A3ACD7CD7DC89195072057BF8EFCD4A;622.
LaTeX Warning: There were undefined references.
LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.
Package atveryend Info: Empty hook `AtVeryVeryEnd' on input line 317.
Package atveryend Info: Empty hook `AtVeryVeryEnd' on input line 405.
)
Here is how much of TeX's memory you used:
11014 strings out of 493029
156857 string characters out of 6136233
259147 words of memory out of 5000000
14391 multiletter control sequences out of 15000+600000
9521 words of font info for 34 fonts, out of 8000000 for 9000
11121 strings out of 493029
158535 string characters out of 6136233
268518 words of memory out of 5000000
14482 multiletter control sequences out of 15000+600000
9214 words of font info for 33 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
37i,11n,38p,1008b,551s stack positions out of 5000i,500n,10000p,200000b,80000s
37i,16n,38p,1246b,551s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb></us
r/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmex10.pfb></usr/shar
e/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi12.pfb></usr/share/texl
@ -587,14 +595,13 @@ mf-dist/fonts/type1/public/amsfonts/cm/cmmi8.pfb></usr/share/texlive/texmf-dist
/fonts/type1/public/amsfonts/cm/cmr12.pfb></usr/share/texlive/texmf-dist/fonts/
type1/public/amsfonts/cm/cmr17.pfb></usr/share/texlive/texmf-dist/fonts/type1/p
ublic/amsfonts/cm/cmr8.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/am
sfonts/cm/cmss12.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts
/cm/cmsy10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cm
sy8.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmti12.pf
b>
Output written on Masterthesis.pdf (9 pages, 272242 bytes).
sfonts/cm/cmsy10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts
/cm/cmsy8.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmt
i12.pfb>
Output written on Masterthesis.pdf (13 pages, 325701 bytes).
PDF statistics:
340 PDF objects out of 1000 (max. 8388607)
189 compressed objects within 2 object streams
38 named destinations out of 1000 (max. 500000)
109 words of extra memory for PDF output out of 10000 (max. 10000000)
334 PDF objects out of 1000 (max. 8388607)
211 compressed objects within 3 object streams
46 named destinations out of 1000 (max. 500000)
114 words of extra memory for PDF output out of 10000 (max. 10000000)

BIN
thesis/Masterthesis.pdf Executable file → Normal file

Binary file not shown.

Binary file not shown.

View File

@ -9,6 +9,7 @@
\usepackage[english]{babel}
%\usepackage{float}
\usepackage{floatrow}
\usepackage{wrapfig}
\usepackage{listings} % für den code am Ende
@ -85,7 +86,14 @@ Außerdem erkläre ich, dass die eingereichte Arbeit weder vollständig noch in
\newpage
\section*{Not to forget: TODO}
\begin{itemize}
\item update the colors in all plots to be consistent.
\item make plot labels consistent (Units: in mV vs [mV])
\end{itemize}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Zusammenfassung
@ -94,6 +102,8 @@ Außerdem erkläre ich, dass die eingereichte Arbeit weder vollständig noch in
% Abstract in deutsch
\section{Abstract}
%Einleitung + Ergebnisse der Diskussion in kurz
@ -105,31 +115,42 @@ Außerdem erkläre ich, dass die eingereichte Arbeit weder vollständig noch in
\section{Introduction}
%\begin{figure}[H]
%\floatbox[{\capbeside\thisfloatsetup{capbesideposition={left,top},capbesidewidth=0.49\textwidth}}]{figure}[\FBwidth]
%{\caption{\label{fig:p_unit_example} Example behavior of a p-unit with a high baseline firing rate. Baseline Firing: A 100\,ms voltage trace of the recording with spikes marked by the black lines. ISI-histogram: The histogram of the ISI with the x-axis in EOD periods, showing the phase locking of the firing. Serial Correlation: The serial correlation of the ISI showing a negative correlation for lags one and two. Step Response: The response of the p-unit to a step increase in EOD amplitude. In \todo{color} the averaged frequency over 10 trials and in \todo{color} smoothed with an running average with a window of 10\,ms. The p-unit strongly reacts to the onset of the stimulus but very quickly adapts to the new stimulus and then shows a steady state response. FI-Curve: The fi-curve visualizes the onset and steady-state response of the neuron for different step sizes (contrasts). In \todo{color} the detected onset responses and the fitted Boltzmann, in %\todo{color} the detected steady-state response and the linear fit.}}
%{\includegraphics[width=0.45\textwidth]{figures/p_unit_example.png}}
%\end{figure}
\begin{figure}[H]
{\caption{\label{fig:p_unit_example} Example behavior of a p-unit with a high baseline firing rate. Baseline Firing: A 100\,ms voltage trace of the recording with spikes marked by the black lines. ISI-histogram: The histogram of the ISI with the x-axis in EOD periods, showing the phase locking of the firing. Serial Correlation: The serial correlation of the ISI showing a negative correlation for lags one and two. Step Response: The response of the p-unit to a step increase in EOD amplitude. In \todo{color} the averaged frequency over 10 trials and in \todo{color} smoothed with an running average with a window of 10\,ms. The p-unit strongly reacts to the onset of the stimulus but very quickly adapts to the new stimulus and then shows a steady state response. FI-Curve: The fi-curve visualizes the onset and steady-state response of the neuron for different step sizes (contrasts). In \todo{color} the detected onset responses and the fitted Boltzmann, in \todo{color} the detected steady-state response and the linear fit.}}
{\includegraphics[width=0.9\textwidth]{figures/p_unit_example.png}}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Methoden
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Materials and Methods}
\todo{some transition from the introduction}
\subsection{Cell recordings}
The cell recordings for this master thesis were collected as part of other previous studies (\cite{walz2013Phd}, \citep{walz2014static})\todo{ref other studies} and is described there but will also be repeated below . There were recordings of 457 p-units were inspected. Of those 88 fulfilled the basic necessary requirements of including a measurement of at least 30 seconds of the baseline behavior and containing at least 7 different contrasts with each at least 7 trials for the FI-Curve (see below \todo{ref}). After preanalysis of those cells an additional 13 cells were excluded because of analysis difficulties.
The 75 used cells came from 32 \AptLepto (brown ghost knifefish). \todo{sizes range, EOD range, number of cells}
%# of fish = 32
%sampling: 100000.0 count: 20
%sampling: 20000.0 count: 54
%sampling: 40000.0 count: 1
% with counting fish doubled
%EOD-freq: min 597.94, mean 732.96, max 928.45, std 76.64
%Sizes: min 11.00, mean 15.16, max 25.00, std 2.91
% each fish only once in calculation (as determined with max one fish per day)
%EOD-freq: min 601.09, mean 753.09, max 928.45, std 82.30
%Sizes: min 11.00, mean 15.78, max 25.00, std 3.48
% # of fish = 32
% EOD-freq: min 601.09, mean 753.09, max 928.45, std 82.30
% Sizes: min 11.00, mean 15.78, max 25.00, std 3.48
The cell recordings for this master thesis were collected as part of other previous studies (\cite{walz2013Phd}, \citep{walz2014static})\todo{ref other studies} and is described there but will also be repeated below . There were recordings of 457 p-units were inspected. Of those 88 fulfilled the basic necessary requirements of including a measurement of at least 30 seconds of the baseline behavior and containing at least 7 different contrasts with each at least 7 trials for the FI-Curve (see below \todo{ref fi-curve? }). After pre-analysis of those cells an additional 13 cells were excluded because of analysis difficulties.
The 75 used cells came from 32 \AptLepto (brown ghost knifefish). The fish were between 11-25\,cm long (15.78 $\pm$ 3.48\,cm) and their electric organ discharge (EOD) frequencies were between 601-928\,Hz (753.1 $\pm$ 82.3\,Hz). The gender of the fish was not determined.
The in vivo intracellular recordings of P-unit electroreceptors were done in the lateral line nerve . The fish were anesthetized with MS-222 (100-130 mg/l; PharmaQ; Fordingbridge, UK) and the part of the skin covering the lateral line just behind the skull was removed, while the area was anesthetized with Lidocaine (2\%; bela-pharm; Vechta, Germany). The fish were immobilized for the recordings with Tubocurarine (Sigma-Aldrich; Steinheim, Germany, 2550 $\mu l$ of 5\. mg/ml solution) and placed in the experimental tank (47 $\times$ 42 $\times$ 12\,cm) filled with water from the fish's home tank with a conductivity of about 300$\mu$\,S/cm and the temperature was around 28°C.
All experimental protocels were approved and complied with national and regional laws (files: no. 55.2-1-54-2531-135-09 and Regierungspräsidium Tübingen no. ZP 1/13 and no. ZP 1/16 \todo{andere antrags nummern so richtig ?})
@ -137,7 +158,7 @@ For the recordings a standard glass mircoelectrode (borosilicate; 1.5 mm outer d
vato, CA, USA) and filled with 1M KCl solution. The electrodes were controlled using microdrives (Luigs-Neumann; Ratingen, Germany) and the potentials recorded with the bridge mode of the SEC-05 amplifier (npi-electronics GmbH, Tamm, Germany) and lowpass filtered at 10 kHz.
During the recording spikes were detected online using the peak detection algorithm from \cite{todd1999identification}. It uses a dynamically adjusted threshold value above the previously detected trough. To detect spikes through changes in amplitude the threshold was set to 50\% of the amplitude of a detected spike while keeping the threshold above a minimum set to be higher than the noise level based on a histogram of all peak amplitudes. Trials with bad spike detection were removed from further analysis.
The fish's electric organ discharge (EOD) was recorded using using two vertical carbon rods (11\,cm long, 8\,mm diameter) positioned in front of the head and behind its tail. The signal was amplified 200 to 500 times and band-pass filtered (3 1500 Hz passband, DPA2-FX, npi-electronics, Tamm, Germany). The electrodes were placed on isopotential lines of the stimulus field to reduce the interference of the stimulus in the recording. All signals were digitized using a data acquisition board (PCI-6229; National Instruments, Austin TX, USA) at a sampling rate of 20-100\,kHz (54 cells at 20\,kHz, 20 at 100\,kHz and 1 at 40\,kHz)
The fish's electric organ discharge (EOD) was recorded using using two vertical carbon rods (11\,cm long, 8\,mm diameter) positioned in front of the head and behind its tail. The signal was amplified 200 to 500 times and band-pass filtered (3 1500 Hz passband, DPA2-FX, npi-electronics, Tamm, Germany). The electrodes were placed on iso-potential lines of the stimulus field to reduce the interference of the stimulus in the recording. All signals were digitized using a data acquisition board (PCI-6229; National Instruments, Austin TX, USA) at a sampling rate of 20-100\,kHz (54 cells at 20\,kHz, 20 at 100\,kHz and 1 at 40\,kHz)
The recording and stimulation was done using the ephys, efield, and efish plugins of the software RELACS (\href{www.relacs.net}{www.relacs.net}). It allowed the online spike and EOD detection, pre-analysis and visualization and ran on a Debian computer.
@ -153,16 +174,25 @@ For this work two types of recordings were made with all cells: baseline recordi
The 'stimulus' for the baseline recording is purely the EOD field the fish produces itself with no external stimulus.
The amplitude step stimulus here is a step in EOD amplitude. To be able to cause an amplitude modulation (AM) in the fish's EOD , the EOD was recorded and the multiplied with the modulation (see fig. \ref{fig:stim_examples} A middle). This modified EOD can then be presented at the right phase with the stimulus electrodes, causing constructive interference and adding the used amplitude modulation to the EOD (Fig. \ref{fig:stim_examples} A). This stimuli construction as seen in equation \ref{eq:am_generation} works for any AM.
The amplitude step stimulus here is a step in EOD amplitude. To be able to cause an amplitude modulation (AM) in the fish's EOD , the EOD was recorded and the multiplied with the modulation (see fig. \ref{fig:stim_examples}). This modified EOD can then be presented at the right phase with the stimulus electrodes, causing constructive interference and adding the used amplitude modulation to the EOD (Fig. \ref{fig:stim_examples}). This stimuli construction as seen in equation \ref{eq:am_generation} works for any AM as long as the EOD of the fish is stable.
\begin{equation}
Stimulus = EOD(t) + AM(t) * EOD(t) \todo{acceptable?}
\label{eq:am_generation}
\end{equation}
The step stimuli all consisted of a delay of 0.2\,s followed by a 0.4\,s (n=68) or 1\,s (n=7) long step and a 0.8\,s long recovery time. The contrast range measured was for the most cells -0.2-0.2\% of EOD amplitude. Some cells were measured in a larger range up to -0.8-0.8\%. In this range at least 7 contrasts were chosen and measured at least 7 times.
That means for every cell the FI-Curve was measured at at least 7 Points each with at least 7 trials. If more contrasts were measured during the recording the additional information was used as long as there were at least 3 trials available.
\begin{figure}[H]
\floatbox[{\capbeside\thisfloatsetup{capbesideposition={left, center}, capbesidewidth=0.45\textwidth}}]{figure}[\FBwidth]
{\caption{\label{fig:stim_examples} Example of the Stimuli construction. At the top a recording of the fish's EOD. In the middle a part of the recording multiplied with the AM, a step with a contrast of 130\% between 0 and 50\,ms (marked in \todo{color}). At the bottom the resulting stimulus trace when the AM is added to the EOD. This example stimulus is for visualization purposes 50\,ms short. During the measurements the stimulus was 0.4\,s or 1\,s long. }}
{\includegraphics[width=0.45\textwidth]{figures/amGeneration.pdf}}
\end{figure}
The step stimuli all consisted of a delay of 0.2\,s followed by a 0.4\,s (n=68) or 1\,s (n=7) long step and a 0.8\,s long recovery time. The contrast range measured was for the most cells 80-120\% of EOD amplitude. Some cells were measured in a larger range up to 20-180\%. In this range at least 7 contrasts were measured with at least 7 trials, but again many cells were measured with more contrasts and trials. The additionally measured contrasts were used for the model if they had at least 3 trials
That means for every cell the FI-Curve was measured at at least 7 Points each with at least 7 trials. If more contrasts were measured during the recording the additional information was used as long as there were at least 3 trials available.
All presentations had 0.2\,s delay at the start and then started the stimulus at time 0. The step stimulus was presented for 0.4\,s (7 cells) or 1\,s(68 cells) and followed by 0.8\,s time for the cell to recover back to baseline.
% Always a 0.2 second delay and 0.8 seconds after stimulus
% Stimulus start at time=0
@ -170,76 +200,79 @@ That means for every cell the FI-Curve was measured at at least 7 Points each wi
% contrast ranges maximal -0.8-0.8, contrasts tested 8-23
% most common -0.2 - 0.2 with 7 or 9 contrasts
\todo{contrast ranges, presentation windows/durations, changing stimulus parameters}
\begin{figure}[H]
\centering
\begin{minipage}{0.49\textwidth}
\raisebox{70mm}{\large\sffamily A}
\includegraphics[width=0.95\textwidth]{figures/amGeneration.pdf}
\end{minipage}\hfill
\begin{minipage}{0.49\textwidth}
\raisebox{70mm}{\large\sffamily B}
\includegraphics[width=\textwidth]{figures/stimuliExamples.pdf}
%\caption{second}
\end{minipage}
\caption{use real EOD data? A) B) \todo{!} \label{fig:stim_examples}}
\end{figure}
%\begin{figure}[H]
% \centering
% \begin{minipage}{0.49\textwidth}
% \raisebox{70mm}{\large\sffamily A}
% \includegraphics[width=0.95\textwidth]{figures/amGeneration.pdf}
% \end{minipage}\hfill
% \begin{minipage}{0.49\textwidth}
% \raisebox{70mm}{\large\sffamily B}
% \includegraphics[width=\textwidth]{figures/stimuliExamples.pdf}
% \end{minipage}
% \caption{use real EOD data? A) B) \todo{(remove SAM stimulus/ the B full figure)} %\label{fig:stim_examples}}
%\end{figure}
\subsection{Cell Characteristics}
To characterize the cells and compare the models to them, ten characteristics were chosen and computed for each cell.
The baseline response of the cells was characterized 6 values: The baseline frequency, the vector strength, the serial correlation of interspike intervals (ISI), the ISI histogram and the burstiness. The response to step stimuli was characterized by the FI-curve.
The vector strength is a measure of how strong the cell locks to a phase of the stimulus. It describes in this case if the cell always fires at the same time in the EOD period (Eq.\ref{eq:vector_strength}). The serial correlations of the ISI describe how the size of a ISI influences the size of the following ISI.
\subsection{Cell Characteristics}
The cells were characterized by ten parameters: 6 for the baseline and 4 for the fi-curve.
For the baseline the mean frequency was calculated by dividing the number of spikes in the recording by the recording time. Then the set $T$ of all interspike intervals (ISI) of the spikes in the recording further parameter was calculated and the other parameters were calculated from it.
Baseline
The coefficient of variation (CV) is defined as the standard deviation (STD) of $T$ divided by the mean ISI, see equation \ref{eq:CV} with angled brackets as the averaging operator.
%p-Value:
\begin{equation}
CV = \frac{STD(T)}{\langle T \rangle}
\label{eq:CV}
\end{equation}
%\begin{equation}
%p = \frac{neuron frequency}{EOD frequency}
%\end{equation}
vector strength:
The vector strength (VS) is a measure of how strong the cell locks to a phase of the EOD. It was calculated as seen in Eq. \ref{eq:VS}, by placing each spike on a unit circle depending on the relative spike time $t_i$ of how much time has passed since the start of the current EOD period in relation to the EOD period length. This set of vectors is then averaged and the absolute value of this average vector describes the VS. If the VS is zero the spikes happen equally in all phases of the EOD while if it is one all spikes happen at the exact same phase of the EOD.
\begin{equation}
p(\omega) = \frac{1}{n} \sum_n e^{iwt_j}
\label{eq:vector_strength}
p(\omega) = \frac{1}{n} \sum_n e^{iwt_i}
\label{eq:VS}
\end{equation}
serial correlation:
The serial correlation with lag x ($SC_x$) of $T$ is a measure how the ISI $T_i$ (the i-th ISI) influences the $T_{i+x}$ the ISI with a lag of x intervals. This is calculated as,
\begin{equation}
SC_k = \frac{\langle (T_{j} - \langle T \rangle)(T_{j+k} - \langle T \rangle) \rangle}{\langle (T_j - \langle T \rangle)^2 \rangle}
SC_x = \frac{\langle (T_{i} - \langle T \rangle)(T_{i+x} - \langle T \rangle) \rangle}{\sqrt{\langle (T_i - \langle T \rangle)^2 \rangle}\sqrt{\langle (T_{i+x} - \langle T \rangle)^2 \rangle}}
\label{eq:SC}
\end{equation}
coefficient of variation:
with the angled brackets again the averaging operator.
\begin{equation}
CV = \frac{STD(T)}{\langle T \rangle}
\end{equation}
burstiness: \todo{how to write as equation}
Finally the ISI-histogram was calculated within a range of 0-50\,ms and a bin size of 0.1\,ms and the burstiness was calculated as the percentage of ISI smaller than 2.5 EOD periods multiplied by the average ISI. This gives a rough measure of how how often a cell fires in the immediately following EOD periods compared to its average firing frequency. With a cell being more bursty the higher the percentage of small ISI and the lower the firing frequency of the cell.
\begin{equation}
b = (T < 1/2EODf)/ N * \langle T \rangle
\end{equation}
%burstiness: \todo{how to write as equation, ignore and don't show an equation?}
% \begin{equation}
% b = (T < 1/2EODf)/ N * \langle T \rangle
% \end{equation}
\begin{figure}[H]
\centering
% trim={<left> <lower> <right> <upper>}
\includegraphics[trim={10mm 5mm 10mm 5mm}, scale=0.8]{figures/f_point_detection.png}
\caption{\label{fig:f_point_detection} \todo{place right in text}On the left: The averaged response of a cell to a step in EOD amplitude. The beginning (at 0\,s) and end (at 1\,s) of the stimulus are marked by the gray lines. The detected values for the onset ($f_0$) and steady-state ($f_{inf}$) response are marked in \todo{color}. $f_0$ is detected as the highest deviation from the mean frequency before the stimulus while $f_{inf}$ is the average frequency in the 0.1\,s time window, 25\,ms before the end of the stimulus. On the right: The fi-curve visualizes the onset and steady-state response of the neuron for different stimuli contrasts. In \todo{color} the detected onset responses and the fitted Boltzmann, in \todo{color} the detected steady-state response and the linear fit.}
\end{figure}
The adaption behavior of the cell was characterized by the fi-curve consisting of the onset ($f_0$) and steady-state ($f_{inf}$) response. First the ISI frequency trace for each stimulus was calculated. The ISI frequency of a time point t is defined as the $1/T_i$ with $T_i$ being the ISI the time point t falls into. This gives a frequency trace starting by the first spike and ending at the last spike. For the further analysis all trials done for a specific contrast were pointwise averaged after cutting them to the same length. This gives an averaged step response for each contrast as seen in figure \ref{fig:f_point_detection} on the left.
In this frequency trace the onset $f_0$ and steady-state $f_{inf}$ response were detected (fig. \ref{fig:f_point_detection}). $f_0$ was defined as the farthest deviation from the mean frequency before the stimulus in the range of 25\,ms after stimulus onset. If there was no deviation farther than the variations before the stimulus, then the average frequency in that time window was used. This approximation made the detection of $f_0$ more stable for small contrasts and traces with high variation.
The $f_{inf}$ response was defined as the average frequency of the trace in the 0.1\,s time window, 25\,ms before the end of the stimulus.
Afterwards a Boltzmann was fitted to the onset response and a rectified line was fitted to the steady-state responses (FI-Curve fig. \ref{fig:f_point_detection}).
FI-Curve:
\todo{Figure of detection}
explain detection of f-points
\subsection{Leaky Integrate and Fire Model}
@ -250,55 +283,110 @@ also show function with membrane resistance before explaining that is unknown an
% explain subthreshold behaviour first then add V_{th} and adaption etc
% explain modeling of the adaption current see Benda2010
% table with explanation of variables ?
\todo{restructure and rewrite sounds horrible}
The P-units were modeled with an noisy leaky integrate-and-fire neuron with an adaption current (LIFAC). The basic voltage dynamics in this model follows equation \ref{basic_voltage_dynamics}. The voltage is integrated over time while also exponentially decaying back to zero. When a voltage threshold is reached the voltage is set back to zero and a spike is recorded. The currents in this model carry the unit mV as the the cell bodies of p-units are inaccessible during the recordings and as such the resistance of the cell membrane is unknown \todo{ref mem res p-units}.
The current can be split into three parts: the adaption current, the input current and the bias current (Eq. \ref{currents_lifac}). The input current is the stimulus from outside the cell, the bias current models the general activity of the cell and the adaption current models a combination of the M-type, mAHP-type and sodium adaption currents \todo{ref Benda 2005}.
The adaption current is modeled as an exponential decay with the time constant $\tau_A$ and a strength called $\Delta_A$ (Eq. \ref{Adaption_dynamics}). $\Delta_A$ is multiplied with the sum of events in the spike train ($\delta (t)$) of the model cell itself. For the simulation using the Euler integration this results in an increase of $I_A$ by $\Delta_A$ in every time step where a spike is recorded. \todo{image of model simulation with voltage adaption and spikes?}
\todo{add an introduction into models Pif - LIF - LIFAC}
\todo{restructure and rewrite sounds horrible}
Finally a noise current and an absolute refractory period where added to the model. The noise $\xi$ is drawn in from a Gaussian noise with values between 0 and 1 and divided by $\sqrt{\Delta t}$ to get a noise which autocorrelation function is independent of the integration step size $\Delta t$. After an excitation of the model the voltage is kept at zero for the duration of the refractory period.
The above described cell characteristics need to be reproduced by a simple and efficient model to be able to simulate bigger populations in a reasonable time. The simplest commonly used neuron model is the perfect integrate-and-fire (PIF) model. It's voltage can be described in one equation: $\tau_m \frac{dV}{dt} = \frac{I}{R_m}$ with $I$ the stimulus current, $R_m$ the membrane resistance and a voltage threshold $V_\theta$. In this model $I$ is integrated and when this threshold is reached the voltage is reset to zero and a spike is recorded (see fig. \ref{fig:model_comparison} PIF). The model is useful for basic simulations but cannot reproduce the richer behavior of the p-units, as it has neither a memory of previous spikes that could cause the negative serial correlation between successive spikes nor can it show any adaption behavior.
The next slightly more complex model is the leaky integrate-and-fire (LIF) model. As the name suggests it adds a leakage current to the PIF and as follows the equation \ref{eq:basic_voltage_dynamics} (fig. \ref{fig:model_comparison} LIF). The leakage current adds sub threshold behavior to the model but still cannot reproduce the adaption or serial correlation.
\begin{equation}
\tau_m \frac{dV}{dt} = -V + I
\label{basic_voltage_dynamics}
\tau_m \frac{dV}{dt} = -V + \frac{I}{R_m}
\label{eq:basic_voltage_dynamics}
\end{equation}
\begin{equation}
I = \alpha I_{Input} - I_A + I_{Bias}
\label{currents_lifac}
\end{equation}
To reproduce this behavior the model needs some form of memory of previous spikes. There are two main ways this can be added to the model as an adaptive current or a dynamic threshold. The biophysical mechanism of the adaption in p-units is unknown because the cell bodies are not accessible for intra-cellular recordings. Following the results of \cite{benda2003universal} a negative adaptive current was chosen, because the dynamic threshold causes divisive adaption instead of the subtractive adaption of p-units \todo{reference}. This results in an leaky integrate-and-fire model with adaption current (LIFAC) (fig. \ref{fig:model_comparison} LIFAC). The added adaptive current follow the dynamics:
\begin{equation}
\tau_A \frac{dI_A}{dt} = -I_A + \Delta_A \sum \delta (t)
\label{Adaption_dynamics}
\label{eq:adaption_dynamics}
\end{equation}
It is modeled as an exponential decay with the time constant $\tau_A$ and a strength called $\Delta_A$. $\Delta_A$ is multiplied with the sum of events in the spike train ($\delta (t)$) of the model cell. For the simulation using the Euler integration this results in an increase of $I_A$ by $\frac{\Delta_A}{\tau_A}$ at every time step where a spike is recorded. \todo{image of model simulation with voltage adaption and spikes using the toy model}
The current of the from equation \ref{eq:basic_voltage_dynamics} can thus be split into three currents for the modeling of the neuron:
\begin{equation}
\tau_m \frac{dV}{dt} = -V+I_{Bias} +\alpha I_{Input} - I_{A} + \sqrt{2D}\frac{\xi}{\sqrt{\Delta t}}
\label{full_voltage_dynamics}
I = \alpha I_{Input} - I_A + I_{Bias}
\label{eq:currents_lifac}
\end{equation}
The stimulus current $I_{Input}$, the bias current $I_{Bias}$ and the already discussed adaption current $I_A$. $I_{Input}$ is the current the stimulus, an amplitude modulated sine wave mimicking the frequency EOD. This stimulus is then rectified to model the receptor synapse and low-pass filtered with a time constant of $\tau_{dend}$ to simulate the low-pass filter properties of the dendrite (fig. \ref{fig:stim_development}). Afterwards it is multiplied with $\alpha$ a cell specific gain factor. This gain factor has the unit of cm because the $I_{Input}$ stimulus represents the EOD with a unit of mV/cm.
$I_{Bias}$ is the bias current that causes the cells spontaneous spiking. Note that in this p-unit model all currents are measured in mV because as mentioned above the cell body is not accessible for intra-cellular recordings and as such the membrane resistance $R_m$ is unknown \todo{ref mem res p-units}.
Finally noise and an absolute refractory period were added to the model. The noise $\xi$ is drawn in from a Gaussian noise with values between 0 and 1 and divided by $\sqrt{\Delta t}$ to get a noise which autocorrelation function is independent of the simulation step size $\Delta t$. The absolute refractory period $t_{ref}$ is implemented that after a spike the model voltage is kept at zero for the duration of the refractory period.
\begin{figure}[H]
\includegraphics[scale=0.6]{figures/model_comparison.pdf}
\label{fig:model_comparison}
\caption{Comparison of different simple models normed to a baseline fire rate of ~10 Hz stimulated with a step stimulus. In the left column y-axis in mV in the right column the y-axis shows the frequency in Hz. PIF: Shows a continuously increasing membrane voltage with a fixed slope and as such constant frequency for a given stimulus strength. LIF: Approaches a stimulus dependent membrane voltage steady state exponentially Also has constant frequency for a fixed stimulus value. LIFAC: Exponentially approaches its new membrane voltage value but also shows adaption after changes in the stimulus the frequency takes some time to adapt and arrive at the new stable value. LIFAC + ref: Very similar to LIFAC the added absolute refractory period keeps the voltage constant for a short time after the spike and limits high fire rates. \todo{how to deal with the parameters} }
\caption{\label{fig:model_comparison} Comparison of different simple models normed to a spontaneous firing rate of ~10 Hz stimulated with a step stimulus. In the left column y-axis in mV in the right column the y-axis shows the frequency in Hz. PIF: Shows a continuously increasing membrane voltage with a fixed slope and as such constant frequency for a given stimulus strength. LIF: Approaches a stimulus dependent membrane voltage steady state exponentially Also has constant frequency for a fixed stimulus value. LIFAC: Exponentially approaches its new membrane voltage value but also shows adaption after changes in the stimulus the frequency takes some time to adapt and arrive at the new stable value. }
% LIFAC + ref: Very similar to LIFAC the added absolute refractory period keeps the voltage constant for a short time after the spike and limits high fire rates. \todo{how to deal with the parameters}
\end{figure}
Together this results in the dynamics seen in equation \ref{eq:full_voltage_dynamics}. Not shown in the equation is the refractory period $t_{ref}$
\begin{equation}
\begin{split}
\tau_m \frac{dV}{dt} &= -V+I_{Bias} +\alpha I_{Input} - I_{A} + \sqrt{2D}\frac{\xi}{\sqrt{\Delta t}} \\
\tau_A \frac{dI_A}{dt} &= -I_A + \Delta_A \sum \delta (t)
\label{eq:full_voltage_dynamics}
\end{split}
\end{equation}
\begin{figure}[H]
\includegraphics[scale=0.6]{figures/stimulus_development.pdf}
\label{fig:stim_development}
\caption{}
\caption{\label{fig:stim_development} The stimulus modification in the model. The fish's EOD is simulated with a sin wave. It is rectified at the synapse and then further low-pass filtered in the dendrite.}
\end{figure}
\begin{table}[H]
\begin{tabular}{c|l|c}
parameter & explanation & unit \\
\hline
$\alpha$ & stimulus scaling factor & [cm] \\
$tau_m$ & membrane time constant & [ms]\\
$I_{Bias}$ & bias current & [mV] \\
$\sqrt{2D}$ & noise strength & [mV$\sqrt{\text{s}}$]\\
$\tau_A$ & adaption time constant & [ms] \\
$\Delta_A$ & adaption strength & [mVms]\\
$\tau_{dend}$ & time constant of dendritic low-pass filter & [ms] \\
$t_{ref}$ & absolute refractory period & [ms]
\end{tabular}
\caption{\label{tab:parameter_explanation} Overview about all variables of the model that are fitted.}
\end{table}
\subsection{Fitting of the Model}
% describe used errors
% describe Nelder Mead
This leaves the eight variables to be fitted to the cell. During the fitting and the analysis all models were simulated with at time step of 0.05\,ms.
The stimuli as described in the stimulus protocols section above were recreated for the stimulation of the model during the fitting process. The pure fish EOD was approximated by a simple sin function of the appropriate frequency, but it was decided to keep the amplitude of the sin at one to make the models more comparable. Changes in the amplitude can be compensated in the model by changing the input scaling factor and the time constant of the dendritic low-pass filter, so there is no qualitative difference.
The model during the fitting the baseline stimulus was simulated with 3 times with 30\,s each and the step stimuli were simulated with a 0.5\,s delay, 0.5\,s duration and 0.5\,s recovery time with the same contrasts as used in the cell. The step stimuli were repeated 8 times.
With the simulation data the model characteristics were calculated the same way as for the cells (see above).
The error function was constructed from the absolute differences between the vector strengths, the burstiness and the coefficients of variation, the absolute relative error for the steady-state response slope and mean absolute relative error between their respective $f_{inf}$ detections and $f_0$ detections and finally the root-mean-square error between the ISI-histograms and the first 50\,ms of the frequency response after stimulus onset.
% errors
%[error_vs, error_sc, error_cv, error_hist, error_bursty, error_f_inf, error_f_inf_slope, error_f_zero, error_f_zero_slope_at_straight, error_f0_curve]
% differences for baseline characteristics
% rms of ISI bins, f_0 response frequency trace
% abs diff of vs, sc, cv, burstiness
% fi-curve difference between f_inf slope , mean relative error between f_points
% baseline frequency "set" with I_Bias
\section{Results}

View File

@ -1,12 +1,12 @@
\select@language {english}
\contentsline {section}{\numberline {1}Zusammenfassung}{3}{section.1}
\contentsline {section}{\numberline {2}Abstract}{3}{section.2}
\contentsline {section}{\numberline {3}Introduction}{3}{section.3}
\contentsline {section}{\numberline {4}Materials and Methods}{3}{section.4}
\contentsline {subsection}{\numberline {4.1}Cell recordings}{3}{subsection.4.1}
\contentsline {subsection}{\numberline {4.2}Stimulus Protocols}{4}{subsection.4.2}
\contentsline {subsection}{\numberline {4.3}Cell Characteristics}{5}{subsection.4.3}
\contentsline {subsection}{\numberline {4.4}Leaky Integrate and Fire Model}{5}{subsection.4.4}
\contentsline {subsection}{\numberline {4.5}Fitting of the Model}{8}{subsection.4.5}
\contentsline {section}{\numberline {5}Results}{8}{section.5}
\contentsline {section}{\numberline {6}Discussion}{8}{section.6}
\contentsline {section}{\numberline {1}Zusammenfassung}{4}{section.1}
\contentsline {section}{\numberline {2}Abstract}{4}{section.2}
\contentsline {section}{\numberline {3}Introduction}{4}{section.3}
\contentsline {section}{\numberline {4}Materials and Methods}{5}{section.4}
\contentsline {subsection}{\numberline {4.1}Cell recordings}{5}{subsection.4.1}
\contentsline {subsection}{\numberline {4.2}Stimulus Protocols}{6}{subsection.4.2}
\contentsline {subsection}{\numberline {4.3}Cell Characteristics}{7}{subsection.4.3}
\contentsline {subsection}{\numberline {4.4}Leaky Integrate and Fire Model}{8}{subsection.4.4}
\contentsline {subsection}{\numberline {4.5}Fitting of the Model}{11}{subsection.4.5}
\contentsline {section}{\numberline {5}Results}{12}{section.5}
\contentsline {section}{\numberline {6}Discussion}{12}{section.6}

View File

@ -202,4 +202,14 @@
publisher={American Association for the Advancement of Science}
}
@article{gao2012implementing,
title={Implementing the Nelder-Mead simplex algorithm with adaptive parameters},
author={Gao, Fuchang and Han, Lixing},
journal={Computational Optimization and Applications},
volume={51},
number={1},
pages={259--277},
year={2012},
publisher={Springer}
}

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB