[cig-commits] [commit] doc_updates: fix doc-string formatting (c380468)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Sun Jan 4 06:27:36 PST 2015
Repository : https://github.com/geodynamics/burnman
On branch : doc_updates
Link : https://github.com/geodynamics/burnman/compare/d124c5a6fd08f6e725ee5f08292c1d5d835d9cfa...0116539db4a8ba7cf7de063247d44630c4429162
>---------------------------------------------------------------
commit c38046886e68b04e6e961da8626ef230aa06f052
Author: Timo Heister <timo.heister at gmail.com>
Date: Sun Jan 4 09:26:07 2015 -0500
fix doc-string formatting
>---------------------------------------------------------------
c38046886e68b04e6e961da8626ef230aa06f052
burnman/averaging_schemes.py | 5 ++-
burnman/processchemistry.py | 103 ++++++++++++++++++++++---------------------
2 files changed, 55 insertions(+), 53 deletions(-)
diff --git a/burnman/averaging_schemes.py b/burnman/averaging_schemes.py
index befdbcc..78eb49a 100644
--- a/burnman/averaging_schemes.py
+++ b/burnman/averaging_schemes.py
@@ -142,7 +142,8 @@ class VoigtReussHill(AveragingScheme):
"""
Class for computing the Voigt-Reuss-Hill average for elastic properties.
This derives from :class:`burnman.averaging_schemes.averaging_scheme`, and implements
- the :func:`burnman.averaging_schemes.averaging_scheme.average_bulk_moduli` and :func:`burnman.averaging_schemes.averaging_scheme.average_shear_moduli` functions.
+ the :func:`burnman.averaging_schemes.averaging_scheme.average_bulk_moduli` and
+ :func:`burnman.averaging_schemes.averaging_scheme.average_shear_moduli` functions.
"""
def average_bulk_moduli(self, volumes, bulk_moduli, shear_moduli):
@@ -268,7 +269,7 @@ class Reuss(AveragingScheme):
Class for computing the Reuss (iso-stress) bound for elastic properties.
This derives from :class:`burnman.averaging_schemes.averaging_scheme`, and implements
the :func:`burnman.averaging_schemes.averaging_scheme.average_bulk_moduli` and
- :func:`burnman.averaging_schemes.averaging_scheme.average_shear_moduli` functions.
+ :func:`burnman.averaging_schemes.averaging_scheme.average_shear_moduli` functions.
"""
def average_bulk_moduli(self, volumes, bulk_moduli, shear_moduli):
diff --git a/burnman/processchemistry.py b/burnman/processchemistry.py
index a64d10a..4ef3532 100644
--- a/burnman/processchemistry.py
+++ b/burnman/processchemistry.py
@@ -99,7 +99,9 @@ def process_solution_chemistry(formulae):
"""
This function parses a set of endmember formulae
containing site information, e.g.
+
[ '[Mg]3[Al]2Si3O12', '[Mg]3[Mg1/2Si1/2]2Si3O12' ]
+
It outputs the bulk composition of each endmember
(removing the site information), and also a set of
variables and arrays which contain the site information.
@@ -108,39 +110,38 @@ def process_solution_chemistry(formulae):
molar fractions of the phases and pressure
and temperature where necessary.
+ Parameters
+ ----------
+ formulae : list of strings
+ List of chemical formulae with site information
- Parameters
- ----------
- formulae : list of strings
- List of chemical formulae with site information
-
- Returns
- -------
- solution_formulae : list of dictionaries
- List of endmember formulae is output from site formula strings
+ Returns
+ -------
+ solution_formulae : list of dictionaries
+ List of endmember formulae is output from site formula strings
- n_sites : integer
- Number of sites in the solid solution.
- Should be the same for all endmembers.
+ n_sites : integer
+ Number of sites in the solid solution.
+ Should be the same for all endmembers.
- sites : list of lists of strings
- A list of elements for each site in the solid solution
+ sites : list of lists of strings
+ A list of elements for each site in the solid solution
- n_occupancies : integer
- Sum of the number of possible elements on each of the sites
- in the solid solution.
- Example: A binary solution [[A][B],[B][C1/2D1/2]] would have
- n_occupancies = 5, with two possible elements on
- Site 1 and three on Site 2
+ n_occupancies : integer
+ Sum of the number of possible elements on each of the sites
+ in the solid solution.
+ Example: A binary solution [[A][B],[B][C1/2D1/2]] would have
+ n_occupancies = 5, with two possible elements on
+ Site 1 and three on Site 2
- endmember_occupancies : 2d array of floats
- A 1D array for each endmember in the solid solution,
- containing the number of atoms of each element on each site.
+ endmember_occupancies : 2d array of floats
+ A 1D array for each endmember in the solid solution,
+ containing the number of atoms of each element on each site.
- site_multiplicities : array of floats
- The number of each site per formula unit
- To simplify computations later, the multiplicities
- are repeated for each element on each site
+ site_multiplicities : array of floats
+ The number of each site per formula unit
+ To simplify computations later, the multiplicities
+ are repeated for each element on each site
"""
n_sites=formulae[0].count('[')
@@ -231,18 +232,18 @@ def process_solution_chemistry(formulae):
def compositional_array(formulae):
"""
- Parameters
- ----------
- formulae : list of dictionaries
- List of chemical formulae
-
- Returns
- -------
- formula_array : 2D array of floats
- Array of endmember formulae
-
- elements : List of strings
- List of elements
+ Parameters
+ ----------
+ formulae : list of dictionaries
+ List of chemical formulae
+
+ Returns
+ -------
+ formula_array : 2D array of floats
+ Array of endmember formulae
+
+ elements : List of strings
+ List of elements
"""
elements=[]
for formula in formulae:
@@ -257,18 +258,18 @@ def compositional_array(formulae):
def ordered_compositional_array(formulae, elements):
"""
- Parameters
- ----------
- formulae : list of dictionaries
- List of chemical formulae
-
- elements : List of strings
- List of elements
-
- Returns
- -------
- formula_array : 2D array of floats
- Array of endmember formulae
+ Parameters
+ ----------
+ formulae : list of dictionaries
+ List of chemical formulae
+
+ elements : List of strings
+ List of elements
+
+ Returns
+ -------
+ formula_array : 2D array of floats
+ Array of endmember formulae
"""
formula_array=np.zeros(shape=(len(formulae), len(elements)))
for idx, formula in enumerate(formulae):
More information about the CIG-COMMITS
mailing list