mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-15 20:13:41 +02:00
Documentation updated
This commit is contained in:
parent
70fc3d16d7
commit
cc74ec8cf9
3 changed files with 54 additions and 19 deletions
|
@ -262,6 +262,8 @@
|
||||||
<span class="sd"> This can take a while as the full correlation matrix</span>
|
<span class="sd"> This can take a while as the full correlation matrix</span>
|
||||||
<span class="sd"> has to be calculated (default False).</span>
|
<span class="sd"> has to be calculated (default False).</span>
|
||||||
|
|
||||||
|
<span class="sd"> Notes</span>
|
||||||
|
<span class="sd"> -----</span>
|
||||||
<span class="sd"> Based on the orthogonal distance regression module of scipy</span>
|
<span class="sd"> Based on the orthogonal distance regression module of scipy</span>
|
||||||
<span class="sd"> '''</span>
|
<span class="sd"> '''</span>
|
||||||
|
|
||||||
|
@ -681,9 +683,13 @@
|
||||||
<span class="k">def</span> <span class="nf">fit_lin</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
|
<span class="k">def</span> <span class="nf">fit_lin</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
|
||||||
<span class="sd">"""Performs a linear fit to y = n + m * x and returns two Obs n, m.</span>
|
<span class="sd">"""Performs a linear fit to y = n + m * x and returns two Obs n, m.</span>
|
||||||
|
|
||||||
<span class="sd"> y has to be a list of Obs, the dvalues of the Obs are used as yerror for the fit.</span>
|
<span class="sd"> Parameters</span>
|
||||||
<span class="sd"> x can either be a list of floats in which case no xerror is assumed, or</span>
|
<span class="sd"> ----------</span>
|
||||||
<span class="sd"> a list of Obs, where the dvalues of the Obs are used as xerror for the fit.</span>
|
<span class="sd"> x : list</span>
|
||||||
|
<span class="sd"> Can either be a list of floats in which case no xerror is assumed, or</span>
|
||||||
|
<span class="sd"> a list of Obs, where the dvalues of the Obs are used as xerror for the fit.</span>
|
||||||
|
<span class="sd"> y : list</span>
|
||||||
|
<span class="sd"> List of Obs, the dvalues of the Obs are used as yerror for the fit.</span>
|
||||||
<span class="sd"> """</span>
|
<span class="sd"> """</span>
|
||||||
|
|
||||||
<span class="k">def</span> <span class="nf">f</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">x</span><span class="p">):</span>
|
<span class="k">def</span> <span class="nf">f</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">x</span><span class="p">):</span>
|
||||||
|
@ -701,8 +707,8 @@
|
||||||
|
|
||||||
|
|
||||||
<span class="k">def</span> <span class="nf">qqplot</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">o_y</span><span class="p">,</span> <span class="n">func</span><span class="p">,</span> <span class="n">p</span><span class="p">):</span>
|
<span class="k">def</span> <span class="nf">qqplot</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">o_y</span><span class="p">,</span> <span class="n">func</span><span class="p">,</span> <span class="n">p</span><span class="p">):</span>
|
||||||
<span class="sd">""" Generates a quantile-quantile plot of the fit result which can be used to</span>
|
<span class="sd">"""Generates a quantile-quantile plot of the fit result which can be used to</span>
|
||||||
<span class="sd"> check if the residuals of the fit are gaussian distributed.</span>
|
<span class="sd"> check if the residuals of the fit are gaussian distributed.</span>
|
||||||
<span class="sd"> """</span>
|
<span class="sd"> """</span>
|
||||||
|
|
||||||
<span class="n">residuals</span> <span class="o">=</span> <span class="p">[]</span>
|
<span class="n">residuals</span> <span class="o">=</span> <span class="p">[]</span>
|
||||||
|
@ -1119,6 +1125,8 @@ If True, a quantile-quantile plot of the fit result is generated (default False)
|
||||||
<span class="sd"> This can take a while as the full correlation matrix</span>
|
<span class="sd"> This can take a while as the full correlation matrix</span>
|
||||||
<span class="sd"> has to be calculated (default False).</span>
|
<span class="sd"> has to be calculated (default False).</span>
|
||||||
|
|
||||||
|
<span class="sd"> Notes</span>
|
||||||
|
<span class="sd"> -----</span>
|
||||||
<span class="sd"> Based on the orthogonal distance regression module of scipy</span>
|
<span class="sd"> Based on the orthogonal distance regression module of scipy</span>
|
||||||
<span class="sd"> '''</span>
|
<span class="sd"> '''</span>
|
||||||
|
|
||||||
|
@ -1294,8 +1302,11 @@ If true prints the expected chisquare which is
|
||||||
corrected by effects caused by correlated input data.
|
corrected by effects caused by correlated input data.
|
||||||
This can take a while as the full correlation matrix
|
This can take a while as the full correlation matrix
|
||||||
has to be calculated (default False).</li>
|
has to be calculated (default False).</li>
|
||||||
<li><strong>Based on the orthogonal distance regression module of scipy</strong></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<h6 id="notes">Notes</h6>
|
||||||
|
|
||||||
|
<p>Based on the orthogonal distance regression module of scipy</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -1313,9 +1324,13 @@ has to be calculated (default False).</li>
|
||||||
<div class="pdoc-code codehilite"><pre><span></span><span class="k">def</span> <span class="nf">fit_lin</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
|
<div class="pdoc-code codehilite"><pre><span></span><span class="k">def</span> <span class="nf">fit_lin</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
|
||||||
<span class="sd">"""Performs a linear fit to y = n + m * x and returns two Obs n, m.</span>
|
<span class="sd">"""Performs a linear fit to y = n + m * x and returns two Obs n, m.</span>
|
||||||
|
|
||||||
<span class="sd"> y has to be a list of Obs, the dvalues of the Obs are used as yerror for the fit.</span>
|
<span class="sd"> Parameters</span>
|
||||||
<span class="sd"> x can either be a list of floats in which case no xerror is assumed, or</span>
|
<span class="sd"> ----------</span>
|
||||||
<span class="sd"> a list of Obs, where the dvalues of the Obs are used as xerror for the fit.</span>
|
<span class="sd"> x : list</span>
|
||||||
|
<span class="sd"> Can either be a list of floats in which case no xerror is assumed, or</span>
|
||||||
|
<span class="sd"> a list of Obs, where the dvalues of the Obs are used as xerror for the fit.</span>
|
||||||
|
<span class="sd"> y : list</span>
|
||||||
|
<span class="sd"> List of Obs, the dvalues of the Obs are used as yerror for the fit.</span>
|
||||||
<span class="sd"> """</span>
|
<span class="sd"> """</span>
|
||||||
|
|
||||||
<span class="k">def</span> <span class="nf">f</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">x</span><span class="p">):</span>
|
<span class="k">def</span> <span class="nf">f</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">x</span><span class="p">):</span>
|
||||||
|
@ -1336,9 +1351,15 @@ has to be calculated (default False).</li>
|
||||||
|
|
||||||
<div class="docstring"><p>Performs a linear fit to y = n + m * x and returns two Obs n, m.</p>
|
<div class="docstring"><p>Performs a linear fit to y = n + m * x and returns two Obs n, m.</p>
|
||||||
|
|
||||||
<p>y has to be a list of Obs, the dvalues of the Obs are used as yerror for the fit.
|
<h6 id="parameters">Parameters</h6>
|
||||||
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.</p>
|
<ul>
|
||||||
|
<li><strong>x</strong> (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.</li>
|
||||||
|
<li><strong>y</strong> (list):
|
||||||
|
List of Obs, the dvalues of the Obs are used as yerror for the fit.</li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -1354,8 +1375,8 @@ a list of Obs, where the dvalues of the Obs are used as xerror for the fit.</p>
|
||||||
<details>
|
<details>
|
||||||
<summary>View Source</summary>
|
<summary>View Source</summary>
|
||||||
<div class="pdoc-code codehilite"><pre><span></span><span class="k">def</span> <span class="nf">qqplot</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">o_y</span><span class="p">,</span> <span class="n">func</span><span class="p">,</span> <span class="n">p</span><span class="p">):</span>
|
<div class="pdoc-code codehilite"><pre><span></span><span class="k">def</span> <span class="nf">qqplot</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">o_y</span><span class="p">,</span> <span class="n">func</span><span class="p">,</span> <span class="n">p</span><span class="p">):</span>
|
||||||
<span class="sd">""" Generates a quantile-quantile plot of the fit result which can be used to</span>
|
<span class="sd">"""Generates a quantile-quantile plot of the fit result which can be used to</span>
|
||||||
<span class="sd"> check if the residuals of the fit are gaussian distributed.</span>
|
<span class="sd"> check if the residuals of the fit are gaussian distributed.</span>
|
||||||
<span class="sd"> """</span>
|
<span class="sd"> """</span>
|
||||||
|
|
||||||
<span class="n">residuals</span> <span class="o">=</span> <span class="p">[]</span>
|
<span class="n">residuals</span> <span class="o">=</span> <span class="p">[]</span>
|
||||||
|
|
|
@ -1611,6 +1611,8 @@
|
||||||
<span class="sd"> obs_b : Obs</span>
|
<span class="sd"> obs_b : Obs</span>
|
||||||
<span class="sd"> Second observable</span>
|
<span class="sd"> Second observable</span>
|
||||||
|
|
||||||
|
<span class="sd"> Notes</span>
|
||||||
|
<span class="sd"> -----</span>
|
||||||
<span class="sd"> Keep in mind to only correlate primary observables which have not been reweighted</span>
|
<span class="sd"> Keep in mind to only correlate primary observables which have not been reweighted</span>
|
||||||
<span class="sd"> yet. The reweighting has to be applied after correlating the observables.</span>
|
<span class="sd"> yet. The reweighting has to be applied after correlating the observables.</span>
|
||||||
<span class="sd"> Currently only works if ensembles are identical (this is not strictly necessary).</span>
|
<span class="sd"> Currently only works if ensembles are identical (this is not strictly necessary).</span>
|
||||||
|
@ -1807,6 +1809,8 @@
|
||||||
<span class="sd"> list_of_obs : list</span>
|
<span class="sd"> list_of_obs : list</span>
|
||||||
<span class="sd"> list of the Obs object to be combined</span>
|
<span class="sd"> list of the Obs object to be combined</span>
|
||||||
|
|
||||||
|
<span class="sd"> Notes</span>
|
||||||
|
<span class="sd"> -----</span>
|
||||||
<span class="sd"> It is not possible to combine obs which are based on the same replicum</span>
|
<span class="sd"> It is not possible to combine obs which are based on the same replicum</span>
|
||||||
<span class="sd"> """</span>
|
<span class="sd"> """</span>
|
||||||
<span class="n">replist</span> <span class="o">=</span> <span class="p">[</span><span class="n">item</span> <span class="k">for</span> <span class="n">obs</span> <span class="ow">in</span> <span class="n">list_of_obs</span> <span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="n">obs</span><span class="o">.</span><span class="n">names</span><span class="p">]</span>
|
<span class="n">replist</span> <span class="o">=</span> <span class="p">[</span><span class="n">item</span> <span class="k">for</span> <span class="n">obs</span> <span class="ow">in</span> <span class="n">list_of_obs</span> <span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="n">obs</span><span class="o">.</span><span class="n">names</span><span class="p">]</span>
|
||||||
|
@ -4778,6 +4782,8 @@ on the configurations in obs[i].idl.</li>
|
||||||
<span class="sd"> obs_b : Obs</span>
|
<span class="sd"> obs_b : Obs</span>
|
||||||
<span class="sd"> Second observable</span>
|
<span class="sd"> Second observable</span>
|
||||||
|
|
||||||
|
<span class="sd"> Notes</span>
|
||||||
|
<span class="sd"> -----</span>
|
||||||
<span class="sd"> Keep in mind to only correlate primary observables which have not been reweighted</span>
|
<span class="sd"> Keep in mind to only correlate primary observables which have not been reweighted</span>
|
||||||
<span class="sd"> yet. The reweighting has to be applied after correlating the observables.</span>
|
<span class="sd"> yet. The reweighting has to be applied after correlating the observables.</span>
|
||||||
<span class="sd"> Currently only works if ensembles are identical (this is not strictly necessary).</span>
|
<span class="sd"> Currently only works if ensembles are identical (this is not strictly necessary).</span>
|
||||||
|
@ -4821,10 +4827,13 @@ on the configurations in obs[i].idl.</li>
|
||||||
First observable</li>
|
First observable</li>
|
||||||
<li><strong>obs_b</strong> (Obs):
|
<li><strong>obs_b</strong> (Obs):
|
||||||
Second observable</li>
|
Second observable</li>
|
||||||
<li><strong>Keep in mind to only correlate primary observables which have not been reweighted</strong></li>
|
|
||||||
<li><strong>yet. The reweighting has to be applied after correlating the observables.</strong></li>
|
|
||||||
<li><strong>Currently only works if ensembles are identical (this is not strictly necessary).</strong></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<h6 id="notes">Notes</h6>
|
||||||
|
|
||||||
|
<p>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).</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -4987,6 +4996,8 @@ name of the ensemble the samples are defined on.</li>
|
||||||
<span class="sd"> list_of_obs : list</span>
|
<span class="sd"> list_of_obs : list</span>
|
||||||
<span class="sd"> list of the Obs object to be combined</span>
|
<span class="sd"> list of the Obs object to be combined</span>
|
||||||
|
|
||||||
|
<span class="sd"> Notes</span>
|
||||||
|
<span class="sd"> -----</span>
|
||||||
<span class="sd"> It is not possible to combine obs which are based on the same replicum</span>
|
<span class="sd"> It is not possible to combine obs which are based on the same replicum</span>
|
||||||
<span class="sd"> """</span>
|
<span class="sd"> """</span>
|
||||||
<span class="n">replist</span> <span class="o">=</span> <span class="p">[</span><span class="n">item</span> <span class="k">for</span> <span class="n">obs</span> <span class="ow">in</span> <span class="n">list_of_obs</span> <span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="n">obs</span><span class="o">.</span><span class="n">names</span><span class="p">]</span>
|
<span class="n">replist</span> <span class="o">=</span> <span class="p">[</span><span class="n">item</span> <span class="k">for</span> <span class="n">obs</span> <span class="ow">in</span> <span class="n">list_of_obs</span> <span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="n">obs</span><span class="o">.</span><span class="n">names</span><span class="p">]</span>
|
||||||
|
@ -5017,8 +5028,11 @@ name of the ensemble the samples are defined on.</li>
|
||||||
<ul>
|
<ul>
|
||||||
<li><strong>list_of_obs</strong> (list):
|
<li><strong>list_of_obs</strong> (list):
|
||||||
list of the Obs object to be combined</li>
|
list of the Obs object to be combined</li>
|
||||||
<li><strong>It is not possible to combine obs which are based on the same replicum</strong></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<h6 id="notes">Notes</h6>
|
||||||
|
|
||||||
|
<p>It is not possible to combine obs which are based on the same replicum</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue