Skip to content

Commit

Permalink
docs update
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarbranson committed Apr 26, 2017
1 parent df2af18 commit f1dc3cb
Show file tree
Hide file tree
Showing 12 changed files with 108 additions and 53 deletions.
29 changes: 19 additions & 10 deletions docs/_sources/users/beginners/10-summary.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,33 @@ Summary

If we put all the preceding steps together::

eg = la.analyse('./')
eg.despike()
eg.autorange()
eg.bkg_correct()
eg = la.analyse(data_folder='./data/',
config='DEFAULT',
internal_standard='Ca43',
srm_identifier='STD')
eg.despike(expdecay_despiker=True,
noise_despiker=True)
eg.autorange(on_mult=[1.5, 0.8],
off_mult=[0.8, 1.5])
eg.bkg_calc_weightedmean(weight_fwhm=300,
n_min=10)
eg.bkg_subtract()
eg.ratio()
eg.calibrate()

# create a threshold filter at 0.5 mmol/mol Al/Ca
eg.filter_threshold('Al27', 0.5E-3)
eg.calibrate(drift_correct=False,
poly_n=0,
srms_used=['NIST610', 'NIST612', 'NIST614'])
# create a threshold filter at 0.1 mmol/mol Al/Ca
eg.filter_threshold(analyte='Al27', threshold=0.1e-3)
# turn off the 'above' filter, so only data below the threshold is kept.
eg.filter_off('Al27_thresh_above')
eg.filter_on(filt=0)

# calculate sample statistics.
eg.stat_samples()
stats = eg.getstats()
stats.to_csv('reports/stats.csv')

Here we processed just 4 files, but the same procedure can be applied to an entire day of analyses, and takes just a few seconds longer.
Here we processed just 3 files, but the same procedure can be applied to an entire day of analyses, and takes just a little longer.

The processing stage most likely to modify your results is filtering.
There are a number of filters available, ranging from simple concentration thresholds (:meth:`~latools.analyse.filter_threshold`, as above) to advanced multi-dimensional clustering algorithms (:meth:`~latools.analyse.filter_clustering`).
Expand Down
2 changes: 1 addition & 1 deletion docs/_sources/users/installing.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Once git is installed, you can install ``latools`` directly from the online proj

This will download and install the latest version of ``latools`` from Github. In the future if you'd like to update ``latools`` to the latest version it's as adding ``--upgrade`` to the end of the code above.

.. Tip:: The ``@master`` at the end of the command installs the most up-to-date version of the software. If you want to install a specific version of ``latools``, replace ``master`` with the version number (e.g. ``v0.2.2a`` will get you the very first release of ``latools``).
.. Tip:: The ``@master`` at the end of the command installs the most up-to-date version of the software. If you want to install a specific version of ``latools``, replace ``@master`` with the version number (e.g. ``@v0.2.2a`` will get you the very first release of ``latools``).

-------------------
2. Pre-built Binary
Expand Down
Binary file modified docs/doctrees/docs/index.doctree
Binary file not shown.
Binary file modified docs/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/doctrees/users/beginners/10-summary.doctree
Binary file not shown.
Binary file modified docs/doctrees/users/beginners/index.doctree
Binary file not shown.
Binary file modified docs/doctrees/users/installing.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/searchindex.js

Large diffs are not rendered by default.

95 changes: 66 additions & 29 deletions docs/users/beginners/10-summary.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@








Expand Down Expand Up @@ -45,6 +47,7 @@

<body class="wy-body-for-nav" role="document">


<div class="wy-grid-for-nav">


Expand Down Expand Up @@ -85,7 +88,10 @@



<ul class="current">



<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="../index.html">User Guide</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../intro.html">Introduction</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installing.html">Installation</a></li>
Expand Down Expand Up @@ -125,8 +131,10 @@


<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../index.html">latools</a>

<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../index.html">latools</a>

</nav>


Expand All @@ -135,27 +143,44 @@
<div class="rst-content">

















<div role="navigation" aria-label="breadcrumbs navigation">

<ul class="wy-breadcrumbs">
<li><a href="../../index.html">Docs</a> &raquo;</li>


<li><a href="../../index.html">Docs</a> &raquo;</li>

<li><a href="../index.html">User Guide</a> &raquo;</li>

<li><a href="index.html">Beginner&#8217;s Guide</a> &raquo;</li>

<li>Summary</li>

<li>Summary</li>


<li class="wy-breadcrumbs-aside">


<a href="../../_sources/users/beginners/10-summary.rst.txt" rel="nofollow"> View page source</a>


</li>

</ul>


<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
Expand All @@ -164,25 +189,34 @@
<div class="section" id="summary">
<span id="beginner-summary"></span><h1>Summary<a class="headerlink" href="#summary" title="Permalink to this headline"></a></h1>
<p>If we put all the preceding steps together:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">eg</span> <span class="o">=</span> <span class="n">la</span><span class="o">.</span><span class="n">analyse</span><span class="p">(</span><span class="s1">&#39;./&#39;</span><span class="p">)</span>
<span class="n">eg</span><span class="o">.</span><span class="n">despike</span><span class="p">()</span>
<span class="n">eg</span><span class="o">.</span><span class="n">autorange</span><span class="p">()</span>
<span class="n">eg</span><span class="o">.</span><span class="n">bkg_correct</span><span class="p">()</span>
<span class="n">eg</span><span class="o">.</span><span class="n">ratio</span><span class="p">()</span>
<span class="n">eg</span><span class="o">.</span><span class="n">calibrate</span><span class="p">()</span>

<span class="c1"># create a threshold filter at 0.5 mmol/mol Al/Ca</span>
<span class="n">eg</span><span class="o">.</span><span class="n">filter_threshold</span><span class="p">(</span><span class="s1">&#39;Al27&#39;</span><span class="p">,</span> <span class="mf">0.5E-3</span><span class="p">)</span>
<span class="c1"># turn off the &#39;above&#39; filter, so only data below the threshold is kept.</span>
<span class="n">eg</span><span class="o">.</span><span class="n">filter_off</span><span class="p">(</span><span class="s1">&#39;Al27_thresh_above&#39;</span><span class="p">)</span>

<span class="c1"># calculate sample statistics.</span>
<span class="n">eg</span><span class="o">.</span><span class="n">stat_samples</span><span class="p">()</span>
<span class="n">stats</span> <span class="o">=</span> <span class="n">eg</span><span class="o">.</span><span class="n">getstats</span><span class="p">()</span>
<span class="n">stats</span><span class="o">.</span><span class="n">to_csv</span><span class="p">(</span><span class="s1">&#39;reports/stats.csv&#39;</span><span class="p">)</span>
<div class="highlight-default"><div class="highlight"><pre><span></span> <span class="n">eg</span> <span class="o">=</span> <span class="n">la</span><span class="o">.</span><span class="n">analyse</span><span class="p">(</span><span class="n">data_folder</span><span class="o">=</span><span class="s1">&#39;./data/&#39;</span><span class="p">,</span>
<span class="n">config</span><span class="o">=</span><span class="s1">&#39;DEFAULT&#39;</span><span class="p">,</span>
<span class="n">internal_standard</span><span class="o">=</span><span class="s1">&#39;Ca43&#39;</span><span class="p">,</span>
<span class="n">srm_identifier</span><span class="o">=</span><span class="s1">&#39;STD&#39;</span><span class="p">)</span>
<span class="n">eg</span><span class="o">.</span><span class="n">despike</span><span class="p">(</span><span class="n">expdecay_despiker</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
<span class="n">noise_despiker</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="n">eg</span><span class="o">.</span><span class="n">autorange</span><span class="p">(</span><span class="n">on_mult</span><span class="o">=</span><span class="p">[</span><span class="mf">1.5</span><span class="p">,</span> <span class="mf">0.8</span><span class="p">],</span>
<span class="n">off_mult</span><span class="o">=</span><span class="p">[</span><span class="mf">0.8</span><span class="p">,</span> <span class="mf">1.5</span><span class="p">])</span>
<span class="n">eg</span><span class="o">.</span><span class="n">bkg_calc_weightedmean</span><span class="p">(</span><span class="n">weight_fwhm</span><span class="o">=</span><span class="mi">300</span><span class="p">,</span>
<span class="n">n_min</span><span class="o">=</span><span class="mi">10</span><span class="p">)</span>
<span class="n">eg</span><span class="o">.</span><span class="n">bkg_subtract</span><span class="p">()</span>
<span class="n">eg</span><span class="o">.</span><span class="n">ratio</span><span class="p">()</span>
<span class="n">eg</span><span class="o">.</span><span class="n">calibrate</span><span class="p">(</span><span class="n">drift_correct</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
<span class="n">poly_n</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span>
<span class="n">srms_used</span><span class="o">=</span><span class="p">[</span><span class="s1">&#39;NIST610&#39;</span><span class="p">,</span> <span class="s1">&#39;NIST612&#39;</span><span class="p">,</span> <span class="s1">&#39;NIST614&#39;</span><span class="p">])</span>

<span class="c1"># create a threshold filter at 0.1 mmol/mol Al/Ca</span>
<span class="n">eg</span><span class="o">.</span><span class="n">filter_threshold</span><span class="p">(</span><span class="n">analyte</span><span class="o">=</span><span class="s1">&#39;Al27&#39;</span><span class="p">,</span> <span class="n">threshold</span><span class="o">=</span><span class="mf">0.1e-3</span><span class="p">)</span>
<span class="c1"># turn off the &#39;above&#39; filter, so only data below the threshold is kept.</span>
<span class="n">eg</span><span class="o">.</span><span class="n">filter_on</span><span class="p">(</span><span class="n">filt</span><span class="o">=</span><span class="mi">0</span><span class="p">)</span>

<span class="c1"># calculate sample statistics.</span>
<span class="n">eg</span><span class="o">.</span><span class="n">stat_samples</span><span class="p">()</span>
<span class="n">stats</span> <span class="o">=</span> <span class="n">eg</span><span class="o">.</span><span class="n">getstats</span><span class="p">()</span>
<span class="n">stats</span><span class="o">.</span><span class="n">to_csv</span><span class="p">(</span><span class="s1">&#39;reports/stats.csv&#39;</span><span class="p">)</span>
</pre></div>
</div>
<p>Here we processed just 4 files, but the same procedure can be applied to an entire day of analyses, and takes just a few seconds longer.</p>
<p>Here we processed just 3 files, but the same procedure can be applied to an entire day of analyses, and takes just a little longer.</p>
<p>The processing stage most likely to modify your results is filtering.
There are a number of filters available, ranging from simple concentration thresholds (<a class="reference internal" href="../../docs/index.html#latools.analyse.filter_threshold" title="latools.analyse.filter_threshold"><code class="xref py py-meth docutils literal"><span class="pre">filter_threshold()</span></code></a>, as above) to advanced multi-dimensional clustering algorithms (<a class="reference internal" href="../../docs/index.html#latools.analyse.filter_clustering" title="latools.analyse.filter_clustering"><code class="xref py py-meth docutils literal"><span class="pre">filter_clustering()</span></code></a>).
We reccommend you read and understand the section on <a class="reference internal" href="../advanced/advanced-filtering.html#advanced-filtering"><span class="std std-ref">Filtering &amp; Data Selection</span></a> before applying filters to your data.</p>
Expand All @@ -195,16 +229,19 @@ <h2>Before You Go<a class="headerlink" href="#before-you-go" title="Permalink to
</div>


</div>
<div class="articleComments">

</div>
</div>
<footer>

<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">

<a href="11-FAQ.html" class="btn btn-neutral float-right" title="FAQs" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="11-FAQ.html" class="btn btn-neutral float-right" title="FAQs" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>


<a href="9-statistics.html" class="btn btn-neutral" title="Sample Statistics" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
<a href="9-statistics.html" class="btn btn-neutral" title="Sample Statistics" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>

</div>

Expand Down
2 changes: 1 addition & 1 deletion docs/users/installing.html
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ <h3>1. Online Repository (Recommended)<a class="headerlink" href="#online-reposi
<p>This will download and install the latest version of <code class="docutils literal"><span class="pre">latools</span></code> from Github. In the future if you&#8217;d like to update <code class="docutils literal"><span class="pre">latools</span></code> to the latest version it&#8217;s as adding <code class="docutils literal"><span class="pre">--upgrade</span></code> to the end of the code above.</p>
<div class="admonition tip">
<p class="first admonition-title">Tip</p>
<p class="last">The <code class="docutils literal"><span class="pre">&#64;master</span></code> at the end of the command installs the most up-to-date version of the software. If you want to install a specific version of <code class="docutils literal"><span class="pre">latools</span></code>, replace <code class="docutils literal"><span class="pre">master</span></code> with the version number (e.g. <code class="docutils literal"><span class="pre">v0.2.2a</span></code> will get you the very first release of <code class="docutils literal"><span class="pre">latools</span></code>).</p>
<p class="last">The <code class="docutils literal"><span class="pre">&#64;master</span></code> at the end of the command installs the most up-to-date version of the software. If you want to install a specific version of <code class="docutils literal"><span class="pre">latools</span></code>, replace <code class="docutils literal"><span class="pre">&#64;master</span></code> with the version number (e.g. <code class="docutils literal"><span class="pre">&#64;v0.2.2a</span></code> will get you the very first release of <code class="docutils literal"><span class="pre">latools</span></code>).</p>
</div>
</div>
<div class="section" id="pre-built-binary">
Expand Down
29 changes: 19 additions & 10 deletions docs_source/source/users/beginners/10-summary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,33 @@ Summary

If we put all the preceding steps together::

eg = la.analyse('./')
eg.despike()
eg.autorange()
eg.bkg_correct()
eg = la.analyse(data_folder='./data/',
config='DEFAULT',
internal_standard='Ca43',
srm_identifier='STD')
eg.despike(expdecay_despiker=True,
noise_despiker=True)
eg.autorange(on_mult=[1.5, 0.8],
off_mult=[0.8, 1.5])
eg.bkg_calc_weightedmean(weight_fwhm=300,
n_min=10)
eg.bkg_subtract()
eg.ratio()
eg.calibrate()

# create a threshold filter at 0.5 mmol/mol Al/Ca
eg.filter_threshold('Al27', 0.5E-3)
eg.calibrate(drift_correct=False,
poly_n=0,
srms_used=['NIST610', 'NIST612', 'NIST614'])
# create a threshold filter at 0.1 mmol/mol Al/Ca
eg.filter_threshold(analyte='Al27', threshold=0.1e-3)
# turn off the 'above' filter, so only data below the threshold is kept.
eg.filter_off('Al27_thresh_above')
eg.filter_on(filt=0)

# calculate sample statistics.
eg.stat_samples()
stats = eg.getstats()
stats.to_csv('reports/stats.csv')

Here we processed just 4 files, but the same procedure can be applied to an entire day of analyses, and takes just a few seconds longer.
Here we processed just 3 files, but the same procedure can be applied to an entire day of analyses, and takes just a little longer.

The processing stage most likely to modify your results is filtering.
There are a number of filters available, ranging from simple concentration thresholds (:meth:`~latools.analyse.filter_threshold`, as above) to advanced multi-dimensional clustering algorithms (:meth:`~latools.analyse.filter_clustering`).
Expand Down
2 changes: 1 addition & 1 deletion docs_source/source/users/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Once git is installed, you can install ``latools`` directly from the online proj

This will download and install the latest version of ``latools`` from Github. In the future if you'd like to update ``latools`` to the latest version it's as adding ``--upgrade`` to the end of the code above.

.. Tip:: The ``@master`` at the end of the command installs the most up-to-date version of the software. If you want to install a specific version of ``latools``, replace ``master`` with the version number (e.g. ``v0.2.2a`` will get you the very first release of ``latools``).
.. Tip:: The ``@master`` at the end of the command installs the most up-to-date version of the software. If you want to install a specific version of ``latools``, replace ``@master`` with the version number (e.g. ``@v0.2.2a`` will get you the very first release of ``latools``).

-------------------
2. Pre-built Binary
Expand Down

0 comments on commit f1dc3cb

Please sign in to comment.