Customised display of large mineralogical (XRD) data: Geological advantages and applications

X‐ray diffraction mineralogical analysis of geological sequences is a well‐established procedure in both academia and industry, rendering a large volume of data in short‐analytical time. Yet, standard data treatment and resulting interpretations present limitations related to the inherent complexities of natural geological materials (e.g. compositional variety, structural ordering), and are often time consuming and focussed on a very detailed inspection. Several alternatives were evaluated in terms of advantages and disadvantages to the main goal of generating a user‐friendly, fast and intuitive way of processing a large volume of X‐ray diffraction data. The potential of using raw X‐ray diffraction data to interpret mineralogical diversity and relative phase abundances along sedimentary successions is explored here. A Python based program was tailored to assist in raw data organisation. After this automated step, a 3D surface computation renders the final result within minutes. This single‐image representation can also be integrated with complementary information (sedimentary logs or other features of interest) for contrast and/or comparison in multi‐proxy studies. The proposed approach was tested on a set of 81 bulk and clay‐fraction diffractograms (intensity in counts per second—cps and respective angle—º2Ɵ) obtained from a Cenomanian mixed carbonate–siliciclastic stratigraphic succession, here explored by combining mineralogical (XY) and stratigraphic/geological information (Z). The main goal is to bypass preliminary data treatment, avoid time‐consuming interpretation and unintended, but common, user‐induced bias. Advantages of 3D modelling include fast processing and single‐image solutions for large volumes of XRD data, combining mineralogical and stratigraphic information. This representation adds value by incorporating field (stratigraphic/sedimentological) information that complements and contextualises obtained mineralogical data. Limitations of using raw intensity data were evaluated by comparison with the results obtained via other standard data interpretation methods (e.g. semi‐quantitative estimation). A visual and statistical contrast comparison confirmed a good equilibrium between computation speed and precision/utility of the final output.


| INTRODUCTION
The application of 3D modelling of X-ray powder diffraction (XRD) data highlights general patterns in mineralogical variability over (geological) time, allowing the identification of processes related to sediment supply and basin dynamics recorded at a given depositional setting and time. This approach is increasingly pertinent as technological advances allow for faster data collection and demand equally efficient data interpretation solutions.
From a geological point of view, XRD is among the best available techniques for a fast, affordable, simple and generally non-destructive means of identifying/quantifying minerals present in geological materials, clay-bearing or not (limestones, marls, sandstones, soil or others; Allen & Hajek, 1989;Bish et al., 2014;Chaudhri & Singh, 2012;Deconinck et al., 2003;Diebold et al., 1963;Ruffell & Wiltshire, 2004;Sandeep et al., 2017). The ability to accurately perform mineralogical identification is paramount for both academic (e.g. palaeoenvironmental research, Earth dynamics, mineralogy, forensic geology) and industry purposes (oil/ore exploration, construction, ceramics, among many others). This technique can be applied under clean laboratory conditions or even during field surveys, as portable XRD analysers are nowadays available. Mineral identification can be relatively simple using modern software, as good mineral databases currently allow the identification of single phase or poly-crystalline materials, native elements, alloys, organic compounds and/or organo-metallic compounds.
Nonetheless, for those dealing with natural samples this simplicity does not always apply, as these materials are commonly composed of multiple minerals, potentially affected by multi-stage processes, often also bearing structural disordered phases and/or structural diversity (e.g. lattice defects), impurities and/or variable chemical compositions (Bergaya & Lagaly, 2006;Brindley & Brown, 1980;Hillier, 2000;Moore & Reynolds, 1997;Śrondoń et al., 2001;Śrondoń, 2013). Despite great technological evolution over the last decades, the current availability of standards for thousands of material systems and the abundance of computer search/match software, an accurate qualitative and quantitative analysis of minerals remains a challenging task (recent review in Zhou et al., 2018; see also Brindley & Brown, 1980;McManus, 1991;Moore & Reynolds, 1997;Snyder & Bish, 1989;Wright et al., 1993). Evidencing the previous, several authors have designed customised approaches to diffractogram interpretation (Krumm, 1999;Wright et al., 1993). Pre-treatment of natural samples is also known to increase the uncertainty when dealing with XRD analysis. Grinding, homogenisation and frequently acid-leaching procedures are critical during this stage (Brewster, 1980;Cama et al., 2002;Coimbra et al., 2021;Cook, 1992;Śrondoń et al., 2001), and even more so when dealing with poly-mineralic samples bearing minerals with a broad range of hardness (e.g. quartz, calcite and/or dolomite).
Adding further complexity, XRD analyses generate a large dataset in a short period of time, as for example up to 150 samples/results per week for high resolution scanning profiles, using a fast detection system. Such a system can therefore generate hundreds of diffractograms comprising thousands of datapoints which enclose valuable information. Such information can address cost reductions of a given operation, task optimisation or the safety of on-site crews (Calazans et al., 2016). With potentially vast and complex databases in hand, interpreting this information in an expedited manner is paramount. There is therefore a demand for simple, intuitive interpretation methods capable of processing such a large amount of evidence, especially when dealing with sets of natural geological samples, for which stratigraphic position (height or depth) is a key feature. Solutions able to embody the concept of big data, consisting of extremely large datasets that benefit from being analysed computationally to reveal patterns, trends and associations, are therefore needed. This is particularly true for interactive visual techniques allowing an immediate grasp of the overall picture of the mineralogical variability, as in cases of macro-scale (field) significance and related implications (Li et al., 2016;Steed et al., 2013), which tend to be largely neglected in favour of solving smaller-scale issues.
In such context, the principals of geovisualisation (Wu & Shah, 2004) are well adapted to this need, promoting more favourable conditions for detecting change within complex systems (Rensink, 2002). Geovisualisation provides the link between geospatial information and human understanding, allowing for more interactive data exploration methods-interactive visualisation as a means to knowledge construction-(further details in Evangelidis et al., 2018;Harvey et al., 2017;Ladstädter et al., 2010;Li et al., 2016;Liu et al., 2018 and references therein). Following the guidelines of 3D visualisation, the emphasis is here given to "promote the transformations between 2D and 3D" and "reduce cognitive load by making information explicit and integrated" (adapted from Wu & Shah, 2004). Data visualisation techniques contribute to unravelling the complexity of big datasets and complement other techniques as statistical analysis via data reduction methods (Ladstädter et al., 2010).
Surface maps (X, Y and Z) are commonly used to outline morphological features of relevance. Instead of the three dimensions usually represented (geographical coordinates and height), it is proposed that these be replaced with numeric data extracted from diffractograms (intensity and diffraction angle) along with information regarding respective stratigraphic positions (height or depth). This process amplifies the use of the analysed heterogeneous mineralogical data, by gathering more information in one single image. The goal is not to replace more conventional approaches or to solve theoretical/technical limitations inherent to XRD analysis and interpretation. This paper provides an alternative way to automate X-ray diffractogram interpretation, based on XRD raw data and integrated outcrop information. This simple, yet intuitive approach aims to expedite the interpretation of large amounts of information, and is especially useful when dealing with sets of naturally complex samples. The potential and pitfalls of this approach are addressed to demonstrate that the key feature that allows integrating large mineralogical datasets with complementary information is valid, especially when dealing with multi-proxy studies.

| Field sampling, laboratory pre-treatment and analysis
The São Julião section ( Figure 1A) is located in the southern part of the Lusitanian Basin (Ericeira, west coast of Portugal). It is characterised by high lithofacies variability, including alternating marls, claystones and limestones with intercalated sand/siltstone beds ( Figure S1 for detailed sedimentological features; see also Coimbra et al., 2017;Horikx et al., 2014). This variety of materials justifies the choice of this site to demonstrate the advantages of 3D mapping of mineralogical (XRD) data. Alternative applications of this method include subsurface coring data (rock, soil or sediment) retrieved either on land or from ocean sites ( Figure 1B).
The XRD data extracted from mid-Cretaceous, mixed carbonate-siliciclastic materials deposited in shallowmarine settings, represents an example of the complex depositional and diagenetic history (Coimbra et al., 2017) that can be investigated by applying 3D modelling to mineralogical data. The bulk mineralogical composition of 81 samples was determined by XRD with Cu-Kα radiation, carried out on non-oriented mounts of powdered samples, using a Malvern Panalytical Phillips X'Pert PW3040/60 equipped with X´Pert 2.0 and Profit software at the Department of Geosciences, University of Aveiro, Portugal (Figure 2A,B,C). Scans were run between 4 and 70° 2θ on non-oriented powder mounts and results were treated using different approaches ( Figure  2D through G). Clay mineral identification was obtained after decarbonatation of bulk samples. Scans were run between 2 and 20° 2θ on air dried (natural sample), nonoriented powder mounts, as well as following glycerol saturation and heat treatment at 500°C (the latter are standard procedures for distinguishing clay mineral phases, not shown here).
A twofold approach was used with the bulk XRD data (Figures 3, 4 and 5): (i) a new raw XRD data organisation code was created, allowing further data processing by available 3D mapping software ( Figure 4); and (ii) standard procedure was used to obtain semi-quantitative mineralogical compositions, later also generating a 3D model ( Figure 5). This allows a direct comparison between both approaches. For approach (i) a set of 3050 XY values (intensity; angle) was obtained for the analysed bulk samples. The vertical scale of all presented diffractograms corresponds to obtained diffraction intensity. The horizontal scale relates to diffraction angle, where peak positions corresponding to the main reflections are interpreted following the parameters defined by the Crystallography Open Database-COD (http://www.cryst allog raphy.net/cod; see Table S1) and Rosenberger et al. (2020) for the air-dried clay fraction. To each diffractogram, a specific stratigraphic position, that is, metres along the outcrop, is assigned (Z-axis). The final dataset is therefore composed of 247.050 XYZ coordinate sets (vectors) obtained by combining intensity, angle and stratigraphic position and used here for further modelling ( Figure 2E,F,G). As for the standard approach (ii), peak identification and semi-quantitative analysis (wt%) were performed using MATCH! Software (representative example in Figure S2), also based on COD parameters and complemented when necessary after Brindley and Brown (1980) and Rosenberger et al. (2020). In this way, the full potential of diffraction peaks (reflection angle, maximum intensity, integrated intensities and full width at half maximum-FWHM) are now taken into account. Both approaches were compared using statistical analysis (linear correlation) of obtained results, providing quantifiable coefficients (r and p; see Figure 6) to explore advantages and limitations of the proposed 3D modelling of raw XRD data. Additionally, in order to expand the XRD modelling approach proposed here to other minerals, clay-fraction results of this same stratigraphic section (natural sample, see above) were used to further test the potential of using unprocessed (raw) XRD data.

| 2D and 3D modelling
The set of 81 bulk mineralogical results were first analysed using XY biplot representations of the obtained dataset ( Figure S3). Several options were evaluated, including overlapping, stacking, multi-layer and cascade configurations ( Figure S3). Other data visualisation tools which are familiar to most geoscientists were explored via 2D and 3D mapping, using Surfer (Golden Software™). Readily accessible software can be used for this purpose, as Surfer/Voxler (Golden Software™) or RockWorks (RockWare™). Alternative open-source software options are also available, as Generic Mapping Tools (GMT; Wessel et al., 2013) or gnuplot (see section "Data Availability Statement").
In order to test mapping software on the available dataset, raw XRD data were extracted, consisting of 81 *csv/Excel files. These needed to be organised by adding the Z coordinates corresponding to the stratigraphic position of each sample (see section 'Data Availability Statement' and Supplementary file). Desired changes in data format (e.g. logarithmic representations) can be performed directly to raw data. A Python based program was developed, ensuring that the used code returns information regarding potential errors and ambiguities (e.g. missing measurement files or inconsistencies in file name). The script can be used as a standalone script with a GUI for Unix/Mac and Windows users for a seamless implementation from third parties. For transparency, the pure Python code is also available alongside with a concise description of the workflow on GitHub https:// github.com/k-kemna/ XRD23D.
Gridding (via kringing) and creating 2D or 3D surfaces is now a fast and simple process using mapping software. This procedure performs data interpolation, based on the spacing between samples (i.e. stratigraphic sampling density), as defined by the user. The full procedure can be accomplished within a few minutes and the result plotted in a single image ( Figure 2F,G). Combining these data with information collected during field work (sedimentary logs, photographs or others) can be performed by using any drawing software or by combining the resulting images (JPEG, TIFF or other).
High-quality graphics and projections, coupled with the ability to process vast datasets are among the advantages of such software (Wessel & Luis, 2017). The generation of 3D grids from XYZ vectors (Figures 4, 5, 7, F I G U R E 1 Applications for the proposed 3D surface mapping method of mineralogical data. (A) Geographic location of the case study area on the western coast of central Portugal. The outcrop is composed of mixed carbonate-siliciclastic series covering mid-Cretaceous shallow-water deposits (sedimentological and stratigraphic information in Figure S1). Cliff height is approximately 30 m (person on the right lower corner serves as scale); detail of the studied carbonate materials is shown as inset. (B) Alternative applications of the presented method to other fields of research and industry, including subsurface data retrieved from rock or soil cores and marine sediment cores 8 and 9) provided single-image solutions for the representation of a large volume of data, combining mineralogical and stratigraphic information. This is one of the novel and key features of this contribution: the ability to render a better 3D representation of mineralogical data considering the geology of the analysed stratigraphic section and the possibility of processing large datasets with a very fast and simple procedure. Pitfalls of this approach can be addressed by comparison with other more standard methodologies.

| RESULTS AND DISCUSSION
Commonly, XRD spectra would be treated following a standard procedure (Figure 3) consisting of: (i) analysing each spectrum (examples in Figure 3A) using search/ match software to identify each mineral present at relevant proportion (e.g. peak intensity >10%, depending on several factors such as type of samples or goal of the analysis). At this stage, obtained peak positions and potential deviations from reference databases are a concern for natural minerals F I G U R E 2 Detailed workflow representing the tasks undertaken during this study, arrow indicates workflow. (A) Field work to collect sedimentary rock samples and gather geologically relevant information (thickness of each bed, stratal characteristics, faunal occurrence, stratigraphic position of each sample, lithology, degree of alteration, etc). (B) Sample processing prior to analysis. The rock samples were crushed to fit the mill and ground under 2 min cycles in order to avoid thermal degradation of more sensitive minerals. Powder samples were mounted in the sample holder (inlet) for further analysis. (C) XRD equipment used to analyse the mineralogical composition of the samples. (D) Representation of combined field and laboratory data. Ideally, graphical representation of the big mineralogical dataset should merge all the relevant information. (E) Visual aspect of the 81 obtained mineralogical spectra, highlighting the complex task of interpreting such intricate records. Dashed arrow signifies that this step was omitted due to the major limitations of this particular visualisation method. (F and G) Detail of 2D contour map and 3D surface map illustrating the application of mapping software to mineralogical data. For full size images see Figure S4 and Figure 4. Note how the high number of samples and data is reduced to one single-image file combining field and laboratory data potentially showing structural defects or altered composition. A good example would be ancient materials that have known significant diagenetic imprint, often bearing secondary minerals that do not show expected diffraction patterns (e.g. disordered dolomite). The identification of such minerals can be ambiguous when using search/match software for semi-quantitative abundance estimations; (ii) the area delimited by each peak of interest-integral intensity-is then used to calculate the semi-quantitative abundance of each mineral ( Figure 3B). Alternatively, or often complementary, Rietveld refinement can be applied to include peak shape, unit cell dimensions and coordinates of all atoms in the crystal structure (Pecharsky & Zavalij, 2009 for other alternatives see Zhou et al., 2018). Baseline properties and decomposition of composed peaks are also of relevance ( Figure 3B), potentially producing significant bias to obtained results as these parameters are usually user-defined; (iii) compiling a table with semi-quantitative abundance of all the minerals identified for each sample ( Figure 3C); (iv) plotting vertical representations of mineral abundance as a function of stratigraphic position and integrated with a sedimentary log (examples Figure 3D,E). In an attempt to find less time-consuming solutions and to produce a more intuitive output, the above steps were performed and compared against the alternative of using unprocessed raw XRD data (angle, intensity). The exact same dataset, that is, the 81 mineralogical XRD spectra obtained from mid-Cretaceous rock samples was used in all the comparisons. This allowed comparable outcomes to be produced while using different approaches (Figures 4 through 7), see also Figures S3,S4,S5.
A 2D approach (see Supplementary file) provided a general overview of the mineralogical trends over time, with colour variations responding to relative changes in peak intensity and semi-quantitative abundance ( Figure  S2). Using a 3D approach provided a more intuitive and complete scenario, fully in agreement with the principles brought forward by Wu and Shah (2004) to: "reduce cognitive load by making information explicit and F I G U R E 3 Schematic representation of the standard procedure followed during XRD data treatment (see text for potential limitations). (A) Example of the results obtained by search/match software used to identify each mineral present at relevant proportion (in Knidiri et al., 2014 and extracted from https:// www.scien tistl ive.com/conte nt/xrd-analy sing-powde rs). (B) Semi-quantitative calculation of the abundance of each mineral (integral intensity, example adapted from Morris et al., 2003). Note the relevant roles of baseline properties and the presence of composed peaks (decomposed idealised curves in blue). F I G U R E 4 3D modelling of raw XDR intensity data, highlighting the most significant results perfectly contextualised in terms of stratigraphic height, lithology and sedimentary dynamics (further sedimentological and stratigraphic information in Figure S1). Peaks with highest amplitude (primary peaks) are identified as calcite, quartz and dolomite by comparison of peak positions to standard samples with known mineralogy (Table S1). Peak width is exactly as obtained from XRD measurements. Secondary/tertiary less intense peaks of these same minerals are not identified here for reasons of simplicity F I G U R E 5 3D modelling of semi-quantitative abundance (%) obtained using Match! Software (see text for details and Figure S2). The position of each mineral along the 3D model is defined by the user, here conveniently ordered (quartz, calcite, dolomite and others) to allow a better comparison with the model obtained using raw data (shown in Figure 4). The height of each peak corresponds to the estimated percentage of each minerals contribution; the width of the peaks is fixed, unrelated to particle properties; the stratigraphic position of each sample is controlled by the user, here exactly placed where each sample was collected. Mean and standard deviation (SD) are also shown. Note overall dominance of calcite and quartz, and minor contribution of dolomite and other accessory minerals (≤6%) integrated" (Figures 4 and 5). This option was therefore pursued and the 3D mineralogical models of raw versus semi-quantitative data which were obtained were compared visually (Figures 4 and 5) and statistically by linear correlation (Figures 6 and 7, see figure captions for details).

F I G U R E 6
Statistical comparison of the 3D models obtained by using different approaches. (A-C) Linear correlation between maximum peak intensity (cps) and the estimated percentage obtained using search/match software for each mineral of interest (quartz, calcite and dolomite). Note highly significant correlation in all cases. (D and E) Comparison between stratigraphic abundance of calcite and quartz obtained for both 3D models (maximum intensity in cps and semi-quantitative estimations in %). Note similar mineralogical distribution along the studied section, clearer in the case of quartz occurrence F I G U R E 7 Statistical evaluation of differential peak height. (A) Schematic representation of the calculation leading to the parameter of differential peak height, here using the case of semi-quantitative estimations (mineral abundance obtained using search/match software). (B) Linear correlation between differential peak heights computed for maximum intensity (cps) and semi-quantitative data (%). Note very high and significant correlation (r = 0.92; p < 0.0001)

| Customised display of XRD data: unprocessed intensity values versus semiquantitative estimations
When using raw intensity data (cps), the fact that peak intensity is closely related to the chemical composition of each mineral-translating into specific mass absorption coefficient (Brindley & Brown, 1980)-deserves attention. This is because it is an oversimplification to consider only the reflection angle and maximum intensity of the peaks. Other aspects related to XRD peaks, such as FWHM, the shape of the peak and asymmetry should also be considered (Jian & Hejing, 2003). However, because the goal of this protocol is to provide a simple and fast approach, the simplification of using peak position and maximum intensity values was tested against the use of the full potential of XRD peaks. Accordingly, several questions that arise from using raw peak data (angle and intensity), due to inherent structural differences of each mineral, were addressed, here calcite, quartz and dolomite. These questions include: (i) do differences in intensity peak values for the same mineral translate into relative differences in abundance (%) of that mineral throughout the stratigraphic section? (ii) Can peak height of different minerals be compared in order to deduce differences in relative abundance of two (or more) minerals, as in the case of quartz versus calcite in the chosen example? (iii) Do mineral phases showing a weak response in XRD intensity (i.e. low intensity) correspond to minor (accessory) constituents of the samples, as observed for dolomite in the selected example? (iv) Is this approach valid when dealing with other mineral phases, namely clay-fraction assemblage? These questions were addressed by producing a similar 3D mineralogical model based on raw peak data F I G U R E 8 Application of XRD 3D blocks to other mineral phases included in the same samples (São Julião mixed carbonatesiliciclastics). Maximum intensity data obtained for clay-fraction constituents of the natural samples are shown in their accurate stratigraphic positions (see Materials and Methods section for details). Note a clear dominance of kaolinite/chlorite with respect to other minerals (angle and intensity; Figure 4 and Table S1) as well as on the standard semi-quantitative estimation of the same samples (obtained using search/match software; Figure 5 and Figure S2), and both models were compared based on the strength of their statistical relationship (Figures 6 and  7). Additionally, a similar 3D model was produced based on clay-fraction raw XRD data (Figure 8).
A visual inspection of both 3D models produced (raw peak data versus semi-quantification, see Section 2) revealed mineralogical trends that can be visually followed throughout the stratigraphic succession (Figures 4 and 5). When using raw intensity values (Figure 4), peak positions corresponding to quartz and calcite (see also Table S1) are the most frequent and prominent throughout the section. Calcite dominates the stratigraphic record, while quartz is most abundant only when the calcite contribution is less significant. Regarding the presence of dolomite (see Table S1), small dolomite peaks occur only occasionally. When contrasted F I G U R E 9 Detail of the mineralogical 3D block including only the range of the main mineral peaks of quartz, calcite and dolomite (see Figure 4 for full image and further sedimentological and stratigraphic information in Figure S1). This representation can be interpreted in terms of the palaeoenvironmental conditions responsible for the observed stratigraphic variations as deduced from previous works (see text for details). Note the intuitive and fast output, fully integrated in corresponding geological information and validated by independent petrographic information with semi-quantitative estimates based on the full potential of peak parameters (Figure 5), calcite is also observed to be the dominant mineral with a mean value of 55%, followed by quartz at 30%. Quartz also has a lower frequency of occurrence, that is, it occurs in a lower number of samples, when compared to calcite. Dolomite is the least abundant mineral (mean =6%) and is scarcer throughout the studied section ( Figure 5). Other minor components were identified, contributing between 1% and 4% of the total mineralogical assemblage. Both models offer similar interpretations regarding the presence and relative abundance of major and minor mineralogical components, resulting in 3D blocks that show striking similarities (Figures 4 and 5). Namely, both models show abundant quartz at the base of the studied stratigraphic interval, and quartz also occurs in significant quantities towards the mid-section. The inverse relationship between quartz and calcite is also evident in both models. Calcite is present at most stratigraphic horizons in both models, while dolomite occurs rarely showing low intensity peaks that correspond to low percentages of this mineral (mean value = 6%; Figure 5). The degree of similarity of computed 3D models was further tested using linear correlation analysis.
In order to confirm if simplified peak parameters (angle and maximum intensity) would produce different results than using the full peak potential (see full list of parameters above), both results were contrasted. The cross-validation of obtained 3D models was performed using linear correlation between quartz, calcite and dolomite peak intensity and semiquantitative estimation values ( Figure 6A,B,C, see Section 2, Methods for details on each procedure). A very significant degree of correlation (mean r = 0.9; p < 0.0001) is evident for these minerals, justifying the observation of similar trends in both 3D models (Figures 4 and 5). The 3D projection of raw intensity values produced the same information as using semi-quantitative values, hence generating similar 3D models (Figures 4 and 5). When testing the stratigraphic evolution of both parameters (counts in cps and abundance in %) for the same mineral, the similarity in stratigraphic pattern is also evident, although more easily detected for quartz distribution ( Figure 6D,E). But the concern related to the fact that raw intensities do not only correspond to the relative abundance of each mineral required further testing. This was performed by measuring differential peak height, the difference between maximum intensity raw data and obtained semiquantitative percentage, in both 3D models, as exemplified in Figure 7A. The results obtained when comparing both models were scored with a very high and significant correlation (r = 0.92; p < 0.0001), informing that the original differences in raw intensity peak height correspond to the obtained semiquantitative mineral abundance. The high degree of correlation of all tested parameters demonstrates that the proposed approach delivers the same information as the more timeconsuming alternative, but in a more expedited manner and providing a simple final output (single-image file). This also means that when aiming for a fast overview of large XRD datasets, peak position and maximum intensity of the peaks are sufficient to faithfully describe the stratigraphic trend and compare relative abundance of major and accessory minerals present in complex multi-phase samples. Nevertheless, the proposed approach presents the weakness of not being able to render more detailed information on crystal structure/domain size, shape of the particles and/or lattice strain. This is a direct consequence of the fact that peak heights (maximum intensity values) are not dependent on phase amounts only, but actually result from the combined effect of all the above mentioned properties.
Regarding the application to other mineral phases, clayfraction results of the same set of samples were used to provide an overview of their distribution throughout the São Julião section (Figure 8). The visual identification of the clay minerals in the natural samples is achieved in a few minutes, with one 3D model evidencing the dominance of kaolinite/ chlorite peaks along with scarce illite/smectite responses. This fast approach also aids in the comparison between natural, glycerol treated and heated samples, commonly used in any clay-fraction study to confirm the presence of different minerals. Computing three 3D models (natural, glycolated and heated) is here proposed as an alternative to processing raw intensity into semi-quantitative abundance along 243 plots representing each measurement in this set of 81 samples. The multi-phase samples presented here as a case study cannot realistically represent the vast combination of possible mineralogical features that characterise all the existing geological materials. However, it does serve as an encouraging example that merits further testing. Also, the situation where different minerals may have a similar structure and chemistry, and hence overlapping peak positions, deserves further attention as these did not occur in the studied samples.

| Comparing 3D mineralogical models with independent information from this case study
Obtained mineralogical trends along the computed 3D models (Figures 4 and 5) were contrasted with previous work performed on the São Julião stratigraphic succession ( Figure S1 for sedimentological details), namely the depositional and diagenetic interpretations suggested via independent proxies (geochemistry, palynology and sedimentological information explored in Horikx et al., 2014;Coimbra et al., 2017), to validate the obtained output.
The mineralogical composition of analysed sediments largely consists of variable proportions of quartz, calcite and at times dolomite (Figures 4 and 5). Minor constituents include clay minerals (illite and kaolinite/chlorite) and phyllosilicates, closely related to the occurrence of quartzbearing stratigraphic horizons at the base of the section, as directly observed during field work. The contribution of terrigenous sources is thus higher in these beds, corresponding to the topmost horizons of medium to coarse grained multicoloured sandstones, interpreted as representing a terrestrial (fluvial to deltaic) depositional environment (see Coimbra et al., 2017;Horikx et al., 2014 for details). The quartz presence is negligible for the following calcitedominated stratigraphic interval, corresponding to intervals of nodular limestones with abundant macrofossils (e.g. oysters, gastropods), indicative of shallow-marine conditions. The mid-portion of the section is again characterised by the occurrence of quartz-dominated stratigraphic horizons, corresponding to an ca 10 m interval of well-bedded, fine to medium-grained sand/siltstones, alternating with claystones. This interruption is followed by an ca 20 m thick calcite-dominated interval, represented by limestone-marl alternations with a high degree of bioturbation, commonly bearing oysters and gastropods. This interval marks the transition towards the remaining portion of the section, largely characterised by the co-occurrence of calcite and quartz within siltstones to coarse-grained sandstones, intercalated with a few limestone and claystone beds, interpreted as very shallow-marine to coastal deposits (see Coimbra et al., 2017;Horikx et al., 2014 for details). The presence of dolomite is more frequent within sedimentary packages characterised by the co-occurrence of quartz and calcite (Figure 4). This feature may relate to changes in porosity and consequent changes in fluid circulation patterns (Figures 4, 5 and 9).
In order to fully understand the facies transitions observed along the São Julião section, an overview of the depositional context needs to be considered. Throughout the Lusitanian Basin, the widely reported (eustatic?) Albian long-term sea-level rise (Cloething & Haq, 2015) represents the main control on (at least) regional depositional patterns (Dinis et al., 2002;Rey & Dinis, 2004). Relative sea-level fluctuations and overall climate trends can be inferred when combining mineralogical 3D blocks presented here (Figures 4, 5 and 9) with previous independent evidence based on sedimentology, geochemistry and palynology (Dinis et al., 2008 and references therein;Coimbra et al., 2017;Horikx et al., 2014Horikx et al., , 2016. Accordingly, the gradual Albian sea-level rise is recognised throughout this selected interval of São Julião deposits, reflected in the transition from siliciclastic-dominated coastal-plain deposits (base of section, Figures 4, 5 and 9) into a marly inner shelf facies (Coimbra et al., 2017;Dinis et al., 2002;Horikx et al., 2014;Rey, 1992;Rey & Dinis, 2004 for further sedimentological and palaeoecological details). Shorter term transgressive-regressive cycles superimposed on this long-term trend are better understood in the context of combined eustasy and relative sea-level change.
The stratigraphic interval under consideration corresponds to a relative sea-level lowstand leading to the deposition of mixed-carbonate siliciclastic facies (see Figure  1A for field aspects and Figures 4, 5 and 9 for stratigraphic distribution). Intervals of coast-line retreat are expressed by the dominance of siliciclastic deposits, here reflected in an increased quartz contribution and negligible calcite (Figure 9, petrographic details of quartz grains are also shown). This feature needs to be articulated with the availability of quartz, meaning that source areas would be subjected to intermittent weathering. In such a context, weathering in adjacent hinterland due to an enhanced hydrodynamic cycle most probably contributed to the clasticrich facies largely deposited at this time ( Figure 9). This information, very easy to detect using the 3D model, is in full agreement with previous geochemical and palynological evidence brought forward by Horikx et al. (2014Horikx et al. ( , 2016 and Coimbra et al. (2017). In contrast, intervals where calcite and quartz coexist reflect periods of increased weathering in the presence of a relative raised sea level ( Figure  9, ca 100 m in the sedimentary column). This observation is very intuitive by using the 3D model approach.
Two different situations can be identified as a consequence of circulating fluids during diagenesis in these carbonate-siliciclastic materials (Figure 9). One corresponds to fluid circulation which promoted the cementation of the siliciclastic intervals, where secondary calcite is the main pore-filling material. The second process corresponds to the sporadic presence of ferroan euhedral dolomite (Figure 9, petrographic details show abundant dolomite rhombs). Later dolomitisation is proposed to have precipitated under normal salinity pore-fluids during burial based on petrographic and geochemical data (see Coimbra et al., 2017 for further details). In both cases, fluid circulation during burial is a common feature, allowing the identification of these burial stages throughout the stratigraphic interval ( Figure 9). This feature is once more easily detectable from a fast and very intuitive observation of the 3D block generated from mineralogical XRD data.

| CONCLUSIONS
The proposed 3D approach to the representation of mineralogical (XRD) data is a fast and simple method to obtain an overview of the predominant minerals from large datasets. The possibility of merging geological and laboratory information is also a key feature. It relies on an automated data-organisation code followed by the use of 3D mapping software, a familiar tool to most geologists. Explored examples comprehend at least three major to minor mineral constituents (quartz, calcite, dolomite), for which 3D representations of raw intensity XRD data provided statistically similar outputs when compared to standard semi-quantitative estimations. The proposed simplification is ideal for obtaining a general overview of vast XRD datasets in an expedited manner, potentially making it attractive for industry applications (e.g. quality control), while also providing non-experts with a user-friendly tool to inspect large volumes of mineralogical information. Additionally, when dealing with data from different geographical locations or diverse environmental settings, the results can easily be compared. This provides an immediate visual perception of significant spatial and temporal changes, accelerating possible interpretations of the results and simplifying the decision-making process. Limitations of this approach are pronounced when the aim is to gain detailed information on such particle properties as size, shape or lattice strain. reference intensity ratios, mineral intensity factors, Rietveld, and full pattern summation methods: a critical review. Solid Earth Sciences, 3, 16-29.

SUPPORTING INFORMATION
Additional supporting information may be found in the online version of the article at the publisher's website.