From 9103959499ef1f87381f7c406170afca1ee3bb27 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Mon, 27 Nov 2023 13:43:43 +0100 Subject: show-model=static: leave out parameter dependence heuristics --- lib/cli.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'lib') diff --git a/lib/cli.py b/lib/cli.py index 0f35f88..7bed07d 100644 --- a/lib/cli.py +++ b/lib/cli.py @@ -9,7 +9,7 @@ from dfatool.functions import ( import numpy as np -def print_static(model, static_model, name, attribute): +def print_static(model, static_model, name, attribute, with_dependence=False): unit = " " if attribute == "power": unit = "µW" @@ -26,15 +26,18 @@ def print_static(model, static_model, name, attribute): model.attr_by_name[name][attribute].stats.generic_param_dependence_ratio(), ) ) - for param in model.parameters: - print( - "{:10s} {:13s} {:15s}: {:.2f}".format( - "", - "dependence on", - param, - model.attr_by_name[name][attribute].stats.param_dependence_ratio(param), + if with_dependence: + for param in model.parameters: + print( + "{:10s} {:13s} {:15s}: {:.2f}".format( + "", + "dependence on", + param, + model.attr_by_name[name][attribute].stats.param_dependence_ratio( + param + ), + ) ) - ) def print_info_by_name(model, by_name): -- cgit v1.2.3