diff --git a/src/bayesvalidrox/post_processing/post_processing.py b/src/bayesvalidrox/post_processing/post_processing.py index 62230a3784069329ccf8c2039476e6ba9c5e05d4..bd3303512aab32ce62b988eddeb3a68c3af623a4 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 ------