diff --git a/code/chirpdetection.py b/code/chirpdetection.py index 541015d..b694a63 100755 --- a/code/chirpdetection.py +++ b/code/chirpdetection.py @@ -262,14 +262,14 @@ class ChirpPlotBuffer: # facecolors="none", ) - ax0.set_ylabel("frequency [Hz]") + ax0.set_ylabel("Frequency [Hz]") ax1.set_ylabel(r"$\mu$V") ax2.set_ylabel(r"$\mu$V") ax3.set_ylabel("Hz") ax4.set_ylabel(r"$\mu$V") ax5.set_ylabel(r"$\mu$V") ax6.set_ylabel("Hz") - ax6.set_xlabel("time [s]") + ax6.set_xlabel("Time [s]") plt.setp(ax0.get_xticklabels(), visible=False) plt.setp(ax1.get_xticklabels(), visible=False) @@ -652,16 +652,16 @@ def chirpdetection(datapath: str, plot: str, debug: str = 'false') -> None: raw_time = np.arange(data.raw.shape[0]) / data.raw_rate # good chirp times for data: 2022-06-02-10_00 - # window_start_index = (3 * 60 * 60 + 6 * 60 + 43.5) * data.raw_rate - # window_duration_index = 60 * data.raw_rate + window_start_index = (3 * 60 * 60 + 6 * 60 + 43.5) * data.raw_rate + window_duration_index = 60 * data.raw_rate # t0 = 0 # dt = data.raw.shape[0] # window_start_seconds = (23495 + ((28336-23495)/3)) * data.raw_rate # window_duration_seconds = (28336 - 23495) * data.raw_rate - window_start_index = 0 - window_duration_index = data.raw.shape[0] + # window_start_index = 0 + # window_duration_index = data.raw.shape[0] # generate starting points of rolling window window_start_indices = np.arange( @@ -675,7 +675,7 @@ def chirpdetection(datapath: str, plot: str, debug: str = 'false') -> None: multiwindow_chirps = [] multiwindow_ids = [] - for st, window_start_index in enumerate(window_start_indices[3175:]): + for st, window_start_index in enumerate(window_start_indices): logger.info(f"Processing window {st+1} of {len(window_start_indices)}") diff --git a/code/modules/plotstyle.py b/code/modules/plotstyle.py index 3940a3a..32af4d2 100644 --- a/code/modules/plotstyle.py +++ b/code/modules/plotstyle.py @@ -33,6 +33,7 @@ def PlotStyle() -> None: gblue1 = "#89b4fa" gblue2 = "#89dceb" gblue3 = "#a6e3a1" + g = "#76a0fa" @classmethod def lims(cls, track1, track2): @@ -112,7 +113,6 @@ def PlotStyle() -> None: plt.setp(bp["caps"], color=white) plt.setp(bp["medians"], color=black) - @classmethod def label_subplots(cls, labels, axes, fig): for axis, label in zip(axes, labels): diff --git a/code/plot_introduction_specs.py b/code/plot_introduction_specs.py index 51cee38..3c79113 100644 --- a/code/plot_introduction_specs.py +++ b/code/plot_introduction_specs.py @@ -41,10 +41,10 @@ def main(): freqtime2, freq2 = instantaneous_frequency( filtered2, data.raw_rate, smoothing_window=3) - ax.plot(freqtime1*timescaler, freq1, color=ps.red, - lw=2, label="fish 1") - ax.plot(freqtime2*timescaler, freq2, color=ps.orange, - lw=2, label="fish 2") + ax.plot(freqtime1*timescaler, freq1, color=ps.g, + lw=2, label="Fish 1") + ax.plot(freqtime2*timescaler, freq2, color=ps.gray, + 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) # ax.legend(bbox_to_anchor=(1.04, 1), borderaxespad=0) @@ -74,8 +74,8 @@ def main(): origin="lower", interpolation="gaussian", alpha=1, - vmin=-100, - vmax=-80, + # vmin=-100, + # vmax=-80, ) # ps.hide_xax(ax2) @@ -103,8 +103,8 @@ def main(): # ) # # ps.hide_xax(ax3) - ax.set_xlabel("time [ms]") - ax.set_ylabel("frequency [Hz]") + ax.set_xlabel("Time [ms]") + ax.set_ylabel("Frequency [Hz]") # ax.set_yticks(np.arange(400, 1201, 400)) # ax.spines.left.set_bounds((400, 1200)) diff --git a/code/plot_kdes.py b/code/plot_kdes.py index bf4accd..e965adb 100644 --- a/code/plot_kdes.py +++ b/code/plot_kdes.py @@ -287,14 +287,14 @@ def main(dataroot): ax[i].plot(kde_time, np.median(loser_offsets_boot[-1], axis=0), color=ps.black, linewidth=2) - ax[i].fill_between( - kde_time, - np.percentile(loser_offsets_jackknife, 5, axis=0), - np.percentile(loser_offsets_jackknife, 95, axis=0), - color=ps.blue, - alpha=0.5) - ax[i].plot(kde_time, np.median(loser_offsets_jackknife, axis=0), - color=ps.white, linewidth=2) + # ax[i].fill_between( + # kde_time, + # np.percentile(loser_offsets_jackknife, 5, axis=0), + # np.percentile(loser_offsets_jackknife, 95, axis=0), + # color=ps.blue, + # alpha=0.5) + # ax[i].plot(kde_time, np.median(loser_offsets_jackknife, axis=0), + # color=ps.white, linewidth=2) ax[i].set_xlim(-60, 60)