everything for 1ms kernels

This commit is contained in:
2026-01-29 22:54:33 +01:00
parent f777fa9225
commit 7b6cadb8ed
13 changed files with 78 additions and 55 deletions

View File

@@ -16,22 +16,22 @@ amax = 60
cthresh1 = 1.2
cthresh2 = 3.5
model_cell = '2018-05-08-ab-invivo-1' # 116, CV=0.68
alphas = [0.002, 0.008, 0.025, 0.05]
rmax = 400
amax = 50
cthresh1 = 1.2
cthresh2 = 3.0
#model_cell = '2018-05-08-ab-invivo-1' # 116, CV=0.68
#alphas = [0.002, 0.008, 0.025, 0.05]
#rmax = 400
#amax = 50
#cthresh1 = 1.2
#cthresh2 = 3.0
data_path = Path('data')
sims_path = data_path / 'simulations'
trials = 1000
spec_trials = 100 # set to zero to only recompute firng rates
spec_trials = 1000 # set to zero to only recompute firng rates
sigma = 0.001
nfft = 2**18
recompute = False
recompute = True
def load_data(file_path):
@@ -268,18 +268,18 @@ def plot_psd(ax, s, path, contrast, spikes, nfft, dt, beatf1, beatf2, eodf):
ax.plot(beatf2 + 2*beatf1, decibel(peak_ampl(freqs, psd, beatf2 + 2*beatf1)) + offsm,
label=r'$\Delta f_2 \pm k\Delta f_1$', zorder=40, **s.psF012m)
ax.plot(beatf2 + 3*beatf1, decibel(peak_ampl(freqs, psd, beatf2 + 3*beatf1)) + offsm, zorder=40, **s.psF012m)
#ax.plot(beatf2 - 2*beatf1, decibel(peak_ampl(freqs, psd, beatf2 - 2*beatf1)) + offsm, zorder=40, **s.psF012m)
#ax.plot(beatf2 - 3*beatf1, decibel(peak_ampl(freqs, psd, beatf2 - 3*beatf1)) + offsm, zorder=40, **s.psF012m)
ax.plot(beatf2 - 2*beatf1, decibel(peak_ampl(freqs, psd, beatf2 - 2*beatf1)) + offsm, zorder=40, **s.psF012m)
ax.plot(beatf2 - 3*beatf1, decibel(peak_ampl(freqs, psd, beatf2 - 3*beatf1)) + offsm, zorder=40, **s.psF012m)
ax.plot(3*beatf1, decibel(peak_ampl(freqs, psd, 3*beatf1)) + offsm, zorder=40, **s.psF01m)
ax.plot(4*beatf1, decibel(peak_ampl(freqs, psd, 4*beatf1)) + offsm, zorder=40, **s.psF01m)
ax.plot(eodf - 2*beatf1, decibel(peak_ampl(freqs, psd, eodf - 2*beatf1)) + offsm, zorder=40, **s.psFEODm)
ax.plot(eodf - 3*beatf1, decibel(peak_ampl(freqs, psd, eodf - 3*beatf1)) + offsm, zorder=40, **s.psFEODm)
#ax.plot(eodf - 4*beatf1, decibel(peak_ampl(freqs, psd, eodf - 4*beatf1)) + offsm, zorder=40, **s.psFEODm)
ax.plot(eodf - 4*beatf1, decibel(peak_ampl(freqs, psd, eodf - 4*beatf1)) + offsm, zorder=40, **s.psFEODm)
ax.plot(eodf - 2*beatf2, decibel(peak_ampl(freqs, psd, eodf - 2*beatf2)) + offsm, zorder=40, **s.psF0m)
#ax.plot(eodf - beatf2 + 2*beatf1, decibel(peak_ampl(freqs, psd, eodf - beatf2 + 2*beatf1)) + offsm,
# zorder=40, **s.psF02m)
#ax.plot(eodf - beatf2 + 3*beatf1, decibel(peak_ampl(freqs, psd, eodf - beatf2 + 2*beatf1)) + offsm,
# zorder=40, **s.psF02m)
ax.plot(eodf - beatf2 + 2*beatf1, decibel(peak_ampl(freqs, psd, eodf - beatf2 + 2*beatf1)) + offsm,
zorder=40, **s.psF02m)
ax.plot(eodf - beatf2 + 3*beatf1, decibel(peak_ampl(freqs, psd, eodf - beatf2 + 2*beatf1)) + offsm,
zorder=40, **s.psF02m)
ax.set_xlim(0, 750)
ax.set_ylim(-60, 0)
ax.set_xticks_delta(200)
@@ -399,8 +399,8 @@ if __name__ == '__main__':
fig, (axes, axa) = plt.subplots(2, 1, height_ratios=[5, 3],
cmsize=(s.plot_width, 0.7*s.plot_width))
fig.subplots_adjust(leftm=8, rightm=2, topm=2, bottomm=3.5, hspace=0.6)
axe = axes.subplots(4, 4, wspace=0.4, hspace=0.2,
height_ratios=[1, 2, 2, 0.6, 3])
axe = axes.subplots(4, 4, wspace=0.4, hspace=0.3,
height_ratios=[1, 2, 2, 0.2, 3])
fig.show_spines('lb')
# example power spectra: