From 1941aec6f7ae8ea8c388c1dc4dab026109536fce Mon Sep 17 00:00:00 2001 From: weygoldt <88969563+weygoldt@users.noreply.github.com> Date: Thu, 26 Jan 2023 13:30:01 +0100 Subject: [PATCH] new introplot --- code/plot_introduction_specs.py | 4 ++-- code/plot_kdes.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/code/plot_introduction_specs.py b/code/plot_introduction_specs.py index d91420d..51cee38 100644 --- a/code/plot_introduction_specs.py +++ b/code/plot_introduction_specs.py @@ -41,9 +41,9 @@ def main(): freqtime2, freq2 = instantaneous_frequency( filtered2, data.raw_rate, smoothing_window=3) - ax.plot(freqtime1*timescaler, freq1, color=ps.gblue1, + ax.plot(freqtime1*timescaler, freq1, color=ps.red, lw=2, label="fish 1") - ax.plot(freqtime2*timescaler, freq2, color=ps.gblue2, + ax.plot(freqtime2*timescaler, freq2, color=ps.orange, lw=2, label="fish 2") ax.legend(bbox_to_anchor=(0, 1.02, 1, 0.2), loc="lower center", mode="normal", borderaxespad=0, ncol=2) diff --git a/code/plot_kdes.py b/code/plot_kdes.py index d33279a..bf4accd 100644 --- a/code/plot_kdes.py +++ b/code/plot_kdes.py @@ -58,9 +58,10 @@ def jackknife(data, nresamples, subsetsize, kde_time, kernel_width, event_times, for i in tqdm(range(nresamples)): - jackknifed_data = np.random.choice(data, subsetsize, replace=False) + jackknifed_data = np.random.choice( + diff_data, subsetsize, replace=False) - jackknifed_data = np.cumsum(diff_data) + jackknifed_data = np.cumsum(jackknifed_data) jackknifed_data_centered = center_chirps( jackknifed_data, event_times, time_before, time_after) @@ -72,7 +73,6 @@ def jackknife(data, nresamples, subsetsize, kde_time, kernel_width, event_times, jackknifed_kde) / len(event_times)) jackknife_kdes.append(jackknifed_kde) - return jackknife_kdes