From 8eea77a231aec4e3ee1873a566f7b0bdedd9dec5 Mon Sep 17 00:00:00 2001 From: delaossa Date: Fri, 5 Jul 2024 11:05:00 +0200 Subject: [PATCH] Change the syntax a bit. --- wake_t/beamline_elements/plasma_stage.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wake_t/beamline_elements/plasma_stage.py b/wake_t/beamline_elements/plasma_stage.py index 16fc96e..312fc97 100644 --- a/wake_t/beamline_elements/plasma_stage.py +++ b/wake_t/beamline_elements/plasma_stage.py @@ -112,8 +112,9 @@ def __init__( if self.wakefield is not None: fields.append(self.wakefield) fields.extend(self.external_fields) - self.auto_dt_bunch = auto_dt_bunch - if self.auto_dt_bunch is None: + if auto_dt_bunch is not None: + self.auto_dt_bunch = auto_dt_bunch + else: self.auto_dt_bunch = self._get_optimized_dt super().__init__( length=length,