docs: formatting of docstrings improved.

This commit is contained in:
Fabian Joswig 2022-03-05 08:43:57 +00:00
parent 6bd3868179
commit 57a45e271f
2 changed files with 15 additions and 5 deletions

View file

@ -161,6 +161,8 @@ def total_least_squares(x, y, func, silent=False, **kwargs):
This can take a while as the full correlation matrix
has to be calculated (default False).
Notes
-----
Based on the orthogonal distance regression module of scipy
'''
@ -580,9 +582,13 @@ def _standard_fit(x, y, func, silent=False, **kwargs):
def fit_lin(x, y, **kwargs):
"""Performs a linear fit to y = n + m * x and returns two Obs n, m.
y has to be a list of Obs, the dvalues of the Obs are used as yerror for the fit.
x can either be a list of floats in which case no xerror is assumed, or
a list of Obs, where the dvalues of the Obs are used as xerror for the fit.
Parameters
----------
x : list
Can either be a list of floats in which case no xerror is assumed, or
a list of Obs, where the dvalues of the Obs are used as xerror for the fit.
y : list
List of Obs, the dvalues of the Obs are used as yerror for the fit.
"""
def f(a, x):
@ -600,8 +606,8 @@ def fit_lin(x, y, **kwargs):
def qqplot(x, o_y, func, p):
""" Generates a quantile-quantile plot of the fit result which can be used to
check if the residuals of the fit are gaussian distributed.
"""Generates a quantile-quantile plot of the fit result which can be used to
check if the residuals of the fit are gaussian distributed.
"""
residuals = []

View file

@ -1300,6 +1300,8 @@ def correlate(obs_a, obs_b):
obs_b : Obs
Second observable
Notes
-----
Keep in mind to only correlate primary observables which have not been reweighted
yet. The reweighting has to be applied after correlating the observables.
Currently only works if ensembles are identical (this is not strictly necessary).
@ -1496,6 +1498,8 @@ def merge_obs(list_of_obs):
list_of_obs : list
list of the Obs object to be combined
Notes
-----
It is not possible to combine obs which are based on the same replicum
"""
replist = [item for obs in list_of_obs for item in obs.names]