From d27d66738b9811a492924495c37f585cb4b81c3d Mon Sep 17 00:00:00 2001
From: Le Roux Erwan <erwan.le-roux@irstea.fr>
Date: Thu, 21 Nov 2019 15:15:29 +0100
Subject: [PATCH] refacot folder for the figure of the paper 1

---
 .../crocus/crocus_variables.py                |   1 +
 .../study_visualization/study_visualizer.py   |  45 +++++++++++-------
 ...snow_load_trends_percentage_significant.py |  19 --------
 .../__init__.py                               |   0
 .../main2_choice_to_not_use_starting_years.py |   2 +-
 ...main3_non_stationary_strength_evolution.py |   2 +-
 ..._spatial_altitude_starting_years_impact.py |   2 +-
 ...n4_common_spatial_starting_years_impact.py |   2 +-
 .../main4_individual_starting_years_impact.py |   2 +-
 experiment/{paper1 => paper1_old}/__init__.py |   0
 .../poster_EVAN2019/__init__.py               |   0
 .../poster_EVAN2019/main_poster_EVAN2019.py   |   2 +-
 .../shape_prior_check/__init__.py             |   0
 .../analyse_shape_from_some_experiment.py     |   0
 .../shape_prior_check/hist_values_shape.png   | Bin
 .../shape_from_some_experiment.txt            |   0
 .../shape_prior_check/some_experiment_EVAN.py |   2 +-
 experiment/{paper1 => paper1_old}/utils.py    |   0
 .../validations/__init__.py                   |   0
 .../main0_comparison_with_observations.py     |   0
 .../main1_good_stationary_gev_fit.py          |   0
 experiment/paper_past_snow_loads/__init__.py  |   0
 .../paper_past_snow_loads/data/__init__.py    |   0
 .../data/main_eurocode_plot.py                |   0
 .../data/main_example_swe_total_plot.py       |  38 +++++++++++++++
 ...dy_visualizer_for_non_stationary_trends.py |   0
 .../__init__.py                               |   0
 .../main_bayesian_mcmc.py}                    |   4 +-
 .../result_snow_load_trends/__init__.py       |   0
 .../main_mle_diagnosis.py                     |   0
 thesis_report/gev_plot.py                     |  14 +++---
 31 files changed, 83 insertions(+), 52 deletions(-)
 delete mode 100644 experiment/paper1/snow_load_trends_percentage_significant.py
 rename experiment/{paper1 => paper1_old}/1 - non stationary model choice/__init__.py (100%)
 rename experiment/{paper1 => paper1_old}/1 - non stationary model choice/main2_choice_to_not_use_starting_years.py (94%)
 rename experiment/{paper1 => paper1_old}/1 - non stationary model choice/main3_non_stationary_strength_evolution.py (95%)
 rename experiment/{paper1 => paper1_old}/1 - non stationary model choice/main4_common_spatial_altitude_starting_years_impact.py (97%)
 rename experiment/{paper1 => paper1_old}/1 - non stationary model choice/main4_common_spatial_starting_years_impact.py (97%)
 rename experiment/{paper1 => paper1_old}/1 - non stationary model choice/main4_individual_starting_years_impact.py (96%)
 rename experiment/{paper1 => paper1_old}/__init__.py (100%)
 rename experiment/{paper1 => paper1_old}/poster_EVAN2019/__init__.py (100%)
 rename experiment/{paper1 => paper1_old}/poster_EVAN2019/main_poster_EVAN2019.py (99%)
 rename experiment/{paper1 => paper1_old}/poster_EVAN2019/shape_prior_check/__init__.py (100%)
 rename experiment/{paper1 => paper1_old}/poster_EVAN2019/shape_prior_check/analyse_shape_from_some_experiment.py (100%)
 rename experiment/{paper1 => paper1_old}/poster_EVAN2019/shape_prior_check/hist_values_shape.png (100%)
 rename experiment/{paper1 => paper1_old}/poster_EVAN2019/shape_prior_check/shape_from_some_experiment.txt (100%)
 rename experiment/{paper1 => paper1_old}/poster_EVAN2019/shape_prior_check/some_experiment_EVAN.py (96%)
 rename experiment/{paper1 => paper1_old}/utils.py (100%)
 rename experiment/{paper1 => paper1_old}/validations/__init__.py (100%)
 rename experiment/{paper1 => paper1_old}/validations/main0_comparison_with_observations.py (100%)
 rename experiment/{paper1 => paper1_old}/validations/main1_good_stationary_gev_fit.py (100%)
 create mode 100644 experiment/paper_past_snow_loads/__init__.py
 create mode 100644 experiment/paper_past_snow_loads/data/__init__.py
 create mode 100644 experiment/paper_past_snow_loads/data/main_eurocode_plot.py
 create mode 100644 experiment/paper_past_snow_loads/data/main_example_swe_total_plot.py
 create mode 100644 experiment/paper_past_snow_loads/method/study_visualizer_for_non_stationary_trends.py
 create mode 100644 experiment/paper_past_snow_loads/result_return_level_uncertainty/__init__.py
 rename experiment/{paper1/main_drawing_bayesian.py => paper_past_snow_loads/result_return_level_uncertainty/main_bayesian_mcmc.py} (97%)
 create mode 100644 experiment/paper_past_snow_loads/result_snow_load_trends/__init__.py
 create mode 100644 experiment/paper_past_snow_loads/result_snow_load_trends/main_mle_diagnosis.py

diff --git a/experiment/meteo_france_data/scm_models_data/crocus/crocus_variables.py b/experiment/meteo_france_data/scm_models_data/crocus/crocus_variables.py
index bd2a9b27..5feaebda 100644
--- a/experiment/meteo_france_data/scm_models_data/crocus/crocus_variables.py
+++ b/experiment/meteo_france_data/scm_models_data/crocus/crocus_variables.py
@@ -39,6 +39,7 @@ class AbstractSnowLoadVariable(CrocusVariable):
 class RecentSnowLoadVariable(AbstractSnowLoadVariable, CrocusRecentSweVariable):
     NAME = 'Snow load last 3 days'
 
+
 class TotalSnowLoadVariable(AbstractSnowLoadVariable, CrocusTotalSweVariable):
     NAME = 'Snow load total'
 
diff --git a/experiment/meteo_france_data/scm_models_data/visualization/study_visualization/study_visualizer.py b/experiment/meteo_france_data/scm_models_data/visualization/study_visualization/study_visualizer.py
index 505a39d1..71ea1aea 100644
--- a/experiment/meteo_france_data/scm_models_data/visualization/study_visualization/study_visualizer.py
+++ b/experiment/meteo_france_data/scm_models_data/visualization/study_visualization/study_visualizer.py
@@ -354,16 +354,22 @@ class StudyVisualizer(VisualizationParameters):
         start_year, stop_year = self.study.start_year_and_stop_year
         return list(range(start_year, stop_year))
 
-    def massif_name_to_altitude_and_eurocode_level_uncertainty(self, model_class, last_year_for_the_data, massif_names, ci_method, temporal_covariate) -> Dict[str, Tuple[int, EurocodeConfidenceIntervalFromExtremes]]:
-        massif_ids_and_names = [(massif_id, massif_name) for massif_id, massif_name in enumerate(self.study.study_massif_names) if massif_name in  massif_names]
-        arguments = [[last_year_for_the_data, self.smooth_maxima_x_y(massif_id), model_class, ci_method, temporal_covariate] for massif_id, _ in massif_ids_and_names]
+    def massif_name_to_altitude_and_eurocode_level_uncertainty(self, model_class, last_year_for_the_data, massif_names,
+                                                               ci_method, temporal_covariate) -> Dict[
+        str, Tuple[int, EurocodeConfidenceIntervalFromExtremes]]:
+        massif_ids_and_names = [(massif_id, massif_name) for massif_id, massif_name in
+                                enumerate(self.study.study_massif_names) if massif_name in massif_names]
+        arguments = [
+            [last_year_for_the_data, self.smooth_maxima_x_y(massif_id), model_class, ci_method, temporal_covariate] for
+            massif_id, _ in massif_ids_and_names]
         if self.multiprocessing:
             with Pool(NB_CORES) as p:
                 res = p.starmap(compute_eurocode_confidence_interval, arguments)
         else:
             res = [compute_eurocode_confidence_interval(*argument) for argument in arguments]
         res_and_altitude = [(self.study.altitude, r) for r in res]
-        massif_name_to_eurocode_return_level_uncertainty = OrderedDict(zip([massif_name for _, massif_name in massif_ids_and_names], res_and_altitude))
+        massif_name_to_eurocode_return_level_uncertainty = OrderedDict(
+            zip([massif_name for _, massif_name in massif_ids_and_names], res_and_altitude))
         return massif_name_to_eurocode_return_level_uncertainty
 
     # def dep_class_to_eurocode_level_uncertainty(self, model_class, last_year_for_the_data):
@@ -619,25 +625,28 @@ class StudyVisualizer(VisualizationParameters):
         self.plot_name = plot_name
         self.show_or_save_to_file()
 
-    def visualize_max_graphs_poster(self, massif_name, altitude, snow_abbreviation, color):
+    def visualize_max_graphs_poster(self, massif_name, altitude, snow_abbreviation, color, label=None, last_plot=True, ax=None):
         massif_names = self.study.study_massif_names
         # Display the graph of the max on top
-        ax = plt.gca()
+        if ax is None:
+            ax = plt.gca()
         x, y = self.smooth_maxima_x_y(massif_names.index(massif_name))
-        ax.plot(x, y, color=color, linewidth=5)
+        ax.plot(x, y, color=color, linewidth=5, label=label)
         # ax.set_ylabel('{} (in {})'.format(snow_abbreviation, self.study.variable_unit), color=color, fontsize=15)
-        ax.set_ylabel('{} (in {})'.format(snow_abbreviation, self.study.variable_unit), fontsize=15)
-        ax.set_xlabel('years', fontsize=15)
-        ax.set_title('{} at {} m'.format(massif_name, altitude))
-        ax.xaxis.set_ticks(x[2::10])
-        ax.tick_params(axis='both', which='major', labelsize=13)
 
-        # self.visualize_massif_graphs(self.visualize_mean_and_max_graph,
-        #                              specified_massif_ids=specified_massif_ids)
-        plot_name = 'Annual maxima of {} in {} at {}m'.format(snow_abbreviation, massif_name, altitude)
-        self.plot_name = plot_name
-        self.show_or_save_to_file(add_classic_title=False, no_title=True)
-        ax.clear()
+        if last_plot:
+            ax.xaxis.set_ticks(x[2::10])
+            ax.tick_params(axis='both', which='major', labelsize=13)
+            plot_name = 'Annual maxima of {} in {} at {}m'.format(snow_abbreviation, massif_name, altitude)
+            self.plot_name = plot_name
+            ax.set_ylabel('{} (in {})'.format(snow_abbreviation, self.study.variable_unit), fontsize=15)
+            ax.set_xlabel('years', fontsize=15)
+            if label is not None:
+                ax.legend()
+            else:
+                ax.set_title('{} at {} m'.format(massif_name, altitude))
+            self.show_or_save_to_file(add_classic_title=False, no_title=True)
+            ax.clear()
 
     @staticmethod
     def round_sig(x, sig=2):
diff --git a/experiment/paper1/snow_load_trends_percentage_significant.py b/experiment/paper1/snow_load_trends_percentage_significant.py
deleted file mode 100644
index ba38f673..00000000
--- a/experiment/paper1/snow_load_trends_percentage_significant.py
+++ /dev/null
@@ -1,19 +0,0 @@
-import numpy as np
-
-d = {
-    'mu': [8, 4, 1],
-    'sigma': [5, 2, 2],
-    "both": [9, 6, 5]
-}
-
-
-def compare(a):
-    assert a in ['mu', 'sigma']
-    percents = [new / old for old, new in zip(d[a], d['both'])]
-    print(np.mean(percents))
-
-
-if __name__ == '__main__':
-    compare('mu')
-    compare('sigma')
-    # conclusion: more than 2 times more significant trends in average
diff --git a/experiment/paper1/1 - non stationary model choice/__init__.py b/experiment/paper1_old/1 - non stationary model choice/__init__.py
similarity index 100%
rename from experiment/paper1/1 - non stationary model choice/__init__.py
rename to experiment/paper1_old/1 - non stationary model choice/__init__.py
diff --git a/experiment/paper1/1 - non stationary model choice/main2_choice_to_not_use_starting_years.py b/experiment/paper1_old/1 - non stationary model choice/main2_choice_to_not_use_starting_years.py
similarity index 94%
rename from experiment/paper1/1 - non stationary model choice/main2_choice_to_not_use_starting_years.py
rename to experiment/paper1_old/1 - non stationary model choice/main2_choice_to_not_use_starting_years.py
index b5a2f7c5..1b557cc5 100644
--- a/experiment/paper1/1 - non stationary model choice/main2_choice_to_not_use_starting_years.py	
+++ b/experiment/paper1_old/1 - non stationary model choice/main2_choice_to_not_use_starting_years.py	
@@ -2,7 +2,7 @@ import time
 
 from experiment.meteo_france_data.scm_models_data.visualization.hypercube_visualization.altitude_year_hypercube_visualizer import \
     Altitude_Hypercube_Year_Visualizer
-from experiment.paper1.utils import get_full_altitude_visualizer, FULL_ALTITUDES
+from experiment.paper1_old.utils import get_full_altitude_visualizer, FULL_ALTITUDES
 
 
 def main_fast_spatial_repartition():
diff --git a/experiment/paper1/1 - non stationary model choice/main3_non_stationary_strength_evolution.py b/experiment/paper1_old/1 - non stationary model choice/main3_non_stationary_strength_evolution.py
similarity index 95%
rename from experiment/paper1/1 - non stationary model choice/main3_non_stationary_strength_evolution.py
rename to experiment/paper1_old/1 - non stationary model choice/main3_non_stationary_strength_evolution.py
index 6b174865..78f9ba36 100644
--- a/experiment/paper1/1 - non stationary model choice/main3_non_stationary_strength_evolution.py	
+++ b/experiment/paper1_old/1 - non stationary model choice/main3_non_stationary_strength_evolution.py	
@@ -9,7 +9,7 @@ from experiment.trend_analysis.univariate_test.gev_trend_test_two_parameters imp
 """
 Visualize the 0.99 quantile initial value and its evolution
 """
-from experiment.paper1.utils import get_full_altitude_visualizer, FULL_ALTITUDES
+from experiment.paper1_old.utils import get_full_altitude_visualizer, FULL_ALTITUDES
 
 
 def main_fast_spatial_risk_evolution():
diff --git a/experiment/paper1/1 - non stationary model choice/main4_common_spatial_altitude_starting_years_impact.py b/experiment/paper1_old/1 - non stationary model choice/main4_common_spatial_altitude_starting_years_impact.py
similarity index 97%
rename from experiment/paper1/1 - non stationary model choice/main4_common_spatial_altitude_starting_years_impact.py
rename to experiment/paper1_old/1 - non stationary model choice/main4_common_spatial_altitude_starting_years_impact.py
index 10d4fe7b..a6f8594c 100644
--- a/experiment/paper1/1 - non stationary model choice/main4_common_spatial_altitude_starting_years_impact.py	
+++ b/experiment/paper1_old/1 - non stationary model choice/main4_common_spatial_altitude_starting_years_impact.py	
@@ -9,7 +9,7 @@ from experiment.trend_analysis.univariate_test.gev_trend_test_two_parameters imp
 """
 Visualize the 0.99 quantile initial value and its evolution
 """
-from experiment.paper1.utils import get_full_altitude_visualizer, FULL_ALTITUDES
+from experiment.paper1_old.utils import get_full_altitude_visualizer, FULL_ALTITUDES
 
 
 def main_fast_spatial_risk_evolution():
diff --git a/experiment/paper1/1 - non stationary model choice/main4_common_spatial_starting_years_impact.py b/experiment/paper1_old/1 - non stationary model choice/main4_common_spatial_starting_years_impact.py
similarity index 97%
rename from experiment/paper1/1 - non stationary model choice/main4_common_spatial_starting_years_impact.py
rename to experiment/paper1_old/1 - non stationary model choice/main4_common_spatial_starting_years_impact.py
index 2973ad0f..46636df9 100644
--- a/experiment/paper1/1 - non stationary model choice/main4_common_spatial_starting_years_impact.py	
+++ b/experiment/paper1_old/1 - non stationary model choice/main4_common_spatial_starting_years_impact.py	
@@ -9,7 +9,7 @@ from experiment.trend_analysis.univariate_test.gev_trend_test_two_parameters imp
 """
 Visualize the 0.99 quantile initial value and its evolution
 """
-from experiment.paper1.utils import get_full_altitude_visualizer, FULL_ALTITUDES
+from experiment.paper1_old.utils import get_full_altitude_visualizer, FULL_ALTITUDES
 
 
 def main_fast_spatial_risk_evolution():
diff --git a/experiment/paper1/1 - non stationary model choice/main4_individual_starting_years_impact.py b/experiment/paper1_old/1 - non stationary model choice/main4_individual_starting_years_impact.py
similarity index 96%
rename from experiment/paper1/1 - non stationary model choice/main4_individual_starting_years_impact.py
rename to experiment/paper1_old/1 - non stationary model choice/main4_individual_starting_years_impact.py
index ada1e073..1d9bcaa1 100644
--- a/experiment/paper1/1 - non stationary model choice/main4_individual_starting_years_impact.py	
+++ b/experiment/paper1_old/1 - non stationary model choice/main4_individual_starting_years_impact.py	
@@ -9,7 +9,7 @@ from experiment.trend_analysis.univariate_test.gev_trend_test_two_parameters imp
 """
 Visualize the 0.99 quantile initial value and its evolution
 """
-from experiment.paper1.utils import get_full_altitude_visualizer, FULL_ALTITUDES
+from experiment.paper1_old.utils import get_full_altitude_visualizer, FULL_ALTITUDES
 
 
 def main_fast_spatial_risk_evolution():
diff --git a/experiment/paper1/__init__.py b/experiment/paper1_old/__init__.py
similarity index 100%
rename from experiment/paper1/__init__.py
rename to experiment/paper1_old/__init__.py
diff --git a/experiment/paper1/poster_EVAN2019/__init__.py b/experiment/paper1_old/poster_EVAN2019/__init__.py
similarity index 100%
rename from experiment/paper1/poster_EVAN2019/__init__.py
rename to experiment/paper1_old/poster_EVAN2019/__init__.py
diff --git a/experiment/paper1/poster_EVAN2019/main_poster_EVAN2019.py b/experiment/paper1_old/poster_EVAN2019/main_poster_EVAN2019.py
similarity index 99%
rename from experiment/paper1/poster_EVAN2019/main_poster_EVAN2019.py
rename to experiment/paper1_old/poster_EVAN2019/main_poster_EVAN2019.py
index 2d81708a..530c55f3 100644
--- a/experiment/paper1/poster_EVAN2019/main_poster_EVAN2019.py
+++ b/experiment/paper1_old/poster_EVAN2019/main_poster_EVAN2019.py
@@ -7,7 +7,7 @@ from experiment.meteo_france_data.scm_models_data.visualization.study_visualizat
 from experiment.trend_analysis.univariate_test.gev_trend_test_one_parameter import GevScaleTrendTest, \
     GevLocationTrendTest
 from experiment.trend_analysis.univariate_test.gev_trend_test_two_parameters import GevLocationAndScaleTrendTest
-from experiment.paper1.utils import get_full_altitude_visualizer
+from experiment.paper1_old.utils import get_full_altitude_visualizer
 
 POSTER_ALTITUDES = [900, 1800, 2700]
 import matplotlib as mpl
diff --git a/experiment/paper1/poster_EVAN2019/shape_prior_check/__init__.py b/experiment/paper1_old/poster_EVAN2019/shape_prior_check/__init__.py
similarity index 100%
rename from experiment/paper1/poster_EVAN2019/shape_prior_check/__init__.py
rename to experiment/paper1_old/poster_EVAN2019/shape_prior_check/__init__.py
diff --git a/experiment/paper1/poster_EVAN2019/shape_prior_check/analyse_shape_from_some_experiment.py b/experiment/paper1_old/poster_EVAN2019/shape_prior_check/analyse_shape_from_some_experiment.py
similarity index 100%
rename from experiment/paper1/poster_EVAN2019/shape_prior_check/analyse_shape_from_some_experiment.py
rename to experiment/paper1_old/poster_EVAN2019/shape_prior_check/analyse_shape_from_some_experiment.py
diff --git a/experiment/paper1/poster_EVAN2019/shape_prior_check/hist_values_shape.png b/experiment/paper1_old/poster_EVAN2019/shape_prior_check/hist_values_shape.png
similarity index 100%
rename from experiment/paper1/poster_EVAN2019/shape_prior_check/hist_values_shape.png
rename to experiment/paper1_old/poster_EVAN2019/shape_prior_check/hist_values_shape.png
diff --git a/experiment/paper1/poster_EVAN2019/shape_prior_check/shape_from_some_experiment.txt b/experiment/paper1_old/poster_EVAN2019/shape_prior_check/shape_from_some_experiment.txt
similarity index 100%
rename from experiment/paper1/poster_EVAN2019/shape_prior_check/shape_from_some_experiment.txt
rename to experiment/paper1_old/poster_EVAN2019/shape_prior_check/shape_from_some_experiment.txt
diff --git a/experiment/paper1/poster_EVAN2019/shape_prior_check/some_experiment_EVAN.py b/experiment/paper1_old/poster_EVAN2019/shape_prior_check/some_experiment_EVAN.py
similarity index 96%
rename from experiment/paper1/poster_EVAN2019/shape_prior_check/some_experiment_EVAN.py
rename to experiment/paper1_old/poster_EVAN2019/shape_prior_check/some_experiment_EVAN.py
index 9d0175bf..0fc0501f 100644
--- a/experiment/paper1/poster_EVAN2019/shape_prior_check/some_experiment_EVAN.py
+++ b/experiment/paper1_old/poster_EVAN2019/shape_prior_check/some_experiment_EVAN.py
@@ -9,7 +9,7 @@ from experiment.trend_analysis.univariate_test.abstract_comparison_non_stationar
 from experiment.trend_analysis.univariate_test.gev_trend_test_one_parameter import GevScaleTrendTest, \
     GevLocationTrendTest
 from experiment.trend_analysis.univariate_test.gev_trend_test_two_parameters import GevLocationAndScaleTrendTest
-from experiment.paper1.utils import get_full_altitude_visualizer
+from experiment.paper1_old.utils import get_full_altitude_visualizer
 
 POSTER_ALTITUDES = [900, 1800, 2700]
 import matplotlib as mpl
diff --git a/experiment/paper1/utils.py b/experiment/paper1_old/utils.py
similarity index 100%
rename from experiment/paper1/utils.py
rename to experiment/paper1_old/utils.py
diff --git a/experiment/paper1/validations/__init__.py b/experiment/paper1_old/validations/__init__.py
similarity index 100%
rename from experiment/paper1/validations/__init__.py
rename to experiment/paper1_old/validations/__init__.py
diff --git a/experiment/paper1/validations/main0_comparison_with_observations.py b/experiment/paper1_old/validations/main0_comparison_with_observations.py
similarity index 100%
rename from experiment/paper1/validations/main0_comparison_with_observations.py
rename to experiment/paper1_old/validations/main0_comparison_with_observations.py
diff --git a/experiment/paper1/validations/main1_good_stationary_gev_fit.py b/experiment/paper1_old/validations/main1_good_stationary_gev_fit.py
similarity index 100%
rename from experiment/paper1/validations/main1_good_stationary_gev_fit.py
rename to experiment/paper1_old/validations/main1_good_stationary_gev_fit.py
diff --git a/experiment/paper_past_snow_loads/__init__.py b/experiment/paper_past_snow_loads/__init__.py
new file mode 100644
index 00000000..e69de29b
diff --git a/experiment/paper_past_snow_loads/data/__init__.py b/experiment/paper_past_snow_loads/data/__init__.py
new file mode 100644
index 00000000..e69de29b
diff --git a/experiment/paper_past_snow_loads/data/main_eurocode_plot.py b/experiment/paper_past_snow_loads/data/main_eurocode_plot.py
new file mode 100644
index 00000000..e69de29b
diff --git a/experiment/paper_past_snow_loads/data/main_example_swe_total_plot.py b/experiment/paper_past_snow_loads/data/main_example_swe_total_plot.py
new file mode 100644
index 00000000..86d87ccf
--- /dev/null
+++ b/experiment/paper_past_snow_loads/data/main_example_swe_total_plot.py
@@ -0,0 +1,38 @@
+from experiment.meteo_france_data.scm_models_data.crocus.crocus import CrocusSnowLoad3Days, CrocusSnowLoadTotal
+from experiment.meteo_france_data.scm_models_data.visualization.study_visualization.main_study_visualizer import \
+    study_iterator_global, SCM_STUDY_CLASS_TO_ABBREVIATION
+from experiment.meteo_france_data.scm_models_data.visualization.study_visualization.study_visualizer import \
+    StudyVisualizer
+import matplotlib.pyplot as plt
+
+def max_graph_annual_maxima_poster():
+    """
+    We choose these massif because each represents a different eurocode region
+    we also choose them because they belong to a different climatic area
+    :return:
+    """
+    save_to_file = False
+
+    # marker_altitude_massif_name_and_study_class = [
+    #     ('magenta', 900, 'Parpaillon', CrocusSnowLoadTotal),
+    #     ('darkmagenta', 1800, 'Vercors', CrocusSnowLoadTotal),
+    #     ('mediumpurple', 2700, 'Vanoise', CrocusSnowLoadTotal),
+    # ]
+    marker_altitude_massif_name_and_study_class = [
+        ('magenta', 900, 'Ubaye', CrocusSnowLoadTotal),
+        ('darkmagenta', 1800, 'Vercors', CrocusSnowLoadTotal),
+        ('mediumpurple', 2700, 'Beaufortain', CrocusSnowLoadTotal),
+    ]
+    ax = plt.gca()
+    for color, altitude, massif_name, study_class in marker_altitude_massif_name_and_study_class:
+        for study in study_iterator_global([study_class], altitudes=[altitude]):
+            study_visualizer = StudyVisualizer(study, save_to_file=save_to_file,
+                                               verbose=True,
+                                               multiprocessing=True)
+            snow_abbreviation = SCM_STUDY_CLASS_TO_ABBREVIATION[study_class]
+            last_plot = altitude == 2700
+            label = '{} massif at {}m'.format(massif_name, altitude)
+            study_visualizer.visualize_max_graphs_poster(massif_name, altitude, snow_abbreviation, color, label, last_plot, ax)
+
+if __name__ == '__main__':
+    max_graph_annual_maxima_poster()
diff --git a/experiment/paper_past_snow_loads/method/study_visualizer_for_non_stationary_trends.py b/experiment/paper_past_snow_loads/method/study_visualizer_for_non_stationary_trends.py
new file mode 100644
index 00000000..e69de29b
diff --git a/experiment/paper_past_snow_loads/result_return_level_uncertainty/__init__.py b/experiment/paper_past_snow_loads/result_return_level_uncertainty/__init__.py
new file mode 100644
index 00000000..e69de29b
diff --git a/experiment/paper1/main_drawing_bayesian.py b/experiment/paper_past_snow_loads/result_return_level_uncertainty/main_bayesian_mcmc.py
similarity index 97%
rename from experiment/paper1/main_drawing_bayesian.py
rename to experiment/paper_past_snow_loads/result_return_level_uncertainty/main_bayesian_mcmc.py
index 713147f2..f8057130 100644
--- a/experiment/paper1/main_drawing_bayesian.py
+++ b/experiment/paper_past_snow_loads/result_return_level_uncertainty/main_bayesian_mcmc.py
@@ -70,8 +70,8 @@ def main_drawing_bayesian():
     ax_return_level_posterior = axes[2]
     sns.kdeplot(return_level_bayesian.posterior_eurocode_return_level_samples_for_temporal_covariate,
                 ax=ax_return_level_posterior, color=colors[-1])
-    ax_return_level_posterior.set_xlabel("$z_p(\\theta)")
-    ax_return_level_posterior.set_ylabel("$p(z_p(\\theta)|y)")
+    ax_return_level_posterior.set_xlabel("$z_p(\\theta)$")
+    ax_return_level_posterior.set_ylabel("$p(z_p(\\theta)|y)$")
 
     plt.show()
 
diff --git a/experiment/paper_past_snow_loads/result_snow_load_trends/__init__.py b/experiment/paper_past_snow_loads/result_snow_load_trends/__init__.py
new file mode 100644
index 00000000..e69de29b
diff --git a/experiment/paper_past_snow_loads/result_snow_load_trends/main_mle_diagnosis.py b/experiment/paper_past_snow_loads/result_snow_load_trends/main_mle_diagnosis.py
new file mode 100644
index 00000000..e69de29b
diff --git a/thesis_report/gev_plot.py b/thesis_report/gev_plot.py
index 91a9d71a..f286b8e5 100644
--- a/thesis_report/gev_plot.py
+++ b/thesis_report/gev_plot.py
@@ -24,10 +24,11 @@ def gev_plot_big():
     x = np.linspace(-lim, lim, 100)
     loc, scale = 1, 1
     shapes = [-1, 0, 1]
-    for shape in shapes:
+    colors = ['tab:blue', 'k', 'tab:orange']
+    for shape, color in zip(shapes, colors):
         label = '$\zeta= {} $'.format(shape)
         y = r.dgev(x, loc, scale, shape)
-        plt.plot(x, y, label=label, linewidth=10)
+        plt.plot(x, y, label=label, linewidth=10, color=color)
     plt.legend(prop={'size': 20})
     plt.xlabel('$y$', fontsize=15)
     plt.ylabel('$f_{GEV}(y|1,1,\zeta)$', fontsize=15)
@@ -38,8 +39,8 @@ def gev_plot_big():
 def gev_plot_big_non_stationary_location():
     lim = 5
     x = np.linspace(-lim, lim, 100)
-    scale, shape = 1, 0.0
-    locs = [1, 2, 3]
+    scale, shape = 1, 0
+    locs = [0.5, 1, 2]
     inverse_loc_with_scale = True
     colors = ['red','k', 'green']
     greek_leeter = ' $\{}_1'.format('mu' if not inverse_loc_with_scale else 'sigma')
@@ -55,6 +56,7 @@ def gev_plot_big_non_stationary_location():
         label = template.format(sign_str)
         if inverse_loc_with_scale:
             loc, scale = scale, loc
+        print(loc, scale, shape)
         y = r.dgev(x, loc, scale, shape)
         plt.plot(x, y, label=label, linewidth=5, color=color)
     plt.legend(prop={'size': 20})
@@ -117,8 +119,8 @@ def quantile_function_plot():
 
 
 if __name__ == '__main__':
-    # gev_plot_big()
-    gev_plot_big_non_stationary_location()
+    gev_plot_big()
+    # gev_plot_big_non_stationary_location()
     # max_stable_plot()
     # quantile_function_plot()
     # max_stable_plot_v2()
-- 
GitLab