Files
pylib/docs/build/html/fit.html

173 lines
6.7 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>fit module &#8212; pylib 2019.5.19 documentation</title>
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/language_data.js"></script>
<script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
</head><body>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="module-fit">
<span id="fit-module"></span><h1>fit module<a class="headerlink" href="#module-fit" title="Permalink to this headline"></a></h1>
<p>Function and approximation.</p>
<span class="target" id="module-fit"></span><dl class="function">
<dt id="fit.gauss">
<code class="descname">gauss</code><span class="sig-paren">(</span><em>x</em>, <em>*p</em><span class="sig-paren">)</span><a class="headerlink" href="#fit.gauss" title="Permalink to this definition"></a></dt>
<dd><p>Gauss distribution function.</p>
<div class="math notranslate nohighlight">
\[f(x)=ae^{-(x-b)^{2}/(2c^{2})}\]</div>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>x</strong> (<em>int</em><em> or </em><em>float</em><em> or </em><em>list</em><em> or </em><em>numpy.ndarray</em>) positions where the gauss function will be calculated</p></li>
<li><p><strong>p</strong> (<em>list</em>) <p>gauss parameters [a, b, c, d]:</p>
<ul>
<li><p>a amplitude (<span class="math notranslate nohighlight">\(\int y \,\mathrm{d}x=1 \Leftrightarrow a=1/(c\sqrt{2\pi})\)</span> )</p></li>
<li><p>b expected value <span class="math notranslate nohighlight">\(\mu\)</span> (position of maximum, default = 0)</p></li>
<li><p>c standard deviation <span class="math notranslate nohighlight">\(\sigma\)</span> (variance <span class="math notranslate nohighlight">\(\sigma^2=c^2\)</span>)</p></li>
<li><p>d vertical offset (default = 0)</p></li>
</ul>
</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>gauss values at given positions x</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>numpy.ndarray</p>
</dd>
</dl>
</dd></dl>
<dl class="function">
<dt id="fit.gauss_fit">
<code class="descname">gauss_fit</code><span class="sig-paren">(</span><em>x</em>, <em>y</em>, <em>e=None</em>, <em>x_fit=None</em>, <em>verbose=False</em><span class="sig-paren">)</span><a class="headerlink" href="#fit.gauss_fit" title="Permalink to this definition"></a></dt>
<dd><p>Fit Gauss distribution function to data.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>x</strong> (<em>int</em><em> or </em><em>float</em><em> or </em><em>list</em><em> or </em><em>numpy.ndarray</em>) positions</p></li>
<li><p><strong>y</strong> (<em>int</em><em> or </em><em>float</em><em> or </em><em>list</em><em> or </em><em>numpy.ndarray</em>) values</p></li>
<li><p><strong>e</strong> (<em>int</em><em> or </em><em>float</em><em> or </em><em>list</em><em> or </em><em>numpy.ndarray</em>) error values (default = None)</p></li>
<li><p><strong>x_fit</strong> (<em>int</em><em> or </em><em>float</em><em> or </em><em>list</em><em> or </em><em>numpy.ndarray</em>) positions of fitted function (default = None, if None then x
is used)</p></li>
<li><p><strong>verbose</strong> (<em>bool</em>) verbose information (default = False)</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p><ul class="simple">
<li><p>numpy.ndarray fitted values (y_fit)</p></li>
<li><p>numpy.ndarray parameters of gauss distribution function (popt:
amplitude a, expected value <span class="math notranslate nohighlight">\(\mu\)</span>, standard deviation
<span class="math notranslate nohighlight">\(\sigma\)</span>, vertical offset d)</p></li>
<li><p>numpy.float64 full width at half maximum (FWHM)</p></li>
</ul>
</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>tuple</p>
</dd>
</dl>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<p><a class="reference internal" href="#fit.gauss" title="fit.gauss"><code class="xref py py-meth docutils literal notranslate"><span class="pre">gauss()</span></code></a></p>
</div>
</dd></dl>
<dl class="function">
<dt id="fit.main">
<code class="descname">main</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#fit.main" title="Permalink to this definition"></a></dt>
<dd><p>test function</p>
</dd></dl>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="index.html">pylib</a></h1>
<h3>Navigation</h3>
<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="index.html">Documentation overview</a><ul>
</ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
&copy;2019, Daniel Weschke.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 2.0.1</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
|
<a href="_sources/fit.rst.txt"
rel="nofollow">Page source</a>
</div>
</body>
</html>