From d17a16ac446a73eba407eba019ed53067d9cba36 Mon Sep 17 00:00:00 2001 From: mdaeron Date: Thu, 4 Mar 2021 09:23:02 +0100 Subject: [PATCH] Edit D47data.simulate() documentation --- D47crunch/__init__.py | 28 ++++++++++--- docs/index.html | 95 +++++++++++++++++++++++++++++++++++-------- 2 files changed, 100 insertions(+), 23 deletions(-) diff --git a/D47crunch/__init__.py b/D47crunch/__init__.py index 72075cf..48a649b 100755 --- a/D47crunch/__init__.py +++ b/D47crunch/__init__.py @@ -13,8 +13,8 @@ __contact__ = 'daeron@lsce.ipsl.fr' __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 @@ -2168,10 +2168,12 @@ def simulate(self, + `rD47`: Δ47 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 δ13CVPDB = 0 and δ18OVSMOW = 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: @@ -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: diff --git a/docs/index.html b/docs/index.html index 34b1699..17a8e15 100644 --- a/docs/index.html +++ b/docs/index.html @@ -431,7 +431,7 @@

7. Viewing and saving the results

__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' +__version__ = '1.1.0' import os import numpy as np @@ -2585,10 +2585,12 @@

7. Viewing and saving the results

+ `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: @@ -2603,9 +2605,23 @@

7. Viewing and saving the results

], 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: @@ -4981,10 +4997,12 @@

Classes

+ `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: @@ -4999,9 +5017,23 @@

Classes

], 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: @@ -6551,10 +6583,11 @@

Methods

  • rD47: Δ47 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 δ13CVPDB = 0 and δ18OVSMOW = 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:

    import D47crunch
     D = D47crunch.D47data()
    @@ -6566,7 +6599,19 @@ 

    Methods

    ], 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
    +––––––  ––  –––––––––  ––––––––––  ––––––  ––––––  ––––––––  ––––––  ––––––––
     
    @@ -6606,10 +6651,12 @@

    Methods

    + `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: @@ -6624,9 +6671,23 @@

    Methods

    ], 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: