added data for example cells

This commit is contained in:
Jan Benda 2025-05-16 09:04:04 +02:00
parent 923982d43f
commit 5c2ee9f7b2
141 changed files with 425 additions and 40 deletions

6
.gitignore vendored
View File

@ -1,6 +1,12 @@
# backup files # backup files
*~ *~
# pdf files
*.pdf
# python
__pycache__/
# ---> TeX # ---> TeX
## Core latex/pdflatex auxiliary files: ## Core latex/pdflatex auxiliary files:
*.aux *.aux

View File

@ -1,5 +1,3 @@
import sys
sys.path.insert(0, 'ephys') # for analysing data
import numpy as np import numpy as np
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
from pathlib import Path from pathlib import Path
@ -13,9 +11,14 @@ cell_name = '2012-05-15-ac'
run1 = 3 # 4 run1 = 3 # 4
run2 = 1 run2 = 1
base_path = Path('ephys') example_cells = [
data_path = base_path / 'data' ['2010-11-26-an', 0],
results_path = base_path / 'results' ['2011-10-25-ac', 0],
['2011-02-18-ab', 1],
['2014-01-16-aj', 5],
]
data_path = Path('data')
def plot_isih(ax, s, rate, cv, isis, pdf): def plot_isih(ax, s, rate, cv, isis, pdf):
@ -152,13 +155,13 @@ if __name__ == '__main__':
""" """
print('Example Ampullary cell:', cell_name) print('Example Ampullary cell:', cell_name)
eodf, rate, cv, isis, pdf, freqs, prr = load_baseline(results_path, cell_name) eodf, rate, cv, isis, pdf, freqs, prr = load_baseline(data_path, cell_name)
print(f' baseline firing rate: {rate:.0f}Hz') print(f' baseline firing rate: {rate:.0f}Hz')
print(f' baseline firing CV : {cv:.2f}') print(f' baseline firing CV : {cv:.2f}')
contrast1, time1, stimulus1, spikes1 = load_noise(data_path, cell_name, run1) contrast1, time1, stimulus1, spikes1 = load_noise(data_path, cell_name, run1)
contrast2, time2, stimulus2, spikes2 = load_noise(data_path, cell_name, run2) contrast2, time2, stimulus2, spikes2 = load_noise(data_path, cell_name, run2)
fcutoff1, contrast1, freqs1, gain1, chi21 = load_spectra(results_path, cell_name, run1) fcutoff1, contrast1, freqs1, gain1, chi21 = load_spectra(data_path, cell_name, run1)
fcutoff2, contrast2, freqs2, gain2, chi22 = load_spectra(results_path, cell_name, run2) fcutoff2, contrast2, freqs2, gain2, chi22 = load_spectra(data_path, cell_name, run2)
s = plot_style() s = plot_style()
s.cell_color1 = s.ampul_color1 s.cell_color1 = s.ampul_color1
@ -201,15 +204,9 @@ if __name__ == '__main__':
fig.tag([axg, axc1, axc2, axd], xoffs=-3, yoffs=2) fig.tag([axg, axc1, axc2, axd], xoffs=-3, yoffs=2)
print('Additional example cells:') print('Additional example cells:')
example_cells = [
['2010-11-26-an', 0],
['2011-10-25-ac', 0],
['2011-02-18-ab', 1],
['2014-01-16-aj', 5],
]
for k, (cell, run) in enumerate(example_cells): for k, (cell, run) in enumerate(example_cells):
eodf, rate, cv, _, _, _, _ = load_baseline(results_path, cell) eodf, rate, cv, _, _, _, _ = load_baseline(data_path, cell)
fcutoff, contrast, freqs, gain, chi2 = load_spectra(results_path, cell, run) fcutoff, contrast, freqs, gain, chi2 = load_spectra(data_path, cell, run)
dfreqs, diag = diag_projection(freqs, chi2, 2*fcutoff) dfreqs, diag = diag_projection(freqs, chi2, 2*fcutoff)
nli, nlif = peakedness(dfreqs, diag, rate, median=False) nli, nlif = peakedness(dfreqs, diag, rate, median=False)
print(f' {cell:<22s}: run={run:2d}, fbase={rate:3.0f}Hz, CV={cv:.2f}, SI={nli:3.1f}') print(f' {cell:<22s}: run={run:2d}, fbase={rate:3.0f}Hz, CV={cv:.2f}, SI={nli:3.1f}')

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More