summaryrefslogtreecommitdiff
path: root/lib/pelt.py
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2021-01-13 14:54:00 +0100
committerDaniel Friesel <daniel.friesel@uos.de>2021-01-13 14:54:00 +0100
commitd60d8afd4e81de9ff2615bdfe0fac829ec80663e (patch)
tree356fe3d646cfa7c2553d9f1b072cb7cf3a5d101a /lib/pelt.py
parent5f883c967621ae220f4eebdf128a8f11a8496bd9 (diff)
pelt: Allow overrides via environment variables
Diffstat (limited to 'lib/pelt.py')
-rw-r--r--lib/pelt.py10
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