(1) Overview

Introduction

Geochemical studies of igneous rocks are fundamental to classify rock types in terms of main-, minor-, and trace element whole-rock chemistry. Together with petrographic thin section observations Earth scientists classify igneous rocks and draw conclusions about:

  • the petrogenesis and evolution of igneous rocks;
  • the thermal and barometric conditions in which primary magmas have formed;
  • the magmatic processes involved in the evolution of igneous rocks;
  • and the geotectonic environment in which igneous rocks might have formed.

The creation of publication-ready geochemical plots and comparison of own data with published are often extremely time-consuming, and therefore, inefficient and expensive tasks. Specific software to perform these tasks are mostly based on VBA and Excel like the programs Petrograph [], PetroPlot [], GeoPlot [], GCDK [], GCDPlot [], or Geokit []. Other software approaches are developed in Python (GeoPyTool []) or R (GCDKit [, ]). Here, we present the program FastGAPP v2.0 (Fast Geoscientific Analysis Plotting Program), which is a MATLAB-based graphical user interface. FastGAPP v2.0 allows cross-platform, interactive and simultaneous exploration, comparison, and interpretation of up to 9 datasets. The principles of FastGAPP’s data handling are also suitable for other fields of geosciences and can increase teachability of geoscientific data visualisation and interpretation.

Implementation and architecture

FastGAPP v2.0 is MATLAB-based and consists of numerous functions, which are controlled and accessed by graphical user interfaces. The user is not required to have background knowledge in MATLAB programming. FastGAPP can be started by using the MATLAB command line or user interface. The FastGAPP start window is intended for the selection of sub-programs and their corresponding datasets. Once selected, each sub-program allows the input of up to nine different datasets. From these datasets, only the table data in the columns with valid header entries are imported into the sub-programs. Headers and units are usually described in the first and second row of the output file of the geochemical measurements delivered by laboratories. If this is not the case, the user needs to adjust these two rows in advance. The sub-program FastGAPP for displaying geochemical data can read up to 83 different headers (e.g. SiO2, TiO2, MgO…) and various different units (e.g. wt. %, ppm, ppb). Complete lists of all valid header entries and supported units for all sub-programs are listed in FastGAPP’s documentation. Among MS Excel spreadsheets, all sub-programs can also read data from MAT-files, which significantly decreases file import times during start-up. These MAT-files can be created from spreadsheets by using the integrated tools.

After the input datasets have been selected, it is possible to start the specific sub-program. This initiates a complex data processing flow (Figure 1): First, the previously-selected input files are parsed and sorted. Second, essential variables and structures are created. This includes a control structure in which headers (including units) and plot datasets for the selected sub-program are loaded. Additionally, a data structure is created by loading the default setup for markers and labels (Figure 1). Third, the datasets are imported dependent on their file type by using the corresponding MATLAB-commands (“load” for MAT-files and “xlsread” for spreadsheets). A simple loop, which uses the program-specific headers, parses through the imported input files and writes the information into new variables of the data structure. If a header value was not found in the imported data, these variables will be present as NaN’s (Not-a-Number). Fourth, the defaults for the appearance of plots lines and labels are loaded into the control structure. Finally, a special function performs a program-specific processing of the data. The special function of FastGAPP for example performs a volatile-free normalisation to 100 wt. % (including all trace elements given in ppm or ppb), a conversion of all major element oxides and trace elements to molar weights, and calculation of commonly used indices such as the ASI (alumina saturation index) or AI (agpaitic index). Additionally, statistics such as minimum, maximum, mean, and median for each element are calculated and stored in the data structure.

Figure 1 

FastGAPP’s data processing flow from sub-program and dataset selection to the start-up of the sub-program including the flow of the control and data structure.

After data processing and initialisation of all fundamental structures, the main window opens and handles the processed and calculated data (Figure 1). The main window (Figure 2) is mostly similar for all sub-programs. It allows to explore, display, and plot the imported data:

  1. The panel on the left side of FastGAPP’s main window (Figure 2) allows to select the currently imported datasets and available plots, to adjust the axes of the plot, to open the plot in new MATLAB window or to export vector and raster graphics (Figure 3).
  2. The central panels (Figure 2) give an overview and information about the imported datasets for every header and show a preview of the currently selected plot.
  3. The right panels (Figure 2) include a legend (also exportable as raster or vector graphics) and several control elements to adjust the plot appearance (Figure 2). The legend panel can be switched by selecting any dataset to another panel, which allow to adjust the appearance of marker and marker labels.
Figure 2 

Screenshots of the main window of FastGAPP v2.0 in overview mode (A) and dataset mode (B). The different panels give an overview about the imported data and allows to adjust markers, their labels, the plot lines and labels, and change the currently selected plot.

Figure 3 

Examples for final plots. The geochemical data are from dredged rocks from two locations along the Yermak Plateau north of Svalbard [] compared to onshore Hansen Point Volcanics onshore Ellesmere Island, Arctic Canada [] in different plots created with FastGAPP v2.0. (A) Total-alkalis vs. silica (TAS) diagram []. (B) 2*Nb-Zr/4-Y geotectonic classification diagram []. (C) Primitive mantle-normalised rare-earth elements (REE) plot [].

Functionality

FastGAPP allows to import up to 9 datasets into a single session of any sub-program. If 9 datasets are not enough, FastGAPP can also read information about marker and marker labels from the input data so that multiple datasets can be present in a single input file. The major improvements compared to the initial version of FastGAPP (v1.0) published on digital-geography.com are (I) the automatic import of the data by program-specific headers from the input, (II) the support of MAT-files, (III) simplified export of raster and vector graphics, (III) full control of plot and marker appearance, (IV) improved data overview. FastGAPP supports multiple instances of the main windows at the time, which allows to work on more sessions at the same time. Furthermore, sessions can be saved and loaded as MAT-files. This simplifies sharing of specific sessions with other scientists and researchers.

The four sub-programs cover different fields of geosciences from examination of (I) geochemical analyses of major, minor and trace elements of igneous rocks (“FastGAPP”), (II) petrographic classification of igneous rocks (“PetroPlot”), (III) petrographic classification and provenance analyses of sedimentary rocks (“SediPlot”), to (IV) soil classification based on grain size analyses (“SoilPlot”). FastGAPP includes over 100 petrographic and geochemical classification, magma-series and geotectonic discrimination diagrams from over one century of petrological and geochemical research. Additionally, several integrated functions like the “MULTIPLotter” and the “PLOT-O-MAT” allow users to create rare-earth element (REE), multi-element plots and geochemical variation diagrams.

Furthermore, FastGAPP is extendable. The digitised plot datasets are stored as two-point line segments and field labels in separate MATLAB scripts. These can be created from Excel spreadsheets by using the development tools integrated in FastGAPP (Figure 1). The same possibilities for database extension apply for normalisation values necessary for REE and multi-element plots. Moreover, it is even possible to create new sub-programs for different fields of geosciences by using the development tools (Figure 1).

Quality control

FastGAPP has undergone extensive functional testing and debugging by F.R. during development. This included also tests with real, synthetic and nonsensical datasets. The majority of the functions contain logical if-else statements, which e.g. also allows import of datasets with incorrect header or unit information without any conflicts with main data processing flow.

First plots with a stable version of FastGAPP are already presented in Geissler et al. []. The download package contains sample data for all sub-programs and software documentation provide sufficient details that other scientists can quickly understand and step-by-step work with FastGAPP v2.0.

(2) Availability

Operating system

The software has been tested on Windows 7, 8 and 10 and Mac OS X.

Programming language

FastGAPP is written in MATLAB code, and therefore is not required to be compiled. Tests were performed with the MATLAB versions 2013 (Windows 10), 2015 (Mac OS X) and 2020 (also Windows 10).

Additional system requirements

The disk space of the zipped download is only 25 MB. The system requirements are those recommended for MATLAB installations (minimum 3.1 GB minimum, 4 GB RAM, any Intel or AMD x86-x64 processor).

Dependencies

FastGAPP requires only MATLAB (without any further add-ons or packages) and MS Excel to be installed on the platform.

List of contributors

No further scientists/researchers contributed to the development of FastGAPP.

Software location

Archive

Name: Zenodo

Persistent identifier: https://doi.org/10.5281/zenodo.3707237

Licence: GNU General Public License v3.0

Publisher: Florian Riefstahl & Felix Gross

Version published: Version 2.0

Date published: 12/03/2020

Code repository

Name: GitHub

Identifier: https://github.com/FloZenReef/FastGAPP

Licence: GNU General Public License v3.0

Date published: 11/11/2019

Language

FastGAPP and its documentation is written in English. Further support is also possible in German.

(3) Reuse potential

FastGAPP is publicly available on GitHub and Zenodo. Preparation of input datasets for the different sub-programs is accessible for most users with geoscientific background by using the program-specific headers in the first row (i.e., SiO2, TiO2, Zr, Nb, etc.) with their corresponding units in the second row (i.e., wt. %, %, ppm, ppb, etc.). Therefore, input data match or are close to geochemical datasets provided by the geochemical laboratories.

The program contains a high number of available published geochemical and petrographic plots for igneous rocks from over one century of petrological research. Moreover, FastGAPP covers more disciplines of geosciences since it also contains sub-programs for sedimentological classification, sediment-source discrimination and soil classification.

For advanced and interested users, FastGAPP also provides development tools, which make it possible to enhance the databases of plots and geochemical normalisation values or even to create new programs for other fields of Earth science. The functionality of the development tools is also listed and explained in FastGAPP’s documentation.

The authors invite ideas for improvements in future versions of FastGAPP and report of any bugs. Please contact the lead author via email if support beyond the documentation and manual is required. This also applies if you are considering code modifications, enhancements of databases or further development.