diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2021-03-25 16:00:17 +0100 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2021-03-25 16:00:17 +0100 |
commit | 8fb9bf86007f48335645e58b1d536044c4af2ba1 (patch) | |
tree | 1278812fdb76f44951d4f4ff836ac1327dfdf4fc /lib/model.py | |
parent | ec6ba6a3ce9ffb142644bdddbcc42def853bc68a (diff) |
model: allow stats generation to be skipped
Diffstat (limited to 'lib/model.py')
-rw-r--r-- | lib/model.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/model.py b/lib/model.py index 8b76984..c89ff4f 100644 --- a/lib/model.py +++ b/lib/model.py @@ -69,6 +69,7 @@ class AnalyticModel: arg_count=None, function_override=dict(), use_corrcoef=False, + compute_stats=True, ): """ Create a new AnalyticModel and compute parameter statistics. @@ -119,7 +120,8 @@ class AnalyticModel: self.fit_done = False - self._compute_stats(by_name) + if compute_stats: + self._compute_stats(by_name) def __repr__(self): names = ", ".join(self.by_name.keys()) @@ -423,6 +425,7 @@ class PTAModel(AnalyticModel): use_corrcoef=False, pta=None, pelt=None, + compute_stats=True, ): """ Prepare a new PTA energy model. @@ -491,7 +494,8 @@ class PTAModel(AnalyticModel): self._aggregate_to_ndarray(self.by_name) - self._compute_stats(by_name) + if compute_stats: + self._compute_stats(by_name) if self.pelt is not None: # cluster_substates uses self.attr_by_name[*]["power"].param_values, which is set by _compute_stats |