From 47858f6cdf6086d0658dd0362892f6a3a78da9dc Mon Sep 17 00:00:00 2001 From: Christian O'Reilly Date: Tue, 12 Nov 2024 22:08:38 -0500 Subject: [PATCH] Fix example bug. --- pylossless/pipeline.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pylossless/pipeline.py b/pylossless/pipeline.py index 2b6a2d8..07cc4b4 100644 --- a/pylossless/pipeline.py +++ b/pylossless/pipeline.py @@ -462,6 +462,8 @@ def __init__(self, config_path=None, config=None): "epoch": FlaggedEpochs(self), "ic": FlaggedICs(), } + self._config = None + if config: self.config = config if config_path is None: @@ -527,6 +529,15 @@ def _repr_html_(self): return html + @property + def config(self): + return self._config + + @config.setter + def config(self, config): + self._config = config + self._config["version"] = version("pylossless") + @property def config_fname(self): warn('config_fname is deprecated and will be removed from future versions.', @@ -1096,7 +1107,6 @@ def save(self, derivatives_path, overwrite=False, format="EDF", event_id=None): extension=".yaml", suffix="ll_config", check=False ) - self.config["version"] = version("pylossless") self.config.save(config_bidspath) # Save flag["ch"]