Merge branch 'develop' into documentation

This commit is contained in:
fjosw 2022-03-05 08:44:26 +00:00
commit 70fc3d16d7
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
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):

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]