From b098e5083ad74b428aaf84bd8ca425b673b762fe Mon Sep 17 00:00:00 2001 From: weygoldt <88969563+weygoldt@users.noreply.github.com> Date: Wed, 26 Apr 2023 18:18:22 +0200 Subject: [PATCH] fix broken repo --- .gitignore | 1 + .vscode/settings.json | 6 -- code/chirpdetection.py | 6 +- code/modules/plotstyle.py | 94 +++++++++---------- .../{plotstyle_dark.py => plotstyle_light.py} | 94 +++++++++---------- 5 files changed, 98 insertions(+), 103 deletions(-) delete mode 100644 .vscode/settings.json rename code/modules/{plotstyle_dark.py => plotstyle_light.py} (85%) diff --git a/.gitignore b/.gitignore index 54233f1..0b50968 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ data env output trash +.vscode # Mac Stuff *.DS_Store diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index d99f2f3..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "[python]": { - "editor.defaultFormatter": "ms-python.black-formatter" - }, - "python.formatting.provider": "none" -} \ No newline at end of file diff --git a/code/chirpdetection.py b/code/chirpdetection.py index f6ad13c..a89b568 100755 --- a/code/chirpdetection.py +++ b/code/chirpdetection.py @@ -726,8 +726,8 @@ 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] @@ -1185,4 +1185,4 @@ if __name__ == "__main__": # datapath = "/home/weygoldt/Data/uni/efishdata/2016-colombia/fishgrid/2016-04-09-22_25/" # datapath = "/home/weygoldt/Data/uni/chirpdetection/GP2023_chirp_detection/data/mount_data/2020-03-13-10_00/" datapath = "../data/2022-06-02-10_00/" - chirpdetection(datapath, plot="show", debug="false") + chirpdetection(datapath, plot="save", debug="false") diff --git a/code/modules/plotstyle.py b/code/modules/plotstyle.py index 43d12ac..d767e24 100644 --- a/code/modules/plotstyle.py +++ b/code/modules/plotstyle.py @@ -15,8 +15,8 @@ def PlotStyle() -> None: # colors black = "#111116" - white = "#111116" - gray = "#111116" + white = "#e0e4f7" + gray = "#6c6e7d" blue = "#89b4fa" sapphire = "#74c7ec" sky = "#89dceb" @@ -217,10 +217,10 @@ def PlotStyle() -> None: SMALL_SIZE = 12 MEDIUM_SIZE = 14 BIGGER_SIZE = 16 - black = "#e0e4f7" - white = "#111116" - # gray = "#6c6e7d" - # dark_gray = "#2a2a32" + black = "#111116" + white = "#e0e4f7" + gray = "#6c6e7d" + dark_gray = "#2a2a32" # rcparams plt.rc("font", size=MEDIUM_SIZE) # controls default text sizes @@ -231,7 +231,7 @@ def PlotStyle() -> None: plt.rc("legend", fontsize=SMALL_SIZE) # legend fontsize plt.rc("figure", titlesize=BIGGER_SIZE) # fontsize of the figure title - plt.rcParams["image.cmap"] = "cmo.haline" + plt.rcParams["image.cmap"] = "cmo.thermal" plt.rcParams["axes.xmargin"] = 0.05 plt.rcParams["axes.ymargin"] = 0.1 plt.rcParams["axes.titlelocation"] = "left" @@ -251,46 +251,46 @@ def PlotStyle() -> None: # plt.rcParams["font.sans-serif"] = "Helvetica Now Text" # dark mode modifications - # plt.rcParams["boxplot.flierprops.color"] = white - # plt.rcParams["boxplot.flierprops.markeredgecolor"] = gray - # plt.rcParams["boxplot.boxprops.color"] = gray - # plt.rcParams["boxplot.whiskerprops.color"] = gray - # plt.rcParams["boxplot.capprops.color"] = gray - # plt.rcParams["boxplot.medianprops.color"] = black - # plt.rcParams["text.color"] = white - # plt.rcParams["axes.facecolor"] = black # axes background color - # plt.rcParams["axes.edgecolor"] = white # axes edge color - # # plt.rcParams["axes.grid"] = True # display grid or not - # # plt.rcParams["axes.grid.axis"] = "y" # which axis the grid is applied to - # plt.rcParams["axes.labelcolor"] = white - # plt.rcParams["axes.axisbelow"] = True # draw axis gridlines and ticks: - # plt.rcParams["axes.spines.left"] = True # display axis spines - # plt.rcParams["axes.spines.bottom"] = True - # plt.rcParams["axes.spines.top"] = False - # plt.rcParams["axes.spines.right"] = False - # plt.rcParams["axes.prop_cycle"] = cycler( - # "color", - # [ - # "#b4befe", - # "#89b4fa", - # "#74c7ec", - # "#89dceb", - # "#94e2d5", - # "#a6e3a1", - # "#f9e2af", - # "#fab387", - # "#eba0ac", - # "#f38ba8", - # "#cba6f7", - # "#f5c2e7", - # ], - # ) - # plt.rcParams["xtick.color"] = white # color of the ticks - # plt.rcParams["ytick.color"] = white # color of the ticks - # plt.rcParams["grid.color"] = white # grid color - # plt.rcParams["figure.facecolor"] = black # figure face color - # plt.rcParams["figure.edgecolor"] = black # figure edge color - # plt.rcParams["savefig.facecolor"] = black # figure face color when saving + plt.rcParams["boxplot.flierprops.color"] = white + plt.rcParams["boxplot.flierprops.markeredgecolor"] = gray + plt.rcParams["boxplot.boxprops.color"] = gray + plt.rcParams["boxplot.whiskerprops.color"] = gray + plt.rcParams["boxplot.capprops.color"] = gray + plt.rcParams["boxplot.medianprops.color"] = black + plt.rcParams["text.color"] = white + plt.rcParams["axes.facecolor"] = black # axes background color + plt.rcParams["axes.edgecolor"] = white # axes edge color + # plt.rcParams["axes.grid"] = True # display grid or not + # plt.rcParams["axes.grid.axis"] = "y" # which axis the grid is applied to + plt.rcParams["axes.labelcolor"] = white + plt.rcParams["axes.axisbelow"] = True # draw axis gridlines and ticks: + plt.rcParams["axes.spines.left"] = True # display axis spines + plt.rcParams["axes.spines.bottom"] = True + plt.rcParams["axes.spines.top"] = False + plt.rcParams["axes.spines.right"] = False + plt.rcParams["axes.prop_cycle"] = cycler( + "color", + [ + "#b4befe", + "#89b4fa", + "#74c7ec", + "#89dceb", + "#94e2d5", + "#a6e3a1", + "#f9e2af", + "#fab387", + "#eba0ac", + "#f38ba8", + "#cba6f7", + "#f5c2e7", + ], + ) + plt.rcParams["xtick.color"] = white # color of the ticks + plt.rcParams["ytick.color"] = white # color of the ticks + plt.rcParams["grid.color"] = white # grid color + plt.rcParams["figure.facecolor"] = black # figure face color + plt.rcParams["figure.edgecolor"] = black # figure edge color + plt.rcParams["savefig.facecolor"] = black # figure face color when saving return style diff --git a/code/modules/plotstyle_dark.py b/code/modules/plotstyle_light.py similarity index 85% rename from code/modules/plotstyle_dark.py rename to code/modules/plotstyle_light.py index d767e24..43d12ac 100644 --- a/code/modules/plotstyle_dark.py +++ b/code/modules/plotstyle_light.py @@ -15,8 +15,8 @@ def PlotStyle() -> None: # colors black = "#111116" - white = "#e0e4f7" - gray = "#6c6e7d" + white = "#111116" + gray = "#111116" blue = "#89b4fa" sapphire = "#74c7ec" sky = "#89dceb" @@ -217,10 +217,10 @@ def PlotStyle() -> None: SMALL_SIZE = 12 MEDIUM_SIZE = 14 BIGGER_SIZE = 16 - black = "#111116" - white = "#e0e4f7" - gray = "#6c6e7d" - dark_gray = "#2a2a32" + black = "#e0e4f7" + white = "#111116" + # gray = "#6c6e7d" + # dark_gray = "#2a2a32" # rcparams plt.rc("font", size=MEDIUM_SIZE) # controls default text sizes @@ -231,7 +231,7 @@ def PlotStyle() -> None: plt.rc("legend", fontsize=SMALL_SIZE) # legend fontsize plt.rc("figure", titlesize=BIGGER_SIZE) # fontsize of the figure title - plt.rcParams["image.cmap"] = "cmo.thermal" + plt.rcParams["image.cmap"] = "cmo.haline" plt.rcParams["axes.xmargin"] = 0.05 plt.rcParams["axes.ymargin"] = 0.1 plt.rcParams["axes.titlelocation"] = "left" @@ -251,46 +251,46 @@ def PlotStyle() -> None: # plt.rcParams["font.sans-serif"] = "Helvetica Now Text" # dark mode modifications - plt.rcParams["boxplot.flierprops.color"] = white - plt.rcParams["boxplot.flierprops.markeredgecolor"] = gray - plt.rcParams["boxplot.boxprops.color"] = gray - plt.rcParams["boxplot.whiskerprops.color"] = gray - plt.rcParams["boxplot.capprops.color"] = gray - plt.rcParams["boxplot.medianprops.color"] = black - plt.rcParams["text.color"] = white - plt.rcParams["axes.facecolor"] = black # axes background color - plt.rcParams["axes.edgecolor"] = white # axes edge color - # plt.rcParams["axes.grid"] = True # display grid or not - # plt.rcParams["axes.grid.axis"] = "y" # which axis the grid is applied to - plt.rcParams["axes.labelcolor"] = white - plt.rcParams["axes.axisbelow"] = True # draw axis gridlines and ticks: - plt.rcParams["axes.spines.left"] = True # display axis spines - plt.rcParams["axes.spines.bottom"] = True - plt.rcParams["axes.spines.top"] = False - plt.rcParams["axes.spines.right"] = False - plt.rcParams["axes.prop_cycle"] = cycler( - "color", - [ - "#b4befe", - "#89b4fa", - "#74c7ec", - "#89dceb", - "#94e2d5", - "#a6e3a1", - "#f9e2af", - "#fab387", - "#eba0ac", - "#f38ba8", - "#cba6f7", - "#f5c2e7", - ], - ) - plt.rcParams["xtick.color"] = white # color of the ticks - plt.rcParams["ytick.color"] = white # color of the ticks - plt.rcParams["grid.color"] = white # grid color - plt.rcParams["figure.facecolor"] = black # figure face color - plt.rcParams["figure.edgecolor"] = black # figure edge color - plt.rcParams["savefig.facecolor"] = black # figure face color when saving + # plt.rcParams["boxplot.flierprops.color"] = white + # plt.rcParams["boxplot.flierprops.markeredgecolor"] = gray + # plt.rcParams["boxplot.boxprops.color"] = gray + # plt.rcParams["boxplot.whiskerprops.color"] = gray + # plt.rcParams["boxplot.capprops.color"] = gray + # plt.rcParams["boxplot.medianprops.color"] = black + # plt.rcParams["text.color"] = white + # plt.rcParams["axes.facecolor"] = black # axes background color + # plt.rcParams["axes.edgecolor"] = white # axes edge color + # # plt.rcParams["axes.grid"] = True # display grid or not + # # plt.rcParams["axes.grid.axis"] = "y" # which axis the grid is applied to + # plt.rcParams["axes.labelcolor"] = white + # plt.rcParams["axes.axisbelow"] = True # draw axis gridlines and ticks: + # plt.rcParams["axes.spines.left"] = True # display axis spines + # plt.rcParams["axes.spines.bottom"] = True + # plt.rcParams["axes.spines.top"] = False + # plt.rcParams["axes.spines.right"] = False + # plt.rcParams["axes.prop_cycle"] = cycler( + # "color", + # [ + # "#b4befe", + # "#89b4fa", + # "#74c7ec", + # "#89dceb", + # "#94e2d5", + # "#a6e3a1", + # "#f9e2af", + # "#fab387", + # "#eba0ac", + # "#f38ba8", + # "#cba6f7", + # "#f5c2e7", + # ], + # ) + # plt.rcParams["xtick.color"] = white # color of the ticks + # plt.rcParams["ytick.color"] = white # color of the ticks + # plt.rcParams["grid.color"] = white # grid color + # plt.rcParams["figure.facecolor"] = black # figure face color + # plt.rcParams["figure.edgecolor"] = black # figure edge color + # plt.rcParams["savefig.facecolor"] = black # figure face color when saving return style