From 6d38194c14dbd292818b708fd48507907e95f607 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Al=C3=A1n=20Mu=C3=B1oz?= <amuoz@ed.ac.uk>
Date: Mon, 11 Oct 2021 18:46:41 +0100
Subject: [PATCH] change defaults temporarily to quickly get images

Former-commit-id: b2b8c6ca8db9750e538e15a709d4d8d4a0a86eef
---
 core/processor.py | 23 ++++++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)

diff --git a/core/processor.py b/core/processor.py
index d4f9584e..ef3e0336 100644
--- a/core/processor.py
+++ b/core/processor.py
@@ -57,6 +57,20 @@ class PostProcessorParameters(ParametersABC):
                                 "/postprocessing/bud_metric/extraction_general_None_volume"
                             ],
                         ),
+                        (
+                            "aggregate",
+                            [
+                                [
+                                    "/extraction/em_ratio/np_max/mean",
+                                    "/extraction/em_ratio/np_max/median",
+                                    "/extraction/em_ratio_bgsub/np_max/mean",
+                                    "/extraction/em_ratio_bgsub/np_max/median",
+                                    "/extraction/gsum_bgsub/np_max/median",
+                                    "/extraction/gsum_bgsub/np_max/median",
+                                    "postprocessing/dsignal/postprocessing_bud_metric_extraction_general_None_volume",
+                                ]
+                            ],
+                        ),
                         # "savgol": ["/extraction/general/None/area"],
                     ),
                 },
@@ -66,7 +80,7 @@ class PostProcessorParameters(ParametersABC):
                         "picker": pickerParameters.default(),
                     }
                 },
-                outpaths={},
+                outpaths={"aggregate": "/postprocessing/experiment_wide/aggregated/"},
             )
 
     def to_dict(self):
@@ -250,16 +264,19 @@ class PostProcessor:
                 else:
                     raise ("Outpath not defined", type(dataset))
 
+                if process not in self.parameters.to_dict()["outpaths"]:
+                    outpath = "/postprocessing/" + process + "/" + outpath
+
                 if isinstance(result, dict):  # Multiple Signals as output
                     for k, v in result:
                         self.write_result(
-                            "/postprocessing/" + process + "/" + outpath + f"/{k}",
+                            outpath + f"/{k}",
                             v,
                             metadata={},
                         )
                 else:
                     self.write_result(
-                        "/postprocessing/" + process + "/" + outpath,
+                        outpath,
                         result,
                         metadata={},
                     )
-- 
GitLab