diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2021-02-23 08:28:49 +0100 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2021-02-23 08:28:49 +0100 |
commit | e537dafe711dfbf1cc643442a55668bd285a3c6e (patch) | |
tree | f7a4230fc4dca51145b61c902da942c2666035d1 /lib | |
parent | 3b663aa49d32a3a23c53c3fa682b3b6b74d7c2ed (diff) |
analyze-archive: show substate model quality in table
Diffstat (limited to 'lib')
-rw-r--r-- | lib/model.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/model.py b/lib/model.py index 44272c8..e80d5a4 100644 --- a/lib/model.py +++ b/lib/model.py @@ -856,7 +856,21 @@ class PTAModel(AnalyticModel): return cumulative_energy / total_duration - return model_getter, param_info_getter + def info_getter(name, key, **kwargs): + if key != "power": + return None + + try: + substate_count = round(param_model_getter(name, "substate_count")) + except KeyError: + return None + if substate_count == 1: + return None + + # TODO + return True + + return model_getter, info_getter # This heuristic is very similar to the "function is not much better than # median" checks in get_fitted. So far, doing it here as well is mostly |