Skip to content

Commit

Permalink
Update TAS diagram references
Browse files Browse the repository at this point in the history
  • Loading branch information
morganjwilliams committed Nov 15, 2022
1 parent f48f1a4 commit fd08f27
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 8 deletions.
18 changes: 13 additions & 5 deletions pyrolite/plot/templates/TAS.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

from ...util.classification import TAS as TASclassifier
from ...util.log import Handle
from ...util.meta import (sphinx_doi_link, subkwargs,
update_docstring_references)
from ...util.meta import sphinx_doi_link, subkwargs, update_docstring_references
from ...util.plot.axes import init_axes

logger = Handle(__name__)
Expand All @@ -13,7 +12,8 @@
@update_docstring_references
def TAS(ax=None, relim=True, color="k", add_labels=False, which_labels="ID", **kwargs):
"""
Adds the TAS diagram from Le Bas (1992) [#ref_1]_ to an axes.
Adds the TAS diagram to an axes. Diagram from Middlemost (1994) [#ref_1]_,
a closed-polygon variant after Le Bas et al (1992) [#ref_2]_.
Parameters
----------
Expand All @@ -35,7 +35,12 @@ def TAS(ax=None, relim=True, color="k", add_labels=False, which_labels="ID", **k
References
-----------
.. [#ref_1] Le Bas, M.J., Le Maitre, R.W., Woolley, A.R., 1992.
.. [#ref_1] Middlemost, E. A. K. (1994).
Naming materials in the magma/igneous rock system.
Earth-Science Reviews, 37(3), 215–224.
doi: {Middlemost1994}
.. [#ref_2] Le Bas, M.J., Le Maitre, R.W., Woolley, A.R. (1992).
The construction of the Total Alkali-Silica chemical
classification of volcanic rocks.
Mineralogy and Petrology 46, 1–22.
Expand Down Expand Up @@ -63,4 +68,7 @@ def TAS(ax=None, relim=True, color="k", add_labels=False, which_labels="ID", **k
return ax


TAS.__doc__ = TAS.__doc__.format(LeBas1992=sphinx_doi_link("10.1007/BF01160698"))
TAS.__doc__ = TAS.__doc__.format(
LeBas1992=sphinx_doi_link("10.1007/BF01160698"),
Middlemost1994=sphinx_doi_link("10.1016/0012-8252(94)90029-9"),
)
16 changes: 13 additions & 3 deletions pyrolite/util/classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,8 @@ def add_to_axes(
@update_docstring_references
class TAS(PolygonClassifier):
"""
Total-alkali Silica Diagram classifier from Le Bas (1992) [#ref_1]_.
Total-alkali Silica Diagram classifier from Middlemost (1994) [#ref_1]_,
a closed-polygon variant after Le Bas et al (1992) [#ref_2]_.
Parameters
-----------
Expand All @@ -351,11 +352,17 @@ class TAS(PolygonClassifier):
References
-----------
.. [#ref_1] Le Bas, M.J., Le Maitre, R.W., Woolley, A.R. (1992).
.. [#ref_1] Middlemost, E. A. K. (1994).
Naming materials in the magma/igneous rock system.
Earth-Science Reviews, 37(3), 215–224.
doi: {Middlemost1994}
.. [#ref_2] Le Bas, M.J., Le Maitre, R.W., Woolley, A.R. (1992).
The construction of the Total Alkali-Silica chemical
classification of volcanic rocks.
Mineralogy and Petrology 46, 1–22.
doi: {LeBas1992}
"""

def __init__(self, **kwargs):
Expand Down Expand Up @@ -675,7 +682,10 @@ def __init__(self, **kwargs):
super().__init__(**poly_config)


TAS.__doc__ = TAS.__doc__.format(LeBas1992=sphinx_doi_link("10.1007/BF01160698"))
TAS.__doc__ = TAS.__doc__.format(
LeBas1992=sphinx_doi_link("10.1007/BF01160698"),
Middlemost1994=sphinx_doi_link("10.1016/0012-8252(94)90029-9"),
)
USDASoilTexture.__doc__ = USDASoilTexture.__doc__.format(
Thien1979=sphinx_doi_link("10.2134/jae.1979.0054")
)
Expand Down

0 comments on commit fd08f27

Please sign in to comment.