From 1ad0b6c19ef4db6a65829e22351d533c4962252a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Le=20Guyader?= <loic.le.guyader@xfel.eu> Date: Tue, 14 Apr 2020 16:24:48 +0200 Subject: [PATCH] Warns when not using 16 worker --- DSSC.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/DSSC.py b/DSSC.py index 22fce8d..6bda4b3 100644 --- a/DSSC.py +++ b/DSSC.py @@ -43,9 +43,9 @@ class DSSC: self.aspect = self.px_pitch_v/self.px_pitch_h # aspect ratio of the DSSC images self.geom = None self.mask = None - self.max_fraction_memory = 0.8 + self.max_fraction_memory = 0.4 self.filter_mask = None - self.Nworker = 6 + self.Nworker = 16 print('DSSC configuration') print(f'Topic: {self.topic}') @@ -321,6 +321,13 @@ class DSSC: do_pulse_mean=do_pulse_mean )) + if self.Nworker != 16: + with warnings.catch_warnings(): + warnings.simplefilter("default") + warnings.warn(('Nworker other than 16 known to cause issue' + + '(https://in.xfel.eu/gitlab/SCS/ToolBox/merge_requests/76)'), + RuntimeWarning) + timestamp = strftime('%X') print(f'start time: {timestamp}') -- GitLab