diff --git a/src/helpers.py b/src/helpers.py index be73614319b39dc36043437c64379342a96ce00e..d4180336ec63f4f5477d3f2a149b5cb146be5597 100644 --- a/src/helpers.py +++ b/src/helpers.py @@ -11,6 +11,8 @@ import math import os import socket import time +import types + import keras.backend as K import xarray as xr @@ -53,6 +55,9 @@ class TimeTrackingWrapper: with TimeTracking(name=self.__wrapped__.__name__): return self.__wrapped__(*args, **kwargs) + def __get__(self, instance, cls): + return types.MethodType(self, instance) + class TimeTracking(object): """ diff --git a/src/plotting/postprocessing_plotting.py b/src/plotting/postprocessing_plotting.py index b8f67e3393c4443fed523902765278654e78a0a9..b61e832c80ac9ad83a5aa4a4b5310b17f6add098 100644 --- a/src/plotting/postprocessing_plotting.py +++ b/src/plotting/postprocessing_plotting.py @@ -347,6 +347,8 @@ class PlotConditionalQuantiles(AbstractPlotClass): :return: """ + logging.info(f"start plotting {self.__class__.__name__}, scheduled number of plots: {(len(self.seasons) + 1) * 2}") + if len(self.seasons) > 0: self._plot_seasons() self._plot_all() @@ -384,6 +386,7 @@ class PlotConditionalQuantiles(AbstractPlotClass): :param season: List of seasons to use :return: """ + segmented_data, quantile_panel = self._prepare_plots(data, x_model, y_model) ylabel, xlabel = self._labels(x_model, self._opts["data_unit"]) plot_name = f"{self.plot_name}{self.add_affix(season)}{self.add_affix(plot_name_affix)}_plot.pdf" diff --git a/src/run_modules/experiment_setup.py b/src/run_modules/experiment_setup.py index 150399cb2e4997a6b9adfb30dfa3ff89de73d4ac..09b9f143fc0442ee34ef5735366145be86b5fa07 100644 --- a/src/run_modules/experiment_setup.py +++ b/src/run_modules/experiment_setup.py @@ -21,7 +21,7 @@ DEFAULT_VAR_ALL_DICT = {'o3': 'dma8eu', 'relhum': 'average_values', 'temp': 'max 'pblheight': 'maximum'} DEFAULT_TRANSFORMATION = {"scope": "data", "method": "standardise", "mean": "estimate"} DEFAULT_PLOT_LIST = ["PlotMonthlySummary", "PlotStationMap", "PlotClimatologicalSkillScore", "PlotTimeSeries", - "PlotCompetitiveSkillScore", "PlotBootstrapSkillScore", "plot_conditional_quantiles", + "PlotCompetitiveSkillScore", "PlotBootstrapSkillScore", "PlotConditionalQuantiles", "PlotAvailability"] diff --git a/src/run_modules/post_processing.py b/src/run_modules/post_processing.py index e8353048f2fa982a9d54900fab93142ed4f1ae30..dfeaf06533e8023cf872763e0f34d98c5dd27a01 100644 --- a/src/run_modules/post_processing.py +++ b/src/run_modules/post_processing.py @@ -195,7 +195,7 @@ class PostProcessing(RunEnvironment): if self.bootstrap_skill_scores is not None and "PlotBootstrapSkillScore" in plot_list: PlotBootstrapSkillScore(self.bootstrap_skill_scores, plot_folder=self.plot_path, model_setup="CNN") - if "plot_conditional_quantiles" in plot_list: + if "PlotConditionalQuantiles" in plot_list: PlotConditionalQuantiles(self.test_data.stations, data_pred_path=path, plot_folder=self.plot_path) if "PlotStationMap" in plot_list: PlotStationMap(generators={'b': self.test_data}, plot_folder=self.plot_path)