Skip to content

Commit

Permalink
Edit D47data.simulate() documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mdaeron committed Mar 4, 2021
1 parent f8e259a commit d17a16a
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 23 deletions.
28 changes: 22 additions & 6 deletions D47crunch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
__contact__ = '[email protected]'
__copyright__ = 'Copyright (c) 2020 Mathieu Daëron'
__license__ = 'Modified BSD License - https://opensource.org/licenses/BSD-3-Clause'
__date__ = '2021-02-23'
__version__ = '1.0.4'
__date__ = '2021-03-04'
__version__ = '1.1.0'

import os
import numpy as np
Expand Down Expand Up @@ -2168,10 +2168,12 @@ def simulate(self,
+ `rD47`: Δ<sub>47</sub> repeatability
+ `seed`: explicitly set to a non-zero value to achieve random but repeatable simulations
Beware that automatically computed `d47` values for anchor samples are calculated assuming
Beware that `d47` values computed from `d13C_VPDB` and `d18O_VPDB` are calculated assuming
a working gas with δ<sup>13</sup>C<sub>VPDB</sub>&nbsp;=&nbsp;0 and δ<sup>18</sup>O<sub>VSMOW</sub>&nbsp;=&nbsp;0.
Explicitly define `d47` if you are simulating a different working gas composition.
As a result, it is somewhat safer to define samples in using `d13C_VPDB` and `d18O_VPDB` rather than `d47`.
In the unusual case where simulating a different working gas composition is necessary, `d47` must be specified explicitly.
Samples already defined in `D47data.Nominal_d13C_VPDB`, `D47data.Nominal_d18O_VPDB`, and `D47data.Nominal_D47`
do not require explicit `d47`, `D47`, `d13C_VPDB` nor `d18O_VPDB` (the nominal values will be used by default).
Here is an example of using this method to simulate a given combination of anchors and unknowns:
Expand All @@ -2186,9 +2188,23 @@ def simulate(self,
], rD47 = 0.010)
D.standardize()
D.plot_sessions()
D.table_of_samples()
D.verbose = True
out = D.table_of_samples()
````
This should output something like:
````
[table_of_samples]
–––––– –– ––––––––– –––––––––– –––––– –––––– –––––––– –––––– ––––––––
Sample N d13C_VPDB d18O_VSMOW D47 SE 95% CL SD p_Levene
–––––– –– ––––––––– –––––––––– –––––– –––––– –––––––– –––––– ––––––––
ETH-1 6 nan nan 0.2052 0.0076
ETH-2 6 nan nan 0.2085 0.0089
ETH-3 12 nan nan 0.6132 0.0118
FOO 4 nan nan 0.3031 0.0057 ± 0.0118 0.0104 0.572
–––––– –– ––––––––– –––––––––– –––––– –––––– –––––––– –––––– ––––––––
````
'''
from numpy import random as nprandom
if seed:
Expand Down
95 changes: 78 additions & 17 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ <h3 id="7-viewing-and-saving-the-results">7. Viewing and saving the results</h3>
__copyright__ = &#39;Copyright (c) 2020 Mathieu Daëron&#39;
__license__ = &#39;Modified BSD License - https://opensource.org/licenses/BSD-3-Clause&#39;
__date__ = &#39;2021-02-23&#39;
__version__ = &#39;1.0.4&#39;
__version__ = &#39;1.1.0&#39;

import os
import numpy as np
Expand Down Expand Up @@ -2585,10 +2585,12 @@ <h3 id="7-viewing-and-saving-the-results">7. Viewing and saving the results</h3>
+ `rD47`: Δ&lt;sub&gt;47&lt;/sub&gt; repeatability
+ `seed`: explicitly set to a non-zero value to achieve random but repeatable simulations

Beware that automatically computed `d47` values for anchor samples are calculated assuming
Beware that `d47` values computed from `d13C_VPDB` and `d18O_VPDB` are calculated assuming
a working gas with δ&lt;sup&gt;13&lt;/sup&gt;C&lt;sub&gt;VPDB&lt;/sub&gt;&amp;nbsp;=&amp;nbsp;0 and δ&lt;sup&gt;18&lt;/sup&gt;O&lt;sub&gt;VSMOW&lt;/sub&gt;&amp;nbsp;=&amp;nbsp;0.
Explicitly define `d47` if you are simulating a different working gas composition.
As a result, it is somewhat safer to define samples in using `d13C_VPDB` and `d18O_VPDB` rather than `d47`.
In the unusual case where simulating a different working gas composition is necessary, `d47` must be specified explicitly.

Samples already defined in `D47data.Nominal_d13C_VPDB`, `D47data.Nominal_d18O_VPDB`, and `D47data.Nominal_D47`
do not require explicit `d47`, `D47`, `d13C_VPDB` nor `d18O_VPDB` (the nominal values will be used by default).

Here is an example of using this method to simulate a given combination of anchors and unknowns:

Expand All @@ -2603,9 +2605,23 @@ <h3 id="7-viewing-and-saving-the-results">7. Viewing and saving the results</h3>
], rD47 = 0.010)
D.standardize()
D.plot_sessions()
D.table_of_samples()
D.verbose = True
out = D.table_of_samples()
````

This should output something like:

````
[table_of_samples]
–––––– –– ––––––––– –––––––––– –––––– –––––– –––––––– –––––– ––––––––
Sample N d13C_VPDB d18O_VSMOW D47 SE 95% CL SD p_Levene
–––––– –– ––––––––– –––––––––– –––––– –––––– –––––––– –––––– ––––––––
ETH-1 6 nan nan 0.2052 0.0076
ETH-2 6 nan nan 0.2085 0.0089
ETH-3 12 nan nan 0.6132 0.0118
FOO 4 nan nan 0.3031 0.0057 ± 0.0118 0.0104 0.572
–––––– –– ––––––––– –––––––––– –––––– –––––– –––––––– –––––– ––––––––
````
&#39;&#39;&#39;
from numpy import random as nprandom
if seed:
Expand Down Expand Up @@ -4981,10 +4997,12 @@ <h2 class="section-title" id="header-classes">Classes</h2>
+ `rD47`: Δ&lt;sub&gt;47&lt;/sub&gt; repeatability
+ `seed`: explicitly set to a non-zero value to achieve random but repeatable simulations

Beware that automatically computed `d47` values for anchor samples are calculated assuming
Beware that `d47` values computed from `d13C_VPDB` and `d18O_VPDB` are calculated assuming
a working gas with δ&lt;sup&gt;13&lt;/sup&gt;C&lt;sub&gt;VPDB&lt;/sub&gt;&amp;nbsp;=&amp;nbsp;0 and δ&lt;sup&gt;18&lt;/sup&gt;O&lt;sub&gt;VSMOW&lt;/sub&gt;&amp;nbsp;=&amp;nbsp;0.
Explicitly define `d47` if you are simulating a different working gas composition.
As a result, it is somewhat safer to define samples in using `d13C_VPDB` and `d18O_VPDB` rather than `d47`.
In the unusual case where simulating a different working gas composition is necessary, `d47` must be specified explicitly.

Samples already defined in `D47data.Nominal_d13C_VPDB`, `D47data.Nominal_d18O_VPDB`, and `D47data.Nominal_D47`
do not require explicit `d47`, `D47`, `d13C_VPDB` nor `d18O_VPDB` (the nominal values will be used by default).

Here is an example of using this method to simulate a given combination of anchors and unknowns:

Expand All @@ -4999,9 +5017,23 @@ <h2 class="section-title" id="header-classes">Classes</h2>
], rD47 = 0.010)
D.standardize()
D.plot_sessions()
D.table_of_samples()
D.verbose = True
out = D.table_of_samples()
````

This should output something like:

````
[table_of_samples]
–––––– –– ––––––––– –––––––––– –––––– –––––– –––––––– –––––– ––––––––
Sample N d13C_VPDB d18O_VSMOW D47 SE 95% CL SD p_Levene
–––––– –– ––––––––– –––––––––– –––––– –––––– –––––––– –––––– ––––––––
ETH-1 6 nan nan 0.2052 0.0076
ETH-2 6 nan nan 0.2085 0.0089
ETH-3 12 nan nan 0.6132 0.0118
FOO 4 nan nan 0.3031 0.0057 ± 0.0118 0.0104 0.572
–––––– –– ––––––––– –––––––––– –––––– –––––– –––––––– –––––– ––––––––
````
&#39;&#39;&#39;
from numpy import random as nprandom
if seed:
Expand Down Expand Up @@ -6551,10 +6583,11 @@ <h3>Methods</h3>
<li><code>rD47</code>: Δ<sub>47</sub> repeatability</li>
<li><code>seed</code>: explicitly set to a non-zero value to achieve random but repeatable simulations</li>
</ul>
<p>Beware that automatically computed <code>d47</code> values for anchor samples are calculated assuming
<p>Beware that <code>d47</code> values computed from <code>d13C_VPDB</code> and <code>d18O_VPDB</code> are calculated assuming
a working gas with δ<sup>13</sup>C<sub>VPDB</sub>&nbsp;=&nbsp;0 and δ<sup>18</sup>O<sub>VSMOW</sub>&nbsp;=&nbsp;0.
Explicitly define <code>d47</code> if you are simulating a different working gas composition.
As a result, it is somewhat safer to define samples in using <code>d13C_VPDB</code> and <code>d18O_VPDB</code> rather than <code>d47</code>.</p>
In the unusual case where simulating a different working gas composition is necessary, <code>d47</code> must be specified explicitly.</p>
<p>Samples already defined in <code><a title="D47crunch.D47data.Nominal_d13C_VPDB" href="#D47crunch.D47data.Nominal_d13C_VPDB">D47data.Nominal_d13C_VPDB</a></code>, <code><a title="D47crunch.D47data.Nominal_d18O_VPDB" href="#D47crunch.D47data.Nominal_d18O_VPDB">D47data.Nominal_d18O_VPDB</a></code>, and <code><a title="D47crunch.D47data.Nominal_D47" href="#D47crunch.D47data.Nominal_D47">D47data.Nominal_D47</a></code>
do not require explicit <code>d47</code>, <code>D47</code>, <code>d13C_VPDB</code> nor <code>d18O_VPDB</code> (the nominal values will be used by default).</p>
<p>Here is an example of using this method to simulate a given combination of anchors and unknowns:</p>
<pre><code class="py">import D47crunch
D = D47crunch.D47data()
Expand All @@ -6566,7 +6599,19 @@ <h3>Methods</h3>
], rD47 = 0.010)
D.standardize()
D.plot_sessions()
D.table_of_samples()
D.verbose = True
out = D.table_of_samples()
</code></pre>
<p>This should output something like:</p>
<pre><code>[table_of_samples]
–––––– –– ––––––––– –––––––––– –––––– –––––– –––––––– –––––– ––––––––
Sample N d13C_VPDB d18O_VSMOW D47 SE 95% CL SD p_Levene
–––––– –– ––––––––– –––––––––– –––––– –––––– –––––––– –––––– ––––––––
ETH-1 6 nan nan 0.2052 0.0076
ETH-2 6 nan nan 0.2085 0.0089
ETH-3 12 nan nan 0.6132 0.0118
FOO 4 nan nan 0.3031 0.0057 ± 0.0118 0.0104 0.572
–––––– –– ––––––––– –––––––––– –––––– –––––– –––––––– –––––– ––––––––
</code></pre></div>
<details class="source">
<summary>
Expand Down Expand Up @@ -6606,10 +6651,12 @@ <h3>Methods</h3>
+ `rD47`: Δ&lt;sub&gt;47&lt;/sub&gt; repeatability
+ `seed`: explicitly set to a non-zero value to achieve random but repeatable simulations

Beware that automatically computed `d47` values for anchor samples are calculated assuming
Beware that `d47` values computed from `d13C_VPDB` and `d18O_VPDB` are calculated assuming
a working gas with δ&lt;sup&gt;13&lt;/sup&gt;C&lt;sub&gt;VPDB&lt;/sub&gt;&amp;nbsp;=&amp;nbsp;0 and δ&lt;sup&gt;18&lt;/sup&gt;O&lt;sub&gt;VSMOW&lt;/sub&gt;&amp;nbsp;=&amp;nbsp;0.
Explicitly define `d47` if you are simulating a different working gas composition.
As a result, it is somewhat safer to define samples in using `d13C_VPDB` and `d18O_VPDB` rather than `d47`.
In the unusual case where simulating a different working gas composition is necessary, `d47` must be specified explicitly.

Samples already defined in `D47data.Nominal_d13C_VPDB`, `D47data.Nominal_d18O_VPDB`, and `D47data.Nominal_D47`
do not require explicit `d47`, `D47`, `d13C_VPDB` nor `d18O_VPDB` (the nominal values will be used by default).

Here is an example of using this method to simulate a given combination of anchors and unknowns:

Expand All @@ -6624,9 +6671,23 @@ <h3>Methods</h3>
], rD47 = 0.010)
D.standardize()
D.plot_sessions()
D.table_of_samples()
D.verbose = True
out = D.table_of_samples()
````

This should output something like:

````
[table_of_samples]
–––––– –– ––––––––– –––––––––– –––––– –––––– –––––––– –––––– ––––––––
Sample N d13C_VPDB d18O_VSMOW D47 SE 95% CL SD p_Levene
–––––– –– ––––––––– –––––––––– –––––– –––––– –––––––– –––––– ––––––––
ETH-1 6 nan nan 0.2052 0.0076
ETH-2 6 nan nan 0.2085 0.0089
ETH-3 12 nan nan 0.6132 0.0118
FOO 4 nan nan 0.3031 0.0057 ± 0.0118 0.0104 0.572
–––––– –– ––––––––– –––––––––– –––––– –––––– –––––––– –––––– ––––––––
````
&#39;&#39;&#39;
from numpy import random as nprandom
if seed:
Expand Down

0 comments on commit d17a16a

Please sign in to comment.