matmet update, analysis fig
This commit is contained in:
parent
96e9d744bb
commit
659c71673a
73
analysis.py
73
analysis.py
@ -17,8 +17,7 @@ def main():
|
||||
# parser.add_argument("dir", help="folder containing the cell folders with the fit results")
|
||||
# args = parser.parse_args()
|
||||
|
||||
dir_path = "results/invivo_results/" # args.dir
|
||||
dir_path = "results/invivo-1/"
|
||||
dir_path = "results/final_1/" # args.dir
|
||||
|
||||
# if not os.path.isdir(dir_path):
|
||||
# print("Argument dir is not a directory.")
|
||||
@ -51,6 +50,9 @@ def main():
|
||||
# del fits_info[cell]
|
||||
# print("burstiness bad")
|
||||
|
||||
plot_overview_plus_hist(fits_info)
|
||||
|
||||
|
||||
print("'good' fits of total fits: {} / {}".format(len(fits_info), total_fits))
|
||||
errors = calculate_percent_errors(fits_info)
|
||||
create_boxplots(errors)
|
||||
@ -216,6 +218,73 @@ def create_boxplots(errors):
|
||||
plt.close()
|
||||
|
||||
|
||||
def plot_overview_plus_hist(fits_info):
|
||||
pairs = {}
|
||||
for cell in sorted(fits_info.keys()):
|
||||
for behaviour in fits_info[cell][1].keys():
|
||||
if behaviour not in pairs.keys():
|
||||
pairs[behaviour] = [[], []]
|
||||
|
||||
# model_value
|
||||
pairs[behaviour][1].append(fits_info[cell][1][behaviour])
|
||||
# cell value
|
||||
pairs[behaviour][0].append(fits_info[cell][2][behaviour])
|
||||
|
||||
for behaviour in pairs.keys():
|
||||
error_overview_with_behaviour_dist(pairs[behaviour][0], pairs[behaviour][1], behaviour)
|
||||
|
||||
|
||||
def error_overview_with_behaviour_dist(x, y, title):
|
||||
# definitions for the axes
|
||||
left, width = 0.1, 0.65
|
||||
bottom, height = 0.1, 0.65
|
||||
spacing = 0.005
|
||||
|
||||
rect_scatter = [left, bottom, width, height]
|
||||
rect_histx = [left, bottom + height + spacing, width, 0.2]
|
||||
rect_histy = [left + width + spacing, bottom, 0.2, height]
|
||||
|
||||
# start with a square Figure
|
||||
fig = plt.figure(figsize=(8, 8))
|
||||
|
||||
ax = fig.add_axes(rect_scatter)
|
||||
ax_histx = fig.add_axes(rect_histx, sharex=ax)
|
||||
ax_histy = None # fig.add_axes(rect_histy, sharey=ax)
|
||||
|
||||
# use the previously defined function
|
||||
scatter_hist(x, y, ax, ax_histx, ax_histy)
|
||||
plt.title(title)
|
||||
plt.show()
|
||||
|
||||
|
||||
def scatter_hist(cell_values, model_values, ax, ax_histx, ax_histy):
|
||||
# copied from matplotlib
|
||||
|
||||
# no labels
|
||||
ax_histx.tick_params(axis="cell_values", labelbottom=False)
|
||||
# ax_histy.tick_params(axis="model_values", labelleft=False)
|
||||
|
||||
# the scatter plot:
|
||||
ax.scatter(cell_values, model_values)
|
||||
|
||||
minimum = min(min(cell_values), min(model_values))
|
||||
maximum = max(max(cell_values), max(model_values))
|
||||
ax.plot((minimum, maximum), (minimum, maximum), color="grey")
|
||||
|
||||
ax.set_xlabel("cell value")
|
||||
ax.set_ylabel("model value")
|
||||
|
||||
# now determine nice limits by hand:
|
||||
binwidth = 0.25
|
||||
xymax = max(np.max(np.abs(cell_values)), np.max(np.abs(model_values)))
|
||||
lim = (int(xymax/binwidth) + 1) * binwidth
|
||||
|
||||
bins = np.arange(-lim, lim + binwidth, binwidth)
|
||||
ax_histx.hist(cell_values, color="blue", alpha=0.5)
|
||||
ax_histx.hist(model_values, color="orange", alpha=0.5)
|
||||
# ax_histy.hist(y, bins=bins, orientation='horizontal')
|
||||
|
||||
|
||||
def create_parameter_distributions(par_values):
|
||||
|
||||
fig, axes = plt.subplots(4, 2)
|
||||
|
@ -5,6 +5,7 @@ from FiCurve import FICurveCellData
|
||||
from DataParserFactory import DatParser
|
||||
import os
|
||||
import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
|
||||
def main():
|
||||
@ -16,15 +17,19 @@ def main():
|
||||
metadata_analysis("data/final/")
|
||||
pass
|
||||
|
||||
def metadata_analysis(data_folder):
|
||||
|
||||
def metadata_analysis(data_folder, filter_double_fish=False):
|
||||
|
||||
species = {}
|
||||
sampling_interval = {}
|
||||
eod_freqs = []
|
||||
sizes = []
|
||||
dates = {}
|
||||
fi_curve_stimulus = []
|
||||
fi_curve_contrasts = []
|
||||
fi_curve_c_trials = []
|
||||
for cell in os.listdir(data_folder):
|
||||
if cell[:10] in dates.keys():
|
||||
if filter_double_fish and cell[:10] in dates.keys():
|
||||
continue
|
||||
dates[cell[:10]] = 1
|
||||
cell_path = data_folder + cell
|
||||
@ -34,16 +39,41 @@ def metadata_analysis(data_folder):
|
||||
species = count_with_dict(species, parser.get_species())
|
||||
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())
|
||||
# eod_freqs.append(cell_data.get_eod_frequency())
|
||||
|
||||
fi_curve_stimulus.append(cell_data.get_recording_times())
|
||||
contrasts_with_trials = cell_data.get_fi_curve_contrasts_with_trial_number()
|
||||
fi_curve_contrasts.append([c[0] for c in contrasts_with_trials if c[1] >= 3])
|
||||
fi_curve_c_trials.append([c[1] for c in contrasts_with_trials if c[1] >= 3])
|
||||
|
||||
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("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("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)))
|
||||
|
||||
print("\n\nFi-Curve Stimulus:")
|
||||
print("Delay:", np.unique([r[0] for r in fi_curve_stimulus]))
|
||||
print("starts:", np.unique([r[1] for r in fi_curve_stimulus]))
|
||||
# print("ends:", np.unique([r[0] for r in fi_curve_stimulus]))
|
||||
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)))
|
||||
# bins = np.arange(-1, 1.01, 0.05)
|
||||
# all_contrasts = []
|
||||
# for c in fi_curve_contrasts:
|
||||
# all_contrasts.extend(c)
|
||||
# plt.hist([c[0] for c in fi_curve_contrasts], bins=bins, label="mins", color="blue", alpha=0.5)
|
||||
# plt.hist([c[-1] for c in fi_curve_contrasts], bins=bins, label="maxs", color="red", alpha=0.5)
|
||||
# plt.hist(all_contrasts, bins=bins, label="all", color="black", alpha=0.5)
|
||||
# plt.show()
|
||||
|
||||
print("done")
|
||||
|
||||
|
||||
def count_with_dict(dictionary, key):
|
||||
if key not in dictionary:
|
||||
dictionary[key] = 0
|
||||
|
@ -1,31 +1,125 @@
|
||||
|
||||
import numpy as np
|
||||
from CellData import CellData
|
||||
from DataParserFactory import DatParser
|
||||
import matplotlib.pyplot as plt
|
||||
import pyrelacs.DataLoader as Dl
|
||||
|
||||
test_cell = "data/final/2010-11-08-al-invivo-1/"
|
||||
|
||||
|
||||
def main():
|
||||
parser = DatParser(test_cell)
|
||||
fi_trans_amplitudes, fi_intensities, fi_spiketimes = parser.get_fi_curve_spiketimes()
|
||||
for time, v1, eod, local_eod, stim in parser.__iget_traces__("FICurve"):
|
||||
del eod
|
||||
del local_eod
|
||||
del stim
|
||||
fi_spiketimes = get_unsorted_spiketimes(test_cell + "/fispikes1.dat")
|
||||
count = 0
|
||||
for info, key, time, x in Dl.iload_traces(test_cell, repro="FICurve", before=0.2, after=0.8):
|
||||
# time, v1, eod, local_eod, stimulus
|
||||
print(key)
|
||||
print(info)
|
||||
v1 = x[0]
|
||||
# eod = x[1]
|
||||
# local_eod = x[2]
|
||||
# stimulus = x[3]
|
||||
|
||||
count = 0
|
||||
for i in range(len(fi_spiketimes)):
|
||||
for j, spikes in enumerate(fi_spiketimes[i]):
|
||||
offset = max(v1)+j
|
||||
|
||||
plt.eventplot(np.array(spikes)+2*j, colors="black", lineoffsets=offset) # , linelengths=0.5, lineoffsets=1+i*1+max(v1))
|
||||
if count >= 9:
|
||||
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()
|
||||
|
||||
|
||||
pass
|
||||
|
||||
|
||||
def get_unsorted_spiketimes(fi_file):
|
||||
spiketimes = []
|
||||
for metadata, key, data in Dl.iload(fi_file):
|
||||
spike_time_data = data[:, 0] / 1000
|
||||
spiketimes.append(spike_time_data)
|
||||
return spiketimes
|
||||
|
||||
def get_fi_curve_spiketimes(fi_file):
|
||||
spiketimes = []
|
||||
pre_intensities = []
|
||||
pre_durations = []
|
||||
intensities = []
|
||||
trans_amplitudes = []
|
||||
pre_duration = -1
|
||||
index = -1
|
||||
skip = False
|
||||
trans_amplitude = float('nan')
|
||||
for metadata, key, data in Dl.iload(fi_file):
|
||||
if len(metadata) != 0:
|
||||
|
||||
metadata_index = 0
|
||||
|
||||
if '----- Control --------------------------------------------------------' in metadata[0].keys():
|
||||
metadata_index = 1
|
||||
pre_duration = float(metadata[0]["----- Pre-Intensities ------------------------------------------------"]["preduration"][:-2])
|
||||
trans_amplitude = float(metadata[0]["trans. amplitude"][:-2])
|
||||
if pre_duration == 0:
|
||||
skip = False
|
||||
else:
|
||||
skip = True
|
||||
continue
|
||||
else:
|
||||
if "preduration" in metadata[0].keys():
|
||||
pre_duration = float(metadata[0]["preduration"][:-2])
|
||||
trans_amplitude = float(metadata[0]["trans. amplitude"][:-2])
|
||||
if pre_duration == 0:
|
||||
skip = False
|
||||
else:
|
||||
skip = True
|
||||
continue
|
||||
|
||||
if skip:
|
||||
continue
|
||||
if 'intensity' in metadata[metadata_index].keys():
|
||||
intensity = float(metadata[metadata_index]['intensity'][:-2])
|
||||
pre_intensity = float(metadata[metadata_index]['preintensity'][:-2])
|
||||
else:
|
||||
intensity = float(metadata[1-metadata_index]['intensity'][:-2])
|
||||
pre_intensity = float(metadata[1-metadata_index]['preintensity'][:-2])
|
||||
|
||||
intensities.append(intensity)
|
||||
pre_durations.append(pre_duration)
|
||||
pre_intensities.append(pre_intensity)
|
||||
trans_amplitudes.append(trans_amplitude)
|
||||
spiketimes.append([])
|
||||
index += 1
|
||||
|
||||
if skip:
|
||||
continue
|
||||
|
||||
if data.shape[1] != 1:
|
||||
raise RuntimeError("DatParser:get_fi_curve_spiketimes():\n read data has more than one dimension!")
|
||||
|
||||
spike_time_data = data[:, 0]/1000
|
||||
if len(spike_time_data) < 10:
|
||||
print("# ignoring spike-train that contains less than 10 spikes.")
|
||||
continue
|
||||
if spike_time_data[-1] < 1:
|
||||
print("# ignoring spike-train that ends before one second.")
|
||||
continue
|
||||
|
||||
spiketimes[index].append(spike_time_data)
|
||||
|
||||
# TODO Check if sorting works!
|
||||
# new_order = np.arange(0, len(intensities), 1)
|
||||
# intensities, new_order = zip(*sorted(zip(intensities, new_order)))
|
||||
# intensities = list(intensities)
|
||||
# spiketimes = [spiketimes[i] for i in new_order]
|
||||
# trans_amplitudes = [trans_amplitudes[i] for i in new_order]
|
||||
#
|
||||
# for i in range(len(intensities)-1, -1, -1):
|
||||
# if len(spiketimes[i]) < 3:
|
||||
# del intensities[i]
|
||||
# del spiketimes[i]
|
||||
# del trans_amplitudes[i]
|
||||
|
||||
return trans_amplitudes, intensities, spiketimes
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
6
test.py
6
test.py
@ -21,8 +21,12 @@ folder = "./results/invivo-1/"
|
||||
|
||||
for cell in os.listdir(folder):
|
||||
fit = get_best_fit(os.path.join(folder, cell), use_comparable_error=False)
|
||||
fit.generate_master_plot()
|
||||
model = fit.get_model()
|
||||
|
||||
baseline = BaselineModel(model, eod_frequency=fit.get_cell_data().get_eod_frequency(), trials=3)
|
||||
baseline.plot_serial_correlation(3)
|
||||
continue
|
||||
|
||||
cell_data = fit.get_cell_data()
|
||||
model = fit.get_model()
|
||||
fi = FICurveModel(model, np.arange(-0.5, 0.6, 0.1), cell_data.get_eod_frequency())
|
||||
|
@ -28,25 +28,26 @@
|
||||
\@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{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces use real EOD data? A) B) }}{4}{figure.1}}
|
||||
\newlabel{fig:stim_examples}{{1}{4}{use real EOD data? A) B)}{figure.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{toc}{\contentsline {subsection}{\numberline {4.3}Cell Characteristics}{4}{subsection.4.3}}
|
||||
\@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}{{5}{5}{Leaky Integrate and Fire Model}{equation.4.5}{}}
|
||||
\newlabel{currents_lifac}{{6}{5}{Leaky Integrate and Fire Model}{equation.4.6}{}}
|
||||
\newlabel{Adaption_dynamics}{{7}{5}{Leaky Integrate and Fire Model}{equation.4.7}{}}
|
||||
\newlabel{full_voltage_dynamics}{{8}{6}{Leaky Integrate and Fire Model}{equation.4.8}{}}
|
||||
\newlabel{fig:model_comparison}{{4.4}{6}{Leaky Integrate and Fire Model}{equation.4.8}{}}
|
||||
\@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)} }}{6}{figure.2}}
|
||||
\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}}
|
||||
\bibdata{citations}
|
||||
\bibcite{todd1999identification}{{1}{1999}{{Todd and Andrews}}{{}}}
|
||||
\bibcite{walz2013Phd}{{2}{2013}{{Walz}}{{}}}
|
||||
\bibcite{walz2014static}{{3}{2014}{{Walz et~al.}}{{}}}
|
||||
\bibstyle{apalike}
|
||||
\newlabel{fig:stim_development}{{4.4}{7}{Leaky Integrate and Fire Model}{figure.2}{}}
|
||||
\@writefile{lof}{\contentsline {figure}{\numberline {3}{\ignorespaces }}{7}{figure.3}}
|
||||
\@writefile{toc}{\contentsline {subsection}{\numberline {4.5}Fitting of the Model}{7}{subsection.4.5}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {5}Results}{7}{section.5}}
|
||||
\@writefile{toc}{\contentsline {section}{\numberline {6}Discussion}{7}{section.6}}
|
||||
\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}}
|
||||
|
@ -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) 22 AUG 2020 15:47
|
||||
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
|
||||
entering extended mode
|
||||
restricted \write18 enabled.
|
||||
%&-line parsing enabled.
|
||||
@ -506,77 +506,95 @@ 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=96, 433.62pt x 433.62pt>
|
||||
<figures/amGeneration.pdf, id=97, 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 170.
|
||||
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 169--171
|
||||
Overfull \hbox (0.77333pt too wide) in paragraph at lines 180--182
|
||||
[][] []
|
||||
[]
|
||||
|
||||
<figures/stimuliExamples.pdf, id=97, 433.62pt x 433.62pt>
|
||||
<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 173.
|
||||
Package pdftex.def Info: figures/stimuliExamples.pdf used on input line 185.
|
||||
(pdftex.def) Requested size: 223.07211pt x 223.07529pt.
|
||||
[4 <./figures/amGeneration.pdf> <./figures/stimuliExamples.pdf
|
||||
|
||||
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
|
||||
>] [5] <figures/model_comparison.pdf, id=194, 578.16pt x 578.16pt>
|
||||
>]
|
||||
|
||||
LaTeX Warning: Reference `eq:vector_strength' on page 5 undefined on input line
|
||||
198.
|
||||
|
||||
[5] <figures/model_comparison.pdf, id=197, 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 255.
|
||||
Package pdftex.def Info: figures/model_comparison.pdf used on input line 285.
|
||||
(pdftex.def) Requested size: 346.89867pt x 346.89867pt.
|
||||
|
||||
<figures/stimulus_development.pdf, id=195, 433.62pt x 433.62pt>
|
||||
[6]
|
||||
<figures/stimulus_development.pdf, id=204, 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 26
|
||||
Package pdftex.def Info: figures/stimulus_development.pdf used on input line 29
|
||||
4.
|
||||
(pdftex.def) Requested size: 260.17401pt x 260.17401pt.
|
||||
[6 <./figures/model_comparison.pdf>]
|
||||
[7 <./figures/model_comparison.pdf>]
|
||||
(./Masterthesis.bbl)
|
||||
Package atveryend Info: Empty hook `BeforeClearDocument' on input line 287.
|
||||
[7 <./figures/stimulus_development.pdf>]
|
||||
Package atveryend Info: Empty hook `AfterLastShipout' on input line 287.
|
||||
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.
|
||||
|
||||
(./Masterthesis.aux)
|
||||
Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 287.
|
||||
Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 287.
|
||||
Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 317.
|
||||
Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 317.
|
||||
Package rerunfilecheck Info: File `Masterthesis.out' has not changed.
|
||||
(rerunfilecheck) Checksum: 7A3ACD7CD7DC89195072057BF8EFCD4A;622.
|
||||
Package atveryend Info: Empty hook `AtVeryVeryEnd' on input line 287.
|
||||
|
||||
|
||||
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.
|
||||
)
|
||||
Here is how much of TeX's memory you used:
|
||||
11011 strings out of 493029
|
||||
156819 string characters out of 6136233
|
||||
259306 words of memory out of 5000000
|
||||
14390 multiletter control sequences out of 15000+600000
|
||||
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
|
||||
1141 hyphenation exceptions out of 8191
|
||||
37i,11n,38p,1008b,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
|
||||
ive/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi8.pfb></usr/share/texlive/tex
|
||||
mf-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/public/amsfonts/cm/cmr8.pfb></usr/share/texlive/texmf-dist/fonts/type1/pu
|
||||
blic/amsfonts/cm/cmss12.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/a
|
||||
msfonts/cm/cmsy10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfont
|
||||
s/cm/cmsy8.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cm
|
||||
ti12.pfb>
|
||||
Output written on Masterthesis.pdf (8 pages, 263393 bytes).
|
||||
ive/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi6.pfb></usr/share/texlive/tex
|
||||
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).
|
||||
PDF statistics:
|
||||
327 PDF objects out of 1000 (max. 8388607)
|
||||
178 compressed objects within 2 object streams
|
||||
36 named destinations out of 1000 (max. 500000)
|
||||
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)
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
@ -133,11 +133,11 @@ The 75 used cells came from 32 \AptLepto (brown ghost knifefish). \todo{sizes ra
|
||||
|
||||
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, 25–50 $\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 ?})
|
||||
For the recordings a standard glass mircoelectrode (borosilicate; 1.5 mm outer diameter; GB150F-8P, Science Products, Hofheim, Germany) was used, pulled to a resistance of 50-100\,M$\Omega$ using Model P-97 from Sutter Instrument Co. (No-
|
||||
vato, CA, USA). They were 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.
|
||||
For the recordings a standard glass mircoelectrode (borosilicate; 1.5 mm outer diameter; GB150F-8P, Science Products, Hofheim, Germany) was used. They were pulled to a resistance of 50-100\,M$\Omega$ using Model P-97 from Sutter Instrument Co. (No-
|
||||
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 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 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 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 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.
|
||||
|
||||
@ -149,66 +149,96 @@ The recording and stimulation was done using the ephys, efield, and efish plugin
|
||||
% image of SAM stimulus
|
||||
|
||||
The stimuli used during the recordings were presented from two vertical carbon rods (30 cm long, 8 mm diameter) as stimulus electrodes. They were positioned at either side of the fish parallel to its longitudinal axis. The stimuli were computer generated, attenuated and isolated (Attenuator: ATN-01M, Isolator: ISO-02V, npi-electronics, Tamm, Germany) and then send to the stimulus electrodes.
|
||||
For this work three types of recordings were made baseline, frequency-Intensity curve (FI-Curve) and sinusoidal amplitude modulation (SAM).
|
||||
The 'stimulus' for the baseline recording is purely the field the fish produces itself. So the situation with no outside influence.
|
||||
For this work two types of recordings were made with all cells: baseline recordings and amplitude step recordings for the frequency-Intensity curve (FI-Curve).
|
||||
The 'stimulus' for the baseline recording is purely the EOD field the fish produces itself with no external stimulus.
|
||||
|
||||
For the other two stimuli a certain kind of amplitude modulation (AM) of the fish's EOD was the goal. The recordings for the FI-Curve used a step change in the EOD amplitude. This step change was produced by recording the EOD of the fish multiplying this trace with the wanted step change (the amplitude modulation) and then playing the modified EOD back through the stimulus electrodes in the right phase. This causes constructive interference between the fish's EOD and the AM signal and results in the stimulus carrying the wanted AM (see Figure \ref{fig:stim_examples} B).
|
||||
|
||||
This construction as seen in equation \ref{eq:am_generation} works for any AM. In the
|
||||
|
||||
\todo{contrast ranges, presentation windows/durations, changing stimulus parameters}
|
||||
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.
|
||||
|
||||
\begin{equation}
|
||||
Stimulus = EOD(t) * AM(t) + EOD(t) \todo{acceptable?}
|
||||
Stimulus = EOD(t) + AM(t) * EOD(t) \todo{acceptable?}
|
||||
\label{eq:am_generation}
|
||||
\end{equation}
|
||||
|
||||
\begin{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 -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.
|
||||
|
||||
% Always a 0.2 second delay and 0.8 seconds after stimulus
|
||||
% Stimulus start at time=0
|
||||
% step duration 0.4s (7times) and 1s (68 times)
|
||||
% 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{50mm}{\large\sffamily A}
|
||||
\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) \label{fig:stim_examples}}
|
||||
\caption{use real EOD data? A) B) \todo{!} \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.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Baseline
|
||||
|
||||
p-Value:
|
||||
%p-Value:
|
||||
|
||||
%\begin{equation}
|
||||
%p = \frac{neuron frequency}{EOD frequency}
|
||||
%\end{equation}
|
||||
|
||||
vector strength:
|
||||
|
||||
\begin{equation}
|
||||
p = \frac{neuron frequency}{EOD frequency}
|
||||
p(\omega) = \frac{1}{n} \sum_n e^{iwt_j}
|
||||
\label{eq:vector_strength}
|
||||
\end{equation}
|
||||
|
||||
coefficient of variation:
|
||||
serial correlation:
|
||||
|
||||
\begin{equation}
|
||||
CV = \frac{STD(ISI)}{\langle ISI \rangle}
|
||||
SC_k = \frac{\langle (T_{j} - \langle T \rangle)(T_{j+k} - \langle T \rangle) \rangle}{\langle (T_j - \langle T \rangle)^2 \rangle}
|
||||
\end{equation}
|
||||
|
||||
serial correlation: \todo{check!}
|
||||
coefficient of variation:
|
||||
|
||||
\begin{equation}
|
||||
sc_i = \frac{\langle ISI_{k+j} ISI_k \rangle - \langle ISI_k \rangle^2}{VAR(ISI)}
|
||||
CV = \frac{STD(T)}{\langle T \rangle}
|
||||
\end{equation}
|
||||
|
||||
burstiness: \todo{what definition? still use it? }
|
||||
|
||||
burstiness: \todo{how to write as equation}
|
||||
|
||||
vector strength:
|
||||
\begin{equation}
|
||||
b = (T < 1/2EODf)/ N * \langle T \rangle
|
||||
\end{equation}
|
||||
|
||||
|
||||
FI-Curve:
|
||||
|
||||
\todo{Figure of detection}
|
||||
explain detection of f-points
|
||||
|
||||
|
||||
|
@ -5,8 +5,8 @@
|
||||
\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}{4}{subsection.4.3}
|
||||
\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}{7}{subsection.4.5}
|
||||
\contentsline {section}{\numberline {5}Results}{7}{section.5}
|
||||
\contentsline {section}{\numberline {6}Discussion}{7}{section.6}
|
||||
\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}
|
||||
|
Binary file not shown.
BIN
thesis/sources/Padmanabhan2013_intrinsicDiversity.pdf
Normal file
BIN
thesis/sources/Padmanabhan2013_intrinsicDiversity.pdf
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user