summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2016-07-04 17:11:50 +0800
committerAaron LI <aaronly.me@outlook.com>2016-07-04 17:11:50 +0800
commit0ff09cb3cbad15c293cc7c177fa82732b2b767c5 (patch)
tree5d467aaafd88693b9dc35e7a0faa64fdd4bc6cdd
parent304d2aa05e9d406bd1ca724a6bae5265a53199e1 (diff)
downloadcexcess-0ff09cb3cbad15c293cc7c177fa82732b2b767c5.tar.bz2
deproject_sbp.py: use model "report()" method
-rwxr-xr-xdeproject_sbp.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/deproject_sbp.py b/deproject_sbp.py
index 46dc81c..8cb6988 100755
--- a/deproject_sbp.py
+++ b/deproject_sbp.py
@@ -6,6 +6,7 @@
#
# Change logs:
# 2016-07-04:
+# * Use model's "report()" method
# * Add config "sbpexp_rcut"
# * Rename config "sbpexp_rcut*" to "sbpexp_rignore*"
# * Save profile radii in unit "kpc"
@@ -306,15 +307,13 @@ class SBP:
Report the extrapolation model fitting results.
"""
results = OrderedDict([
- ("bkg", self.bkg),
+ ("bkg", self.bkg),
("bkg_subtracted", self.bkg_subtracted),
- ("rignore", self.rignore),
- ("rcut", self.rcut),
- ("model", self.plcmodel.name),
- ("params", OrderedDict([
- (pn, [par.value, par.min, par.max, par.vary])
- for pn, par in self.plcmodel.params.items()
- ])),
+ ("rignore", self.rignore),
+ ("rcut", self.rcut),
+ ("model", self.plcmodel.name),
+ ("fitting", self.plcmodel.report(rtype="fitting")),
+ ("params", self.plcmodel.report(rtype="parameters")),
])
results_json = json.dumps(results, indent=2)
if outfile is None: