@@ -12,18 +12,17 @@ class TriAnalyzer:
1212 """
1313 Define basic tools for triangular mesh analysis and improvement.
1414
15- A TriAnalyzer encapsulates a :class:`~matplotlib.tri.Triangulation`
16- object and provides basic tools for mesh analysis and mesh improvement.
17-
18- Parameters
19- ----------
20- triangulation : :class:`~matplotlib.tri.Triangulation` object
21- The encapsulated triangulation to analyze.
15+ A TriAnalyzer encapsulates a `~matplotlib.tri.Triangulation` object and
16+ provides basic tools for mesh analysis and mesh improvement.
2217
2318 Attributes
2419 ----------
25- ` scale_factors`
20+ scale_factors
2621
22+ Parameters
23+ ----------
24+ triangulation : `~matplotlib.tri.Triangulation`
25+ The encapsulated triangulation to analyze.
2726 """
2827 def __init__ (self , triangulation ):
2928 cbook ._check_isinstance (Triangulation , triangulation = triangulation )
@@ -34,12 +33,10 @@ def scale_factors(self):
3433 """
3534 Factors to rescale the triangulation into a unit square.
3635
37- Returns *k*, tuple of 2 scale factors.
38-
3936 Returns
4037 -------
41- k : tuple of 2 floats (kx, ky )
42- Tuple of floats that would rescale the triangulation :
38+ k : (float, float )
39+ Scaling factors (kx, ky) so that the triangulation
4340 ``[triangulation.x * kx, triangulation.y * ky]``
4441 fits exactly inside a unit square.
4542
@@ -52,7 +49,7 @@ def scale_factors(self):
5249
5350 def circle_ratios (self , rescale = True ):
5451 """
55- Returns a measure of the triangulation triangles flatness.
52+ Return a measure of the triangulation triangles flatness.
5653
5754 The ratio of the incircle radius over the circumcircle radius is a
5855 widely used indicator of a triangle flatness.
@@ -61,22 +58,21 @@ def circle_ratios(self, rescale=True):
6158
6259 To avoid unduly low values due to a difference of scale between the 2
6360 axis, the triangular mesh can first be rescaled to fit inside a unit
64- square with :attr: `scale_factors` (Only if *rescale* is True, which is
61+ square with `scale_factors` (Only if *rescale* is True, which is
6562 its default value).
6663
6764 Parameters
6865 ----------
6966 rescale : bool, default: True
7067 If True, a rescaling will be internally performed (based on
71- :attr: `scale_factors`, so that the (unmasked) triangles fit
68+ `scale_factors`, so that the (unmasked) triangles fit
7269 exactly inside a unit square mesh.
7370
7471 Returns
7572 -------
7673 circle_ratios : masked array
77- Ratio of the incircle radius over the
78- circumcircle radius, for each 'rescaled' triangle of the
79- encapsulated triangulation.
74+ Ratio of the incircle radius over the circumcircle radius, for
75+ each 'rescaled' triangle of the encapsulated triangulation.
8076 Values corresponding to masked triangles are masked out.
8177
8278 """
@@ -121,7 +117,7 @@ def circle_ratios(self, rescale=True):
121117
122118 def get_flat_tri_mask (self , min_circle_ratio = 0.01 , rescale = True ):
123119 """
124- Eliminates excessively flat border triangles from the triangulation.
120+ Eliminate excessively flat border triangles from the triangulation.
125121
126122 Returns a mask *new_mask* which allows to clean the encapsulated
127123 triangulation from its border-located flat triangles
@@ -137,15 +133,14 @@ def get_flat_tri_mask(self, min_circle_ratio=0.01, rescale=True):
137133
138134 Parameters
139135 ----------
140- min_circle_ratio : float, optional
136+ min_circle_ratio : float, default: 0.01
141137 Border triangles with incircle/circumcircle radii ratio r/R will
142- be removed if r/R < *min_circle_ratio*. Default value: 0.01
143- rescale : bool, optional
138+ be removed if r/R < *min_circle_ratio*.
139+ rescale : bool, default: True
144140 If True, a rescaling will first be internally performed (based on
145- :attr:`scale_factors` ), so that the (unmasked) triangles fit
146- exactly inside a unit square mesh. This rescaling accounts for the
147- difference of scale which might exist between the 2 axis. Default
148- (and recommended) value is True.
141+ `scale_factors`), so that the (unmasked) triangles fit exactly
142+ inside a unit square mesh. This rescaling accounts for the
143+ difference of scale which might exist between the 2 axis.
149144
150145 Returns
151146 -------
@@ -206,11 +201,11 @@ def _get_compressed_triangulation(self, return_tri_renum=False,
206201
207202 Parameters
208203 ----------
209- return_tri_renum : bool, optional
204+ return_tri_renum : bool, default: False
210205 Indicates whether a renumbering table to translate the triangle
211206 numbers from the encapsulated triangulation numbering into the
212207 new (compressed) renumbering will be returned.
213- return_node_renum : bool, optional
208+ return_node_renum : bool, default: False
214209 Indicates whether a renumbering table to translate the nodes
215210 numbers from the encapsulated triangulation numbering into the
216211 new (compressed) renumbering will be returned.
0 commit comments