Paleopiezometry and paleowattometry studies are essential to validate models
of lithospheric deformation and therefore increasingly common in structural
geology. These studies require a single measure of dynamically
recrystallized grain size in natural mylonites to estimate the magnitude of
differential paleostress (or the rate of mechanical work). This contribution
tests the various measures of grain size used in the literature and proposes
the frequency peak of a grain size distribution
as the most robust estimator for paleopiezometry or paleowattometry studies.
The novelty of the approach
resides in the use of the Gaussian kernel density estimator as an
alternative to the classical histograms, which improves reproducibility. A
free, open-source, easy-to-handle script named

Dynamic recrystallization was originally defined by Poirier and Guillopé (1979) as “a deformation-induced reworking of grain sizes, shapes and/or orientations with little or no chemical change”. Because this definition does not make a clear distinction of how to discriminate between dynamic recrystallization and metamorphic reaction in some cases (e.g. feldspar neocrystallization during deformation), it was later re-defined by Stunitz (1998) as “the reconstruction of crystalline material without a change in chemical composition driven by strain energy in the form of dislocations”. Two processes of dynamic recrystallization have been identified (see a review in Urai et al., 1986 and references therein): (1) grain boundary migration (Poirier and Guillopé, 1979) and (2) progressive sub-grain rotation (Poirier and Nicolas, 1975). The activation of these recrystallization processes depends on several factors, such as temperature, pressure, strain rate and presence of fluids. The interaction between both recrystallization types produces three identifiable types – when host grain occurs – of dynamic recrystallization microstructures: (1) bulging recrystallization, (2) sub-grain rotation and (3) grain boundary migration (see Stipp et al., 2002 for details).

Paleopiezometers are structural features of deformed rocks that vary with the magnitude of the applied differential stress under which they formed and that therefore provide a means of determining the magnitude of the paleostress (Twiss and Moores, 2007). Specifically, these methods apply to rocks deformed by dislocation creep, a dominant deformation mechanism in the mid-lower crust. Three different microstructural elements can be potentially used to infer stress: (i) the dislocation density (Goetze and Kohlstedt, 1973; Mercier et al., 1977; Kohlstedt and Weathers, 1980), (ii) the mean sub-grain diameter (Bird et al., 1969; Twiss, 1977; Mercier et al., 1977; Karato et al., 1980) and (iii) the mean dynamically recrystallized grain size (Twiss, 1977; Mercier et al., 1977). The recrystallized grain size is the most reliable and easily measurable microstructural feature and by far the most frequently used feature to estimate paleostress in mylonites.

The estimations of differential stress assume that rocks under study deform by dislocation creep at constant stress and that they reach a mechanical steady-state creep. During this stage, rocks evolve to a stable mean grain size, as it has been experimentally demonstrated in different materials and rocks (Means, 1983; Ree, 1991; Pieri et al., 2001; Barnhoorn et al., 2004; Stipp et al., 2006) as well as inferred in natural mylonites (e.g. Michibayashi, 1993; Herwegh et al., 2005).

Currently, there is no universally accepted theory to explain the
relationship between dynamically recrystallized grain size and deformation
conditions (see De Bresser et al., 2001; Austin and Evans, 2007; Shimizu,
2008; Platt and Behr, 2011). Some experimental studies suggest an inversely
related relation between the mean grain size (

Despite the disagreement in establishing the controlling variables and the differences in understanding of the underlying physical processes, the estimation of a representative measure of grain size and the grain size distribution in dynamically recrystallized mylonites remains two of the most important microstructural features to determine. The mean grain size or other single measures of grain size are necessary for paleopiezometer or paleowattometer studies, while the grain size distribution provides additional rheological information to unravel the contribution of different deformation mechanisms during deformation (e.g. Ter Heege et al., 2002; Herwegh et al., 2005). Given that direct measurement of differential stresses within the lower crust or the lithospheric mantle remains elusive (see Kozlovsky, 1987, and Emmermann and Lauterjung, 1997, for the current limits reached so far), paleopiezometry and paleowattometry studies of ancient mylonitic rocks, being meanwhile exhumed, are the key to constrain indirectly overall strength in the lower crust and the lithospheric mantle and, therefore, to provide mechanical constraints in the modelling of lithospheric deformation.

Briefly, the methods for measuring grain size can be separated into three groups (Berger et al., 2011): (i) 1-D data (i.e. line intercept methods, number of grains per unit area or grain boundary density), (ii) 2-D data (based on the estimation of individual grain features using image analysis tools) and (iii) 3-D methods (computed tomography, serial sectioning). In the early studies, dominated by 1-D methods, usually the mean grain size was reported. This established a tendency and nowadays the mean grain size is by far the most used parameter in paleopiezometry studies. Other parameters were also used, such as the median grain size (geometric mean) and lately, with the rise of 2-D methods, the peak of the frequency of the distribution (usually poorly referred to as the mode). A question remains about which single measure of grain size is the best estimator for paleopiezometry or paleowattometry studies. As an example, Ranalli (1984) proposed the use of the median over the mean grain size based on probabilistic considerations, but the median grain size is barely used in the literature (e.g. Post and Tullis, 1999; Stipp and Tullis, 2003; Ter Heege et al., 2005; Shimizu, 2008). Because the key in paleopiezometry is reproducibility across studies (see for example Stipp et al., 2010), it is necessary to address this question.

The main objective of this study is to decide which single measure of grain size, obtained by 2-D methods, is the best for paleopiezometer or paleowattometer studies. The starting point of the analysis are the different measures of grain size that can be obtained once the data have been acquired from thin sections. For data acquisition, segmentation of grains and the derivation of the actual grain size distribution from thin sections the reader is referred to the extensive literature in the topic (e.g. Heilbronner and Bruhn, 1998; Higgins, 2000, 2006; Berger et al., 2011; Heilbronner and Barret, 2014).

To test the different measures of grain size previously used in literature,
we propose a new tool – a script – to process the data produced by any image
analysis software (

The script implemented meeting the following criteria: (i) it is written in a free and easy-to-access programming language that runs all different platforms (Windows, Mac OS X, Linux, Unix); (ii) its use does not require any knowledge of programming to use (i.e. user-friendly); (iii) it provides a free and open-source code organized in a modular way, making it easier to modify, reuse or extend the code; and (iv) it produces the numerical results required and ready-to-publish figures.

The following provides a review of how to describe the grain size of individual grains in dynamically recrystallized mylonites, which are the effects of cutting grains in thin sections and the parameters of which can be used to measure the grain size population for paleopiezometric studies. The selected examples introduce some important concepts, such as the cut-section or the intersection probability effects. The reader is referred to the following textbooks for more details (Higgins, 2006; Heilbronner and Barret, 2014).

Since we are dealing with real volumes, 3-D grain size estimation would be most desirable. However, 3-D methods are still far from being standard techniques mainly due to being very time consuming and involving relatively expensive data acquisition equipment (synchrotron- or X-ray-based tomography). In addition, 3-D methods are not always applicable, especially in dynamically recrystallized mylonites in which most of the grains in contact are of the same phase (although synchrotron can discriminate crystallographic orientations and therefore deal with this issue).

The most widely used analysis techniques in literature to measure the mean grain size in dynamically recrystallized rocks, ceramics or alloys are 1-D methods, especially the line intercept method (e.g. Abrams, 1971; Karato, 1980; Rutter, 1995; Post and Tullis, 1999). However, these methods only report one value (1-D), usually the mean grain size, without considering the distribution of apparent grain sizes. As shown below, this circumstance severely limits its utility, since the knowledge of the distribution of grain sizes (or apparent grain sizes) allows the user to anticipate some possible issues, such as multimodal population or outliers, that may result in misleading interpretations (e.g. Heilbronner and Bruhn, 1998; Higgins, 2000, 2006; Berger et al., 2011). Another severe limitation is that 1-D methods only apply in case of monomineralic aggregates or samples (at thin-section scale). Finally, 1-D grain size measures cannot be used to derive the actual distribution of grain sizes from thin sections.

Nowadays, with the increase in computer power, the more efficient way to
estimate the grain size features in deformed rocks is the use of 2-D methods
(see Heilbronner and Bruhn, 1998; Herwegh, 2000; Berger et al., 2011). These
methods segment grain sectional areas, allowing the calculation of grain
area, grain orientations, grain elongations and grain surfaces via image
analysis techniques. To perform this task, there are several free
image-processing programs available, such as

To obtain a grain size value from a thin section it is first necessary to
choose a correct parameter to describe the 2-D size of the
grains. There are several parameters, such as the mean calliper diameter,
the major or minor axis of an ellipse fitted to an individual grain or the
maximum length (see Exner, 1972; Higgins, 2006; Heilbronner and
Barret, 2014). When particles are expected to be spherical or close to a
spherical shape (near-equant grains), its 3-D size can be uniquely
characterized by diameter (or the average diameter when they are not
perfect spheres). In this case, a common way to proceed is to convert the
cross-sectional area of each individual grain into an individual 1-D length
via the equivalent circular diameter (

The simplest end-member distribution where all grains have identical shape (in this case spheres) and size is called a monodisperse distribution. In this model, it is also assumed that the grains are randomly distributed within the rock volume (statistically homogeneous) and with no interaction between them (i.e. there is no “grain packing”). When a monodisperse aggregate of grains is cut randomly, as may be the case in a thin section, the intersection plane rarely cuts exactly through the centre of each grain and the cut-section effect occurs (Fig. 1). In this case, the diameters obtained from the sectional areas represent a population of apparent diameters that can theoretically vary between 0 and the actual diameter of the grains (Fig. 1). In perfect monodisperse populations, the maximum diameter obtained from the data set would be the closest to the actual 3-D diameter. In fact, when monodisperse populations of grains are expected, the largest grain size in thin section can be theoretically used as a single measure of grain size. The accuracy of this estimate depends on choosing an appropriate sample size for the accuracy we are looking for (see Appendix A for details). Unfortunately, dynamic recrystallization in rocks, ceramics and alloys produces a continuous range of dynamically recrystallized grain sizes instead of a unique grain size (see later). Hence, this parameter is not useful as a single descriptor of grain size and will not be considered anymore.

An alternative approach is to look at the distribution of apparent grain diameters obtained from thin sections. There are several ways to represent this type of data (see Higgins, 2006); here two of the most typical will be considered: the numerical density distribution of apparent diameters obtained in a histogram plot, known as the number-weighted plot (Fig. 2a), and the area percentages of equivalent diameters in a bar plot (i.e. the sum of the areas of the grains respect to the total for each grain size interval defined) (Fig. 2b), known as the area-weighted plot (Herwegh, 2000; Berger et al., 2011). A number of parameters can quantify the grain size from the apparent grain size populations: the mean grain size and the median grain size, both common using 1-D methods, but also the area-weighted grain size or the frequency peak of the distribution. In contrast to 1-D methods, the representation of data from the 2-D approach allows to envisage additional features of the complete population of apparent grains. As it will be shown later, this is a clear advantage allowing, for example, to visualize whether there is more than one population of grains or other possible sources of bias.

Grain size distribution plots produced by cutting a sphere of the
same size randomly (monodisperse system).

Following the example of a monodisperse population of grains, Fig. 2 shows
that when a group of spheres is cut through randomly and assuming that there
is no packing, the probability of cutting sections at different size
intervals is not equal. This situation does not produce a uniform
distribution of grain sizes but a unimodal one (Fig. 2). Figure 2a also
reveals that the probability of cutting sections with lengths close to the
actual diameter of the grain is always higher. These theoretical
distributions show an extreme case of negative skewness (also known as

Another feature of a population of apparent grain sizes from a monodisperse distribution is that the actual diameter of the grain population is always within or close the most frequent class (or bin) of the histogram, that is, the modal interval (Fig. 2). Even when smaller bin sizes are selected, there is a significant difference between the modal interval and the next closest, the effect being more pronounced in the case of the area-weighted plot (Fig. 2b). As previously mentioned, the mean, the median, the area-weighted and the frequency peak can all be calculated from this distribution of apparent grain sizes. Their values are not equivalent to each other (see Fig. 2), but when the data set is representative there are quantifiable relations between them. For example, it can be proved that in the case of monodisperse distribution of spheres the actual diameter is 1.28 times the mean of the entire apparent diameter population (or the mean 0.79 times the actual diameter) or the area-weighted mean 0.88 times the actual diameter. This is also the reason why the mean or the median grain size obtained with 1-D methods was sometimes multiplied by a factor to estimate the actual (3-D) size (i.e. to convert the mean grain size into the actual size) (e.g. Exner, 1972; Panozzo, 1982). This strategy is erroneous not only because, as previously pointed out, grain size in dynamically recrystallized mylonites does not follow a monodisperse distribution but also due to other issues that will be seen later (see also Heilbronner and Bruhn, 1998).

The frequency peak of a grain size distribution by the modal interval is one of the statistical parameters also used to characterize the dynamically recrystallized grain size (e.g. Berger et al., 2011). However, the estimation of the modal interval compared to the mean or the median has the drawbacks inherent to the use of histograms: (1) it is necessary to define the same left edge of the bin and the same bin size/width (or number of classes) to yield reproducible results in similar populations, and (2) they are not smooth (i.e. exact values are not known as the data are grouped into classes). To use the frequency peak over the mean, the median or the area-weighted mean grain size in a distribution of grain sizes, it would be useful to overcome these constraints. In practice the actual left edge of the bin is set by the optical and image resolution limitations of the technique applied (Higgins, 2006), which means that varies across different studies. However, the actual theoretical left edge of the bin is 0, so that by setting this lower boundary reproducibility is improved.

Plots showing the effect of choosing different bin sizes for the
same data set. The monodisperse data set is formed by 5997 measurements. The
actual grain size, taken as a reference point, was set at 100 and the
absolute maximum uncertainty in measure within the data was set at

The discrete nature of histograms implies that the frequency peak relates to
a modal interval instead of to a single value. To convert this interval into a
single measure of grain size we have to choose which value within the
interval is best. However, in real cases there is no best value within the
modal interval and therefore any value can be used (Fig. 3). Some programs
(e.g.

The other critical factor to consider in histograms is the bin size/width. This parameter is directly related with the precision of the frequency peak in a distribution of grain (or apparent grain) sizes (Fig. 3). If the bin size is large, a gain or loss of accuracy occurs at the expense of precision. However, if a small bin size is selected, then misleading results are more likely (e.g. the bin size must not exceed the measurement uncertainty in data).

In summary, for a particular population of apparent sizes of grains, when the left edge of the bin and the bin size are the same, the limits of the modal interval will also be the same (Fig. 3). If the frequency peak is used as estimator of grain size, these values may be fixed for all apparent grain size populations to improve reproducibility. However, establishing a fixed bin size can produce misleading results due to over- or under-smoothing the appearance of the population. It is necessary to find an adequate balance between reproducible results and a bin size that allows to envisage important features of the population. For this, the implementation of an automatic process – an algorithm – that sets an optimal bin size based on the features of the population under study is ideal.

To avoid the implicit discontinuous nature of histograms in identifying the frequency peak in a distribution of grains sizes, an alternative approach is proposed: the Gaussian kernel density estimator. The Gaussian KDE is, like the histogram, a non-parametric density estimator, but it is smooth and independent of end points (Fig. 4). The interpretation of the data distribution still depends on the bandwidth chosen (the equivalent to the histogram's bin size/width), which strongly influences the shape of the Gaussian KDE and, therefore, the location of the peak value. It is therefore necessary to implement a reliable method to perform this task. In any event, there are plenty of methods to find the optimal kernel bandwidth in literature depending on the expected features of the data set (see Scott, 1992; Turlach, 1993; Bashtannyk and Hyndman, 2001). The use of the Gaussian KDE also has the advantage that it does not provide an interval, as in the case of histograms, but a unique value (the peak value) that represents the most likely value of dynamically recrystallized grain size in a population of grains. This approach prevents from having to choose a value within the modal interval to estimate the frequency peak, ultimately improving reproducibility.

Ideal monodisperse grain size populations, such as the one described in
Sect. 2.3, do not exist in natural or experimentally deformed samples. In
fact, previous grain size studies of dynamically recrystallized mylonites
never show number-weighted plots of apparent grain sizes with

Populations of grains that show similar shapes but different values of grain size are referred to as polydisperse systems (e.g. Higgins, 2000). These distributions can be unimodal or multimodal, depending on the number of local frequency peaks within the distribution. When we try to derive 3-D parameters from 2-D measurements in polydisperse systems, another effect to be considered beside the cut-section effect is called the intersection-probability effect (e.g. Higgins, 2000). This effect refers to larger grains being more likely to be represented on a plane section since they are more likely to be hit by the section plane. In other words, grains are hit by the section plane with a probability that is proportional to their diameters.

The Gaussian kernel density estimator is a function that stacks a Gaussian “bell curve” on top of each measurement and whose standard deviation, determined by the local probability density, defines the bandwidth (the equivalent to the histogram's bin size/width).

The case of the multimodal distributions of grain size in mylonites is
common in the literature. For example, bimodal distributions are typical of
two-phase mylonites, in which the two phases reach under similar deformation
conditions a different dynamically recrystallized steady-state mean grain
size. Other examples of bimodal distributions at thin-section scale have
been reported in monomineralic samples, such as in experimentally
deformed Carrara marble samples at large strains and high temperature
(Barnhoorn et al., 2004) or in quartzitic mylonites with different slip
systems operating simultaneously, in which quartz grains with

So far it is not clear what type of continuous polydisperse distribution best describes the steady-state dynamically recrystallized grain size population. Log-normal distributions appears to be one of the most suitable candidates (e.g. Ranalli, 1984; Michibayashi, 1993; Newman, 1994). However, the lack of sufficient studies in this regard prevents us from simulating log-normal grain size population for now, given that the typical parameters that describe natural or experimentally deformed dynamically recrystallized mylonites are unknown and the issue on how grain packing affects the distribution of apparent grain sizes remains unresolved.

For simplicity, a discrete population of grains with two sizes will be considered and then the cut-section and intersection probability effects will be applied to generate a bimodal population of apparent grains (see Appendix B for details). This bimodal discrete model, although unrealistic for dynamically recrystallized mylonites, is useful to show some of the consequences of the application of both effects in the acquisition of size parameters. Another advantage of this model, despite its simplicity, is that the interpretations apply to real cases.

Grain size distribution plots of a bimodal discrete population consisting of a 60 / 40 % mixture of spherical particles with sizes 100 and 120 respectively. The contribution in volume is 46.5 / 53.5 % respectively. The two local maxima in both plots indicate the existence of two populations of spheres with sizes specified by the local maxima. Both plots show different modal intervals due to the different approaches (see Sect. 2.2). The area-weighted plot locates the modal interval in the population that represents the major/main phase (i.e. the volumetric contribution).

Figure 5 shows that the relative abundance of two sizes of grains in a rock
is not equal to the relative frequency with which these grains will be
observed on a section plane. Thus, the relative frequency of the modal
interval, which represents 60 % of the population in number, is not 1.5
times the relative frequency of the local modal interval that represents the
40 % fraction in number. This is Delesse's principle (Delesse, 1847,
1848), which shows that

Figure 5 also shows that in bimodal (or multimodal) distributions the mean, the median or the area-weighted mean grain size becomes a meaningless parameter to describe the grain size. In contrast, the local modal intervals (i.e. the local maxima) reflect the frequency peak of the different grain size populations, provided that the resolution of the method allows it.

The script is written in Python, a general-purpose high-level interpreted programming language characterized by a clear syntax and ease of learning. The main advantages of Python programming language are that (i) Python is free and open-source; (ii) the underlying computer language runs on all platforms (Windows, Mac OS X, Linux or Unix); (iii) there is a large number of open and freely available scientific libraries providing an environment for algorithm development, data analysis, data visualization and numeric computation; and (iv) the use of Python is becoming increasingly popular in academia.

The script, named

The script is organized in a modular way using Python functions. This facilitates the modification, reuse or extension the code and allows specifications of each function. In the specifications, the user will find the assumptions made, the conditions that must be met for the inputs and the result/s obtained for each one.

The script can be divided into three main parts or functions with intuitive and self-explanatory names.

The first part is a function called “importdata” responsible for loading the data set into the memory for subsequent treatment. The data have to be previously stored in a text file such as txt (a datum on each line) or csv (comma-separated values).

The second part is a function called “calc_diameters” that returns an array of the diameters calculated from the sectional areas, assuming that the grains are near-equant objects. If applicable, it also allows us to correct the grain sizes calculated by adding the perimeter of the grains not previously included in the image analysis.

The third part is a function called “find_grain_size” that returns the number and area-weighted plots. It can also produce the mean, the median and the area-weighted mean, the location of the Gaussian kernel density estimator peak, the modal intervals and their middle values produced by both approaches. Additional relevant information such as the bin size and the Gaussian KDE bandwidth estimated are also provided.

The procedure implemented within the script to estimate the frequency peak of the population is briefly explained below.

As portrayed above and shown in Fig. 3, choosing a different bin size (or
number of classes) could lead to a different interpretation of the
distribution of data and, therefore, different results. To ensure
reproducibility, the idea behind the script is that for similar populations
similar bin sizes need to be used. As far as possible manual data
manipulation steps is kept to a minimum and an algorithm estimates on its
own the optimal bin size. Although there is no best number of bins, there
are some guidelines or rules of thumb to determine the optimal number of
bins.

The script implements the Gaussian kernel density estimator within the number-weighted plot. It finds and returns the peak value of the KDE function; this is, the most likely value of dynamically recrystallized grain size in a number-weighted frequency plot. To estimate the optimal bandwidth of the Gaussian KDE we use the Silverman rule of thumb method (Silverman, 1986), since such a method works well for univariate systems with unimodal densities (Turlach, 1993; Bashtannyk and Hyndman, 2001). The implementation also allows to use the Silverman rule multiplied by a constant to modify the bandwidth for comparative purposes.

To test which measure of grain size gives the best estimate of the differential stress (or rate of mechanical work), the first step is to estimate how the introduction of different errors affect the different measures of grain size implemented within the script. For this purpose, the strategy is to simulate populations of apparent grain sizes with the introduction of different sources of errors and then see how the results depart from the expected values.

For simplicity and to take advantage of the model presented in Fig. 2, the populations of grains considered will be discrete monodisperse 3-D populations of grain size. As previously explained, although this model is unrealistic to simulate grain size populations of real dynamically recrystallized mylonites, its simplicity is convenient to show the effects of different sources of error and the interpretations made can be transferred directly to real cases. A calibration of the different measures of grain size against a real sample will be shown later. The details of the simulation of apparent grain size populations from the discrete monodisperse 3-D populations with different sources of errors can be found in Appendix B.

Results of the Monte Carlo simulations to find the number of
grains necessary to achieve reproducibility using a natural dynamically
recrystallized mylonite (sample MAL-05) and the mean grain size.

The introduction of non-recrystallized grains within the population of apparent grains is likely to bias the distribution of grain sizes. These grains have actual sizes larger than the recrystallized fraction but, due to the cut-section effect, may reach sizes similar to the apparent grain size population. Furthermore, assuming that the recrystallization is not complete, these larger grains are expected to be more likely in thin sections due to the intersection probability effect. Figure 6a and b illustrate a situation in which 20 % of the grains are non-recrystallized grains (i.e. larger in 3-D than the recrystallized grains) which were randomly cut and introduced in the population of apparent grain sizes. The mean, the median and the area-weighted mean are affected by the introduction of these outliers, shifting these parameters to higher values. In contrast, the frequency peak remains fixed provided that the bin size and/or the bandwidth chosen are the same (in case of histograms also the left edge of the bin).

Another non-negligible artefact arises when the smallest grain sizes are not measured due to optical and image resolution limitations of the technique applied (Higgins, 2006; Berger et al., 2011). In real distributions the smallest values reflect the resolution limitations of the applied techniques to acquire the data instead of tending to 0 as they would in theory. This effect tends to systematically slightly shift the mean, the median and the area-weighted mean grain size to higher values (Fig. 6c). The amount of shifting is variable across studies since it depends on the technique (optical microscopy or SEM) and the image resolution chosen. However, the frequency peak is not affected by this source of error.

Figure 6c and d show another non-negligible source of error in real
samples: the effect of uncertainty in grain measurement (see Appendix B for
details). In this case, the apparent population of grain sizes shows sizes
above the actual diameter of recrystallized grains, modifying the ideal

Quartz microstructure in sample MAL-05.

It is important to note that the examples portrayed here are just end-member situations. In the study of real samples a combination of different sources of bias in the determination of dynamically recrystallized grain size is expected. To conclude, the variations in the estimate of the mean, the median and the area-weighted mean shown in Fig. 6 are proof that these parameters are not reliable when the presence of outliers is significant. In contrast, the frequency peak (either modal interval or Gaussian KDE) is less prone to errors introduced by outliers and by the limitations of resolution in the technique applied to acquire the data compared to the other parameters. However, the methods to estimate the frequency peak suffer from its own limitations, especially the method based on the modal interval (see Sect. 2).

Before testing the script in natural samples and against other software available, it is necessary to consider the number of grains needed to achieve reproducibility. Previous studies stated that more than 500 grains are necessary for dynamically recrystallized grain size analysis (Heilbronner and Bruhn, 1998; Heilbronner, 2000). Since these studies did not explicitly address how they estimated the minimum number of grains needed for dynamically recrystallized grain size analysis, we assume these numbers rely solely on practical experience and are not derived by some theoretical underlying principle.

With the aim of solving this issue a Monte Carlo simulation was implemented to determine the minimum necessary sample size from a theoretical point of view. As stated above, at present we do not have sufficient knowledge about the type of distribution and the typical values that characterize the recrystallized grain size population in mylonites. Therefore, it is not possible to simulate in a reliable way synthetic populations of dynamically recrystallized grain sizes. To overcome this, a large data set of natural dynamically recrystallized deformed aggregate can be used. The strategy – known as bootstrapping – is to perform a random resampling of the data set chosen. For this approach, we use a population of dynamically recrystallized quartz grains measured in a naturally deformed granite with a population of 2945 grains (sample MAL-05, see below for details; Sect. 6). The sample is expected to contain a number of grains well above the minimum required. The next step is to test how the number of grains measured (or sample size) affects the estimation of the mean grain size by comparing all the results obtained for a particular sample size estimating the coefficient of variation.

Steps for obtaining the cross-sectional areas of the grains using
the

The given condition of the Monte Carlo simulation is based on the typical
uncertainty of grain measurements. Berger et al. (2011) found that when
repeating the measurement procedure in the same targeted grain, the error
margins in the diameters calculated ranged between 1 and 4 %. Taking the
4 % error, the goal is to find the minimum number of grains needed so that
if the measurement is repeated a large number of times, nearly 95 %
(2-sigma) or 99 % (3-sigma) of the time the mean grain size obtained shows
a variation equal or less than 4 %. The condition is satisfied when the
number of analyzed grains are 433 for sigma-2 (

It needs to be taken into account that if anyone performs the same
simulation only one time they would probably obtain
slightly different a number of grains. This variability is explained by the random noise that
shows the coefficient of variation line (see the inset in Fig. 7b), which is
nearly parallel to the

Results for different parameters using different sub-data sets from the natural sample MAL-05.

To test whether the different measures of grain size implemented within the
script yield reproducible results, a data set from a natural mylonitic
granite sample (named MAL-05) was used. The mylonite comes from a
crustal-scale extensional shear zone, the Vivero fault (Lopez-Sanchez,
2013), deforming a coarse-grained two-mica granite with quartz
(

Results produced by the different script/software's considered using the whole data set of sample MAL-05.

Results of

The strategy to check reproducibility was as follows. Dynamically recrystallized grain size areas were measured and their apparent diameters derived from four different locations belonging to two thin sections of the same sample (sample MAL-05). There are no significant differences in the grain size population between the different selected locations within the thin section. The number of grains measured in each image meet the requirements portrayed in Sect. 5. The reproducibility was tested by comparing the results obtained in each of the images measured (or a combination thereof). The results of the comparison between parameters in terms of stability and robustness to estimate the dynamically recrystallized grain size are summarized in Table 2 and Figs. 9 and 10.

The worst results were obtained using the middle values of the modal intervals, with variations from 3.3 to 5.0 % in average and coefficients of variation from 0.039 to 0.058 (Table 2). In some cases errors obtained were up to 10.6 %. In contrast to this, the Gaussian KDE peak, the mean, the median and the area-weighted yield better reproducible results, with variations from 0.3 to 1.3 % in average (Table 2). The Gaussian KDE peak, the median and the area-weighted mean yielded similar results in average (1.0–1.3 %), while the mean yielded in this case slightly better results (0.3 %). The maximum errors obtained were always below 4 %: 3.8 in the area-weighted mean, 2.6 in the median, 1.9 in the Gaussian KDE peak and 0.8 in the mean (Table 2).

Testing reproducibility of

The results show that the Gaussian KDE peak, the mean, the median and the area-weighted grain size have comparable quality as grain size estimators. Therefore, any of them can be theoretically used for paleopiezometry or paleowattometry studies. This finding contrasts with the results obtained in the simulations performed in the Sect. 4.1, which indicated that, because of the introduction of different sources of error, the Gaussian KDE would theoretically produce the best results. This result might be explained by the fact that when the sample size chosen is large enough, the effects by outliers are significantly reduced.

The results obtained with the

Estimated actual 3-D grain size distribution from sample MAL-05
performed with

A remarkable inference can be drawn from this comparative. Although the relative probability of the frequency peak between the populations of apparent (2-D) and actual (3-D) grain size distributions is different, its location coincides within the error. In other words, the location of the Gaussian KDE peak in the apparent grain size populations indicates the actual location of the frequency peak of the 3-D grain size population. In consequence, the frequency peak as a grain size estimator produces similar results whether obtained from apparent (2-D) or actual (3-D) grain size distributions. In contrast, the other grain size parameters produce different results, depending on whether grain size populations derive from 2-D or 3-D observations.

Several measures of grain size have been tested in order to discriminate the
best estimate for paleopiezometry or paleowattometry studies, including for the
first time the peak of the Gaussian KDE. The simulations performed on a
natural sample indicated that the grain size parameters based on the modal
intervals of the histogram yield the worst estimations, while the mean, the
peak of Gaussian KDE, the median and the area-weighted mean grain size are
equally well suited for describing grain size. However, the peak of the
Gaussian KDE has several advantages over the others parameters.

It is potentially less prone to be shifted by the presence of outliers or due to resolution limitations in the acquisition of the data.

It yields comparable results, either considering a population of apparent 2-D grain sizes or the actual population of 3-D grain sizes. This could be useful in the future for comparative purposes if a method capable of measuring directly the actual 3-D grain size distribution becomes mainstream.

In case of multimodal grain size distributions in which the different populations of grain size cannot be separated, only the frequency peak is useful.

The results produced by the Gaussian KDE peak are different to those obtained in the past, aiming to establish a correlation between dynamically recrystallized grain size and differential stress in experiments that mainly used logarithmic and square root mean grain size using 1-D methods. Therefore, the use of this measure of grain size requires the recalibration of the paleopiezometer (or paleowattometer). As shown in Berger et al. (2011), an option in these cases is to use an empirical conversion matrix to relate the different parameters of grain size. However, as shown in Fig. 6, this is not an optimal approach since different measures of grain size are affected in a different way by different source of errors. The consequence is that no fully reliable correlation can be established among them since the introduction of errors change across studies. In conclusion, the best practice would be to create a database using the frequency peak and following a strict protocol in different deformed minerals and deformation conditions from laboratory published experiments.

In the case of a perfect monodisperse population, the cross-section size
probability can be directly estimated using the following equation (Sahagian
and Proussevitch, 1998):

To simulate the cut-section effect, a user-defined number of random cuts are
generated (depending on the sample size desired) on a circle of unit radius.
The Python built-in function called

Model to generate apparent random sections through a sphere to
calculate the apparent diameter. Following the Pythagorean theorem, it is necessary to know
the radius (

In the case of simulating a monodisperse data set with outliers (e.g. Fig. 6a,
b), the procedure was as follows: first, the grain size, the sample size and
the ratio between the correct measures and the outliers are established.
Once the number of outliers that need to be added to the data set are
calculated, the code generates a defined number of grains with a random size
ranging from 1.01 to 1.5 times the recrystallized grain size defined
(e.g. if the actual grain size is set to 100 microns, the outlier grains
will range between 101 to 150 microns). The maximum limit has been set
arbitrarily at 1.5 times. Then, for each random grain created, a random
section is generated and added to the data set (see function

To generate a data set simulating uncertainty during measurement – as in the
Fig. 6c and d within the text– there are two approaches. One assumes that
the uncertainty of the data is independent of the size considered and the
other assumes that the measurement error is size dependent. Studies showed
that the last approach is the correct one (Gualda, 2006; Berger at al.,
2011). Berger et al. (2011) carried out a study involving repeated
measurements on several grains and found that the error in grain size varies
between 1 and 4 % for targeted grains but up to 15 % for smaller
grains. This tendency is in part due to optimizing the resolution for the
targeted grain sizes, resulting in considerable errors for the smallest
grain sizes. Taking this behaviour into account, the procedure simulates
such uncertainty as follows. First, it establishes the grain size, the
sample size and the uncertainty expected for the sectional areas. Then it
creates a number of random sections defined by the user. To generate the
uncertainty within the data set, (i) the maximum absolute error is calculated
taking into account the uncertainty desired, (ii) all the values below this
maximum error are removed to prevent negative values within the data set
during the addition of random errors (there is also a practical reason
following this strategy, since the uncertainty obtained during measurements
limits the actual optical and resolution limitations of the technique
applied) and, finally, (iii) a random error between 0 and the maximum
absolute error estimated with a random sign (i.e. positive or negative) is
generated and added for each value. It is assumed that the expected error
has a normal (Gaussian) distribution. Hence, the result is closer to the
actual value than the extreme values defined (see function

To simulate the intersection probability effect in case of polydisperse
populations, a large population of grains (say a million) is generated
with a defined distribution and then the individual volumes of each
grain and the total volume are calculated. At that point, assuming that the
probability of intersecting a particular grain is directly proportional to
its volume with respect to total volume, the individual volumes of the
grains are normalized with respect to the total volume. Finally, an array of
data with the cumulative sum of the elements is created. As an example,
imagine a list of three grains with diameters 2, 3 and 5 (i.e. [2, 3, 5]).
The volume of grains ([0.52, 4.19, 14.14]) is then normalized it to the
total volume (18.85), obtaining the following array [0.028, 0.222, 0.750].
Finally, a cumulative sum of elements is calculated [0.028, 0.25, 1.0]. Once
this array is created, a desired number of random values between 0.0 and 1.0
is generated. Each value obtained is used to find which grain is going to be
sectioned according to its probability (i.e. volume) using the list of
cumulative sum of elements created. Returning to the given example, when a
random value of 0.21 is obtained, the position in the cumulative list that
meets the following criteria value > 0.21 is 0.25, the second
position in the list. Therefore the grain to be picked and sectioned from
the original list of grain sizes is the grain located in the second
position, which has a diameter of 3. This procedure was repeated 5000 times
to create a large population of grains affected by the intersection
probability and, later, by the cut-section effect. Due to the notable
differences between the original population (10

The simulation of a bimodal discrete distribution (Fig. 6), uses a Python
function named

The code implemented to perform this task is shown in the Supplement file

The Monte Carlo simulation operates as follows:

Performing a random resampling (bootstrapping) of a large data set of
apparent grains belonging to a real mylonite, a representative number of
samples (say 2

To test the reproducibility of the results, the mean and the standard deviation of the data set for the current sample is calculated (i.e. the mean value and the standard deviation of the grain sizes obtained for each sample created).

In order to compare samples with different mean values, it is necessary
to view the standard deviation in the context of the mean. Hence, to
normalize the data obtained, a modified version of the coefficient of
variation (originally the standard deviation divided by the mean;

When the condition is satisfied, the sample size for the defined condition is reported and a number of plots showing the evolution of the mean, the standard deviation and the modified coefficient of variation throughout the process of increasing the sample size are generated.

Finally, due to the stochastic nature of the process, it was repeated 250 times to obtain the statistics of possible outcomes. On this basis, we estimated the 2-sigma standard deviation to set the minimum number of grains needed.

The code implemented to perform this task is shown in the attached file:

Marco A. Lopez-Sanchez designed the simulations, developed the Python code, interpreted the data and drafted the manuscript. Sergio Llana-Fúnez contributed with new ideas and tested the scripts independently during the preparation of the manuscript.

The study of the grain size distribution in dynamically recrystallized rocks was undertaken during the last stages of the PhD of the author. The PhD was funded by the Severo Ochoa predoctoral studentship (BP07-120) from the Asturias Government and the research by grant CGL2010-14890 from the Spanish Government. We thank Marco Herwegh and the editor Michael Stipp for insightful comments and suggestions that greatly improved the manuscript. A review of an earlier version of the manuscript by Petr Jeřábek is also acknowledged. Special Issue: “Deformation mechanisms and ductile strain localization in the lithosphere” Edited by: L. Menegon, G. Pennacchioni, M. Stipp, N. Mancktelow, and R. Law