From 1c4d34b8acf5cbaaf6602d0515caa0e7567e492a Mon Sep 17 00:00:00 2001
From: kohlhaasrebecca <rebecca.kohlhaas@outlook.com>
Date: Thu, 10 Oct 2024 17:25:44 +0200
Subject: [PATCH] [fix] Sorted out_dir, changed eval_pce_model_3d to
 plot_metamodel_3d

---
 .../post_processing/post_processing.py             | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/src/bayesvalidrox/post_processing/post_processing.py b/src/bayesvalidrox/post_processing/post_processing.py
index 62230a378..bd3303512 100644
--- a/src/bayesvalidrox/post_processing/post_processing.py
+++ b/src/bayesvalidrox/post_processing/post_processing.py
@@ -29,6 +29,8 @@ class PostProcessing:
     name : string
         Name of the PostProcessing object to be used for saving the generated files.
         The default is 'calib'.
+    out_dir : string
+        Output directory in which the images are placed. The default is ''.
         
     """
 
@@ -36,7 +38,12 @@ class PostProcessing:
         self.engine = engine
         self.name = name
         
+        self.out_dir = f'{out_dir}/Outputs_PostProcessing_{self.name}/'
         
+        # Open a pdf for the plots
+        if not os.path.exists(self.out_dir):
+            os.makedirs(self.out_dir)
+
 
         self.out_dir = f'./{out_dir}/Outputs_PostProcessing_{self.name}/'
 
@@ -204,6 +211,9 @@ class PostProcessing:
             self._plot_validation(samples)
         else:
             self._plot_validation_multi(x_values=x_values, x_axis=x_axis)
+        
+            # Zip the subdirectories
+            self.engine.Model.zip_subdirs(f'{self.engine.Model.name}valid', f'{self.engine.Model.name}valid_')
 
             # Zip the subdirectories
             self.engine.Model.zip_subdirs(
@@ -1137,6 +1147,10 @@ class PostProcessing:
             List of x values. The default is [].
         x_axis : str, optional
             Label of the x axis. The default is "x [m]".
+            
+        Raises
+        ------
+        AttributeError: This evaluation only support PCE-type models!
 
         Raises
         ------
-- 
GitLab