From ead3eba3aae074ebee1cd19fb2a7dd7f869ff443 Mon Sep 17 00:00:00 2001 From: Fischer Robert Date: Mon, 13 Feb 2023 16:29:08 +0100 Subject: [PATCH] added full temporal mean as function, but not activated in the prepare() --- filter_functions.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/filter_functions.py b/filter_functions.py index fdb0628..be3c152 100644 --- a/filter_functions.py +++ b/filter_functions.py @@ -245,6 +245,13 @@ class image_filter: else: print('Diff first and last is an unexplainable pain in the ass, solve this at one point') + def time_mean(self): + DA = self.data + mean = DA.mean(axis=-1) + means = dask.array.stack([mean]*DA.shape[-1], axis=-1) + self.calculated_features.append(means) + self.feature_names.append('full_temporal_mean_') + def Gradients(self): for key in self.Gaussian_4D_dict: @@ -412,6 +419,7 @@ class image_filter: self.Gaussian_space_stack() self.diff_Gaussian('space') self.pixel_coordinates() + # self.time_mean() # self.rank_filter_stack() #you have to load the entire raw data set for this filter --> not so good for many time steps self.prepared = True