Skip to content

Commit

Permalink
add docstring for SpectrumFit.result
Browse files Browse the repository at this point in the history
  • Loading branch information
joleroi committed Mar 22, 2018
1 parent faa698a commit 2f06330
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions gammapy/spectrum/fit.py
Expand Up @@ -59,7 +59,7 @@ def __init__(self, obs_list, model, stat='wstat', forward_folded=True,

self.covar_axis = None
self.covariance = None
self.result = None
self._result = None

self._check_valid_fit()
self._apply_fit_range()
Expand All @@ -77,6 +77,18 @@ def __str__(self):

return ss

@property
def result(self):
"""Fit result
The result is a list of length ``n``, where ``n`` ist the number of
observations that participated in the fit. The best fit model is
usually the same for all observations but the results differ in the
fitted energy range, predicted counts, final fit statistic value
etc.
"""
return self._result

@property
def obs_list(self):
return self._obs_list
Expand Down Expand Up @@ -441,7 +453,7 @@ def _make_fit_result(self):
obs=obs
))

self.result = results
self._result = results

def est_errors(self):
"""Estimate parameter errors."""
Expand Down

0 comments on commit 2f06330

Please sign in to comment.