diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2021-01-13 14:54:00 +0100 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2021-01-13 14:54:00 +0100 |
commit | d60d8afd4e81de9ff2615bdfe0fac829ec80663e (patch) | |
tree | 356fe3d646cfa7c2553d9f1b072cb7cf3a5d101a /lib/pelt.py | |
parent | 5f883c967621ae220f4eebdf128a8f11a8496bd9 (diff) |
pelt: Allow overrides via environment variables
Diffstat (limited to 'lib/pelt.py')
-rw-r--r-- | lib/pelt.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/pelt.py b/lib/pelt.py index 613ae80..58bc9c1 100644 --- a/lib/pelt.py +++ b/lib/pelt.py @@ -1,5 +1,8 @@ +#!/usr/bin/env python3 + import logging import numpy as np +import os from multiprocessing import Pool logger = logging.getLogger(__name__) @@ -41,6 +44,13 @@ class PELT: self.with_multiprocessing = True self.__dict__.update(kwargs) + if os.getenv("DFATOOL_PELT_MODEL"): + self.model = os.getenv("DFATOOL_PELT_MODEL") + if os.getenv("DFATOOL_PELT_JUMP"): + self.jump = int(os.getenv("DFATOOL_PELT_JUMP")) + if os.getenv("DFATOOL_PELT_MIN_DIST"): + self.min_dist = int(os.getenv("DFATOOL_PELT_MIN_DIST")) + # signals: a set of uW measurements belonging to a single parameter configuration (i.e., a single by_param entry) def needs_refinement(self, signals): count = 0 |