summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2021-08-31 14:59:14 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2021-08-31 14:59:14 +0200
commit0886a5fe14195fc105939b477f9ff70b27ae3172 (patch)
tree91b4e677ff8d0978ece41ee0b9f5a5f6cb1ff3c1 /lib
parente257251c82b64210dbc17890852d13b43f25c89d (diff)
model: allow leaf function setting to be overridden via env
Here, it defaults to enabled and can be overridden to disabled (DFATOOL_DTREE_FUNCTION_LEAVES=0)
Diffstat (limited to 'lib')
-rw-r--r--lib/model.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/model.py b/lib/model.py
index 696813e..3f784cc 100644
--- a/lib/model.py
+++ b/lib/model.py
@@ -255,11 +255,14 @@ class AnalyticModel:
for name in self.names:
for attr in self.attr_by_name[name].keys():
if tree_required[name].get(attr, False):
+ with_function_leaves = True
+ if os.getenv("DFATOOL_DTREE_FUNCTION_LEAVES") == "0":
+ with_function_leaves = False
self.build_dtree(
name,
attr,
self.attr_by_name[name][attr].stats.std_param_lut,
- with_function_leaves=False,
+ with_function_leaves=with_function_leaves,
)
else:
self.attr_by_name[name][attr].set_data_from_paramfit(paramfit)