Repository files navigation

TAS-GS

TAS-GS: An Extended TAS Diagram Software Based on Adaptive Bandwidth Gaussian Kernel Density Estimation and Softmax Probabilistic Discrimination

TAS-GS is a software for constructing TAS diagrams, which is based on adaptive bandwidth Gaussian kernel density estimation and softmax probabilistic discrimination. It can provide more accurate and reliable results for the analysis of geochemical data.

Version: 1.0.0

1 Introduction

1. Overview

TAS-GS is an extended TAS diagram software based on Adaptive Bandwidth Gaussian Kernel Density Estimation (Gaussian KDE) and Softmax Probabilistic Discrimination. The classic TAS diagram is a technique for classifying unamed igneous rocks by plotting the relationship between total alkali and silica.

1.1 Development Background and Innovation

The traditional TAS method is based on the correlation between total alkali and silica in igneous rocks, and it intuitively divides rock types on a 2D diagram. This method is simple and easy to operate. However, with the increase of data set size and diversity, the traditional boundary distinguishing method may become blurred or unstable.

The TAS-GS version developed on this basis introduces Adaptive Bandwidth Gaussian Kernel Density Estimation (Gaussian KDE) and Softmax Probabilistic Discrimination. The GS part represents this improvement. The data sample is based on the GEOROC global igneous rock database. The data method is based on the experience summarized in the teaching and research work of data science and big data analysis.

In the TAS-GS system, each sample to be classified will be determined according to the probability distribution obtained from the GEOROC database. This inherits the classification boundaries of the traditional classic TAS method, ensuring the forward compatibility of the new method with the classic diagram. Based on the probability field, the software introduces adaptive bandwidth technology for Gaussian Kernel Density Estimation, which takes into account both data shape and classification stability, avoids overfitting to the original data, and maintains numerical stability in terms of availability. As the data volume accumulates, the adaptive bandwidth will reach a basic level of stability, and the Gaussian kernel density estimation based on this will reach second-order stability, making the model more robust and providing more accurate classification solutions for igneous rocks.

1.2 Development Environment

The development environment for this software is as follows:

Library NameVersion NumberFunction Description
PySide66.6.2Qt binding library for GUI development in Python
beeware0.3.0Native cross-platform mobile and desktop app development tool
matplotlib3.8.3Data visualization library for creating high-quality charts
numpy1.26.4Scientific computing library with a wide range of mathematical functions and array operations
pandas2.2.1Data analysis library with DataFrame and other data structures
scipy1.12.0Scientific computing library with advanced mathematical algorithms
toga0.4.2Python UI toolkit for building cross-platform native GUI apps
toga-chart0.2.0An extension for Toga library to create charts and data visualizations
scikit-learn1.4.1Machine learning library with a variety of supervised and unsupervised learning algorithms

Note: Some important components, such as scikit-learn, must strictly adhere to the required version number. If other versions are installed, the software may not work properly.

1.3 Running Environment

The minimum hardware configuration required for this software to run is as follows:

Configuration ItemMinimum Requirement
Processor2 GHz or faster processor
Memory (RAM)4 GB or more
Free Hard Disk Space1 GB or more
Display Resolution1920 x 1080 resolution

This software combines PySide6 and BeeWare, which is a cross-platform GUI application development solution. It uses PySide6 to build the interface and leverages BeeWare's Briefcase for one-click packaging and running. This ensures that the application can run natively on popular operating systems such as Windows, GNU/Linux, etc.

The recommended operating system for this software is as follows:

Operating SystemVersion NumberArchitectureMinimum Version RequirementRecommended Version Requirement
Windows10x641011
LinuxUbuntu 22.04x64Ubuntu 20.04Ubuntu 22.04

2 Installation

For Windows users, the installation is particularly simple.

2.1 Download and Run for Windows System

Download link: https://pan.baidu.com/s/1Ja0kuJncBAuVbYVmSFLLVg?pwd=wzc2 Extraction code: wzc2

Please note that the currently provided installation package is only suitable for the latest mainstream Windows operating system versions, such as Windows 10 and Windows 11. For earlier versions of the operating system, due to the lack of corresponding environment for developers and ineffective testing, the software and its dependent packages may not run properly on these older versions of the system.

2.1.1 Installation Using the MSI Installer for Windows System

After downloading the installation package from the provided link (e.g., "TAS-GS-1.0.0.msi"), you can proceed with the installation by double-clicking the file.

During the installation process, you will be prompted to choose between two installation modes: one for the current user and another for the entire system.

The installation may take a few minutes, so please be patient.

Once the installation is successful, you will see a prompt indicating that the installation is complete.

After installation, you can find the installed application in the Start menu.

If you need to uninstall the software at any point, you can do so through the Application Management.

2.1.2 Green Version Zip File Extraction and Running

In the provided link, you will also find a file named "TAS-GS-1.0.0.zip". Download and extract this file to generate an independent folder. To ensure that the built-in interpreter can run normally, please ensure that it is stored in a folder with a full English path and avoid any spaces in the path.

After ensuring the path is correct, look for an file called "TAS-GS.exe" within the extracted folder and double-click it to run the program.

2.2 Cloning and Running

2.2.1 Cloning the Code

This method is suitable for GNU/Linux and macOS users, as well as Windows users, but it might be a bit troublesome for Windows users.

To run the application software of this project, you need to use git to clone the code, so you need to install git and have access to the internet to access github and obtain the code. After cloning the code, you will need a Python version 3.10 or above to run the cloned file.

In addition to the above-mentioned files, you may need to install some other system-level dependencies.

Here, taking the specific operating system environment of the developer's Ubuntu 22.04.3 LTS as an example, the following commands are used to install the required dependencies:

sudo apt update
sudo apt install build-essential git pkg-config python3-dev python3-venv libgirepository1.0-dev libcairo2-dev gir1.2-webkit2-4.0 libcanberra-gtk3-module libxkbcommon0 qtwayland5 libegl1-mesa

If you skip the above steps, you may encounter errors when installing pycairo, and thus cannot complete the installation of the dependent environment.

To clone the code and install the required packages using pip, please follow the commands below:

Clone the code from GitHub:

git clone https://github.com/GeoPyTool/TAS-GS.git
cd TAS-GS
pip install -r requirement.txt

If the dependency installation is completed, you will see information similar to the following, sometimes there may be some warnings, but this will not be a big problem, as long as it is not an error, it should be basically fine.

2.2.2 Run the Project

Remain in the cloned code path and find the subfolder 'tasgs'. Use the 'cd' command to enter it and then run 'briefcase run' to start the application.

cd tasgs
briefcase run

The first run may require updating some program templates, so it might take some time. Patience is a virtue, and there's nothing you can do but wait. Additionally, you'll need a stable internet connection to access GitHub.

These very time-consuming steps mainly just appear during the first run and won't have too many similar issues later on when running the code again, which will save a significant amount of time in the future.

3 Usage

The operation and use of TAS-GS are designed to be very simple, so it should be easy for users to get started.

3.1 Data File Format

TAS-GS supports CSV and Excel files, and the specific settings can be referred to from the following screenshots:

The required columns are Label,SiO2(wt%),K2O(wt%),Na2O(wt%), where Label is your sample label, and SiO2(wt%) and K2O(wt%)+Na2O(wt%) are the data you want to plot.

Note that you should use the data normalized after adding all oxides and then calibrating, which is more reliable.

To simplify the running process and reduce design complexity, TAS-GS itself no longer provides the function of data normalization, which can be done in Excel or WPS, and is not troublesome.

This time, TAS-GS does not require any additional settings, and the program can automatically assign different colors to groups of data based on their labels, refer to the data sample data_samples/TAS.csv.

3.2 Running the Program

No matter how it is installed and run, the overall graphical interface is basically the same:

3.2.1 Open Data File

Just select a CSV or Excel file to load it into the program interface.

3.2.2 Plot and Judgment

There are two buttons on the main interface: Plot Data and Export Result. Click on the former to generate a plot:

Click on the latter to pop up the classification results:

This operation process is very intuitive, and there is basically no learning cost. With a little exploration, you can quickly get started.

3.2.3 Save Results

The judgment result table that pops up can be saved as a file, refer to /data_samples/TAS_Result.csv for the actual data, which adds the following columns to the left of the original data file:

| Label| Max_Ratio Classification| Max_Ratio Probability| Soft-Max Classification| Soft-Max Probability| TAS as VOL| | ------------ | --------------------- | --------------------- | --------------------- | --------------------- | | Zhang SH2016 | Basalt | 1 | Tholeiite | 0.047926 | Basalt | | Zhang SH2016 | Picrite | 0.684 | Picrite | 0.046181 | Basalt | | Zhang SH2016 | Basalt | 0.792 | Basalt | 0.046446 | Basalt | | Zhang SH2016 | Basalt | 0.655 | Basalt | 0.046292 | Basalt | | Zhang SH2016 | Adakite | 1 | Andesite | 0.046458 | Basaltic Andesite | | Zhang SH2016 | Basalt | 0.967 | Tholeiite | 0.047371 | Basalt | | Zhang SH2016 | Basalt | 0.905 | Basalt | 0.046621 | Basalt | | Zhang SH2016 | Tephrite | 0.964 | Basanite | 0.046108 | Basalt | | Zhang SH2016 | Picrite | 0.73 | Picrite | 0.046225 | Basalt | | Zhang SH2016 | Picrite | 0.603 | Picrite | 0.046105 | Basalt | | Zhang SH2016 | Basalt | 0.699 | Basalt | 0.046336 | Basalt | | Zhang SH2016 | Picrite | 0.862 | Picrite | 0.046412 | Basalt | | Zhang SH2016 | Komatiite | 1 | Picrite | 0.046572 | Basalt | | Zhang SH2016 | Picrite | 0.684 | Picrite | 0.046204 | Basalt | | Zhang SH2016 | Nephelinite | 0.542 | Picrite | 0.045982 | Basalt | | Zhang SH2016 | Picrite | 0.863 | Picrite | 0.046397 | Basalt | | Zhang SH2016 | Boninite | 1 | Tholeiite | 0.04698 | Basalt | | Wang chong 2016 | Basalt | 0.757 | Tholeiite | 0.047483 | Basalt | | Wang chong 2016 | Picrite | 0.803 | Tholeiite | 0.047129 | Basalt | | Wang chong 2016 | Basalt | 0.85 | Tholeiite | 0.047751 | Basalt | | Wang chong 2016 | Picrite | 0.795 | Tholeiite | 0.047208 | Basalt | | Wang chong 2016 | Basalt | 0.961 | Tholeiite | 0.048203 | Basalt | | Wang chong 2016 | Tholeiite | 1 | Tholeiite | 0.048437 | Basalt | | Wang chong 2016 | Basalt | 0.747 | Basalt | 0.046416 | Basalt | | Wang chong 2016 | Basalt | 0.903 | Tholeiite | 0.046841 | Basalt |

3.3 Save the Plot

After adjusting the plot to your satisfaction, you can click the Save Plot button on the main interface to save the current plot:

The program provides four save formats: JPG and PNG are bitmap formats, while PDF and SVG are vector formats. If you plan to use CorelDraw or Adobe Illustrator, you may prefer to save the plot as a PDF. If you intend to use Ink Scape or Affinity Designer

About

TAS Diagram combining Gaussian KDE with Adaptive Bandwidth and SoftMax Probabilistic Discrimination.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Repository files navigation

TAS-GS

TAS-GS: An Extended TAS Diagram Software Based on Adaptive Bandwidth Gaussian Kernel Density Estimation and Softmax Probabilistic Discrimination

TAS-GS is a software for constructing TAS diagrams, which is based on adaptive bandwidth Gaussian kernel density estimation and softmax probabilistic discrimination. It can provide more accurate and reliable results for the analysis of geochemical data.

Version: 1.0.0

1 Introduction

1. Overview

TAS-GS is an extended TAS diagram software based on Adaptive Bandwidth Gaussian Kernel Density Estimation (Gaussian KDE) and Softmax Probabilistic Discrimination. The classic TAS diagram is a technique for classifying unamed igneous rocks by plotting the relationship between total alkali and silica.

1.1 Development Background and Innovation

The traditional TAS method is based on the correlation between total alkali and silica in igneous rocks, and it intuitively divides rock types on a 2D diagram. This method is simple and easy to operate. However, with the increase of data set size and diversity, the traditional boundary distinguishing method may become blurred or unstable.

The TAS-GS version developed on this basis introduces Adaptive Bandwidth Gaussian Kernel Density Estimation (Gaussian KDE) and Softmax Probabilistic Discrimination. The GS part represents this improvement. The data sample is based on the GEOROC global igneous rock database. The data method is based on the experience summarized in the teaching and research work of data science and big data analysis.

In the TAS-GS system, each sample to be classified will be determined according to the probability distribution obtained from the GEOROC database. This inherits the classification boundaries of the traditional classic TAS method, ensuring the forward compatibility of the new method with the classic diagram. Based on the probability field, the software introduces adaptive bandwidth technology for Gaussian Kernel Density Estimation, which takes into account both data shape and classification stability, avoids overfitting to the original data, and maintains numerical stability in terms of availability. As the data volume accumulates, the adaptive bandwidth will reach a basic level of stability, and the Gaussian kernel density estimation based on this will reach second-order stability, making the model more robust and providing more accurate classification solutions for igneous rocks.

1.2 Development Environment

The development environment for this software is as follows:

Library NameVersion NumberFunction Description
PySide66.6.2Qt binding library for GUI development in Python
beeware0.3.0Native cross-platform mobile and desktop app development tool
matplotlib3.8.3Data visualization library for creating high-quality charts
numpy1.26.4Scientific computing library with a wide range of mathematical functions and array operations
pandas2.2.1Data analysis library with DataFrame and other data structures
scipy1.12.0Scientific computing library with advanced mathematical algorithms
toga0.4.2Python UI toolkit for building cross-platform native GUI apps
toga-chart0.2.0An extension for Toga library to create charts and data visualizations
scikit-learn1.4.1Machine learning library with a variety of supervised and unsupervised learning algorithms

Note: Some important components, such as scikit-learn, must strictly adhere to the required version number. If other versions are installed, the software may not work properly.

1.3 Running Environment

The minimum hardware configuration required for this software to run is as follows:

Configuration ItemMinimum Requirement
Processor2 GHz or faster processor
Memory (RAM)4 GB or more
Free Hard Disk Space1 GB or more
Display Resolution1920 x 1080 resolution

This software combines PySide6 and BeeWare, which is a cross-platform GUI application development solution. It uses PySide6 to build the interface and leverages BeeWare's Briefcase for one-click packaging and running. This ensures that the application can run natively on popular operating systems such as Windows, GNU/Linux, etc.

The recommended operating system for this software is as follows:

Operating SystemVersion NumberArchitectureMinimum Version RequirementRecommended Version Requirement
Windows10x641011
LinuxUbuntu 22.04x64Ubuntu 20.04Ubuntu 22.04

2 Installation

For Windows users, the installation is particularly simple.

2.1 Download and Run for Windows System

Download link: https://pan.baidu.com/s/1Ja0kuJncBAuVbYVmSFLLVg?pwd=wzc2 Extraction code: wzc2

Please note that the currently provided installation package is only suitable for the latest mainstream Windows operating system versions, such as Windows 10 and Windows 11. For earlier versions of the operating system, due to the lack of corresponding environment for developers and ineffective testing, the software and its dependent packages may not run properly on these older versions of the system.

2.1.1 Installation Using the MSI Installer for Windows System

After downloading the installation package from the provided link (e.g., "TAS-GS-1.0.0.msi"), you can proceed with the installation by double-clicking the file.

During the installation process, you will be prompted to choose between two installation modes: one for the current user and another for the entire system.

The installation may take a few minutes, so please be patient.

Once the installation is successful, you will see a prompt indicating that the installation is complete.

After installation, you can find the installed application in the Start menu.

If you need to uninstall the software at any point, you can do so through the Application Management.

2.1.2 Green Version Zip File Extraction and Running

In the provided link, you will also find a file named "TAS-GS-1.0.0.zip". Download and extract this file to generate an independent folder. To ensure that the built-in interpreter can run normally, please ensure that it is stored in a folder with a full English path and avoid any spaces in the path.

After ensuring the path is correct, look for an file called "TAS-GS.exe" within the extracted folder and double-click it to run the program.

2.2 Cloning and Running

2.2.1 Cloning the Code

This method is suitable for GNU/Linux and macOS users, as well as Windows users, but it might be a bit troublesome for Windows users.

To run the application software of this project, you need to use git to clone the code, so you need to install git and have access to the internet to access github and obtain the code. After cloning the code, you will need a Python version 3.10 or above to run the cloned file.

In addition to the above-mentioned files, you may need to install some other system-level dependencies.

Here, taking the specific operating system environment of the developer's Ubuntu 22.04.3 LTS as an example, the following commands are used to install the required dependencies:

sudo apt update
sudo apt install build-essential git pkg-config python3-dev python3-venv libgirepository1.0-dev libcairo2-dev gir1.2-webkit2-4.0 libcanberra-gtk3-module libxkbcommon0 qtwayland5 libegl1-mesa

If you skip the above steps, you may encounter errors when installing pycairo, and thus cannot complete the installation of the dependent environment.

To clone the code and install the required packages using pip, please follow the commands below:

Clone the code from GitHub:

git clone https://github.com/GeoPyTool/TAS-GS.git
cd TAS-GS
pip install -r requirement.txt

If the dependency installation is completed, you will see information similar to the following, sometimes there may be some warnings, but this will not be a big problem, as long as it is not an error, it should be basically fine.

2.2.2 Run the Project

Remain in the cloned code path and find the subfolder 'tasgs'. Use the 'cd' command to enter it and then run 'briefcase run' to start the application.

cd tasgs
briefcase run

The first run may require updating some program templates, so it might take some time. Patience is a virtue, and there's nothing you can do but wait. Additionally, you'll need a stable internet connection to access GitHub.

These very time-consuming steps mainly just appear during the first run and won't have too many similar issues later on when running the code again, which will save a significant amount of time in the future.

3 Usage

The operation and use of TAS-GS are designed to be very simple, so it should be easy for users to get started.

3.1 Data File Format

TAS-GS supports CSV and Excel files, and the specific settings can be referred to from the following screenshots:

The required columns are Label,SiO2(wt%),K2O(wt%),Na2O(wt%), where Label is your sample label, and SiO2(wt%) and K2O(wt%)+Na2O(wt%) are the data you want to plot.

Note that you should use the data normalized after adding all oxides and then calibrating, which is more reliable.

To simplify the running process and reduce design complexity, TAS-GS itself no longer provides the function of data normalization, which can be done in Excel or WPS, and is not troublesome.

This time, TAS-GS does not require any additional settings, and the program can automatically assign different colors to groups of data based on their labels, refer to the data sample data_samples/TAS.csv.

3.2 Running the Program

No matter how it is installed and run, the overall graphical interface is basically the same:

3.2.1 Open Data File

Just select a CSV or Excel file to load it into the program interface.

3.2.2 Plot and Judgment

There are two buttons on the main interface: Plot Data and Export Result. Click on the former to generate a plot:

Click on the latter to pop up the classification results:

This operation process is very intuitive, and there is basically no learning cost. With a little exploration, you can quickly get started.

3.2.3 Save Results

The judgment result table that pops up can be saved as a file, refer to /data_samples/TAS_Result.csv for the actual data, which adds the following columns to the left of the original data file:

| Label| Max_Ratio Classification| Max_Ratio Probability| Soft-Max Classification| Soft-Max Probability| TAS as VOL| | ------------ | --------------------- | --------------------- | --------------------- | --------------------- | | Zhang SH2016 | Basalt | 1 | Tholeiite | 0.047926 | Basalt | | Zhang SH2016 | Picrite | 0.684 | Picrite | 0.046181 | Basalt | | Zhang SH2016 | Basalt | 0.792 | Basalt | 0.046446 | Basalt | | Zhang SH2016 | Basalt | 0.655 | Basalt | 0.046292 | Basalt | | Zhang SH2016 | Adakite | 1 | Andesite | 0.046458 | Basaltic Andesite | | Zhang SH2016 | Basalt | 0.967 | Tholeiite | 0.047371 | Basalt | | Zhang SH2016 | Basalt | 0.905 | Basalt | 0.046621 | Basalt | | Zhang SH2016 | Tephrite | 0.964 | Basanite | 0.046108 | Basalt | | Zhang SH2016 | Picrite | 0.73 | Picrite | 0.046225 | Basalt | | Zhang SH2016 | Picrite | 0.603 | Picrite | 0.046105 | Basalt | | Zhang SH2016 | Basalt | 0.699 | Basalt | 0.046336 | Basalt | | Zhang SH2016 | Picrite | 0.862 | Picrite | 0.046412 | Basalt | | Zhang SH2016 | Komatiite | 1 | Picrite | 0.046572 | Basalt | | Zhang SH2016 | Picrite | 0.684 | Picrite | 0.046204 | Basalt | | Zhang SH2016 | Nephelinite | 0.542 | Picrite | 0.045982 | Basalt | | Zhang SH2016 | Picrite | 0.863 | Picrite | 0.046397 | Basalt | | Zhang SH2016 | Boninite | 1 | Tholeiite | 0.04698 | Basalt | | Wang chong 2016 | Basalt | 0.757 | Tholeiite | 0.047483 | Basalt | | Wang chong 2016 | Picrite | 0.803 | Tholeiite | 0.047129 | Basalt | | Wang chong 2016 | Basalt | 0.85 | Tholeiite | 0.047751 | Basalt | | Wang chong 2016 | Picrite | 0.795 | Tholeiite | 0.047208 | Basalt | | Wang chong 2016 | Basalt | 0.961 | Tholeiite | 0.048203 | Basalt | | Wang chong 2016 | Tholeiite | 1 | Tholeiite | 0.048437 | Basalt | | Wang chong 2016 | Basalt | 0.747 | Basalt | 0.046416 | Basalt | | Wang chong 2016 | Basalt | 0.903 | Tholeiite | 0.046841 | Basalt |

3.3 Save the Plot

After adjusting the plot to your satisfaction, you can click the Save Plot button on the main interface to save the current plot:

The program provides four save formats: JPG and PNG are bitmap formats, while PDF and SVG are vector formats. If you plan to use CorelDraw or Adobe Illustrator, you may prefer to save the plot as a PDF. If you intend to use Ink Scape or Affinity Designer

About

TAS Diagram combining Gaussian KDE with Adaptive Bandwidth and SoftMax Probabilistic Discrimination.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

TAS-GS

TAS-GS: An Extended TAS Diagram Software Based on Adaptive Bandwidth Gaussian Kernel Density Estimation and Softmax Probabilistic Discrimination

TAS-GS is a software for constructing TAS diagrams, which is based on adaptive bandwidth Gaussian kernel density estimation and softmax probabilistic discrimination. It can provide more accurate and reliable results for the analysis of geochemical data.

Version: 1.0.0

1 Introduction

1. Overview

TAS-GS is an extended TAS diagram software based on Adaptive Bandwidth Gaussian Kernel Density Estimation (Gaussian KDE) and Softmax Probabilistic Discrimination. The classic TAS diagram is a technique for classifying unamed igneous rocks by plotting the relationship between total alkali and silica.

1.1 Development Background and Innovation

The traditional TAS method is based on the correlation between total alkali and silica in igneous rocks, and it intuitively divides rock types on a 2D diagram. This method is simple and easy to operate. However, with the increase of data set size and diversity, the traditional boundary distinguishing method may become blurred or unstable.

The TAS-GS version developed on this basis introduces Adaptive Bandwidth Gaussian Kernel Density Estimation (Gaussian KDE) and Softmax Probabilistic Discrimination. The GS part represents this improvement. The data sample is based on the GEOROC global igneous rock database. The data method is based on the experience summarized in the teaching and research work of data science and big data analysis.

In the TAS-GS system, each sample to be classified will be determined according to the probability distribution obtained from the GEOROC database. This inherits the classification boundaries of the traditional classic TAS method, ensuring the forward compatibility of the new method with the classic diagram. Based on the probability field, the software introduces adaptive bandwidth technology for Gaussian Kernel Density Estimation, which takes into account both data shape and classification stability, avoids overfitting to the original data, and maintains numerical stability in terms of availability. As the data volume accumulates, the adaptive bandwidth will reach a basic level of stability, and the Gaussian kernel density estimation based on this will reach second-order stability, making the model more robust and providing more accurate classification solutions for igneous rocks.

1.2 Development Environment

The development environment for this software is as follows:

Library NameVersion NumberFunction Description
PySide66.6.2Qt binding library for GUI development in Python
beeware0.3.0Native cross-platform mobile and desktop app development tool
matplotlib3.8.3Data visualization library for creating high-quality charts
numpy1.26.4Scientific computing library with a wide range of mathematical functions and array operations
pandas2.2.1Data analysis library with DataFrame and other data structures
scipy1.12.0Scientific computing library with advanced mathematical algorithms
toga0.4.2Python UI toolkit for building cross-platform native GUI apps
toga-chart0.2.0An extension for Toga library to create charts and data visualizations
scikit-learn1.4.1Machine learning library with a variety of supervised and unsupervised learning algorithms

Note: Some important components, such as scikit-learn, must strictly adhere to the required version number. If other versions are installed, the software may not work properly.

1.3 Running Environment

The minimum hardware configuration required for this software to run is as follows:

Configuration ItemMinimum Requirement
Processor2 GHz or faster processor
Memory (RAM)4 GB or more
Free Hard Disk Space1 GB or more
Display Resolution1920 x 1080 resolution

This software combines PySide6 and BeeWare, which is a cross-platform GUI application development solution. It uses PySide6 to build the interface and leverages BeeWare's Briefcase for one-click packaging and running. This ensures that the application can run natively on popular operating systems such as Windows, GNU/Linux, etc.

The recommended operating system for this software is as follows:

Operating SystemVersion NumberArchitectureMinimum Version RequirementRecommended Version Requirement
Windows10x641011
LinuxUbuntu 22.04x64Ubuntu 20.04Ubuntu 22.04

2 Installation

For Windows users, the installation is particularly simple.

2.1 Download and Run for Windows System

Download link: https://pan.baidu.com/s/1Ja0kuJncBAuVbYVmSFLLVg?pwd=wzc2 Extraction code: wzc2

Please note that the currently provided installation package is only suitable for the latest mainstream Windows operating system versions, such as Windows 10 and Windows 11. For earlier versions of the operating system, due to the lack of corresponding environment for developers and ineffective testing, the software and its dependent packages may not run properly on these older versions of the system.

2.1.1 Installation Using the MSI Installer for Windows System

After downloading the installation package from the provided link (e.g., "TAS-GS-1.0.0.msi"), you can proceed with the installation by double-clicking the file.

During the installation process, you will be prompted to choose between two installation modes: one for the current user and another for the entire system.

The installation may take a few minutes, so please be patient.

Once the installation is successful, you will see a prompt indicating that the installation is complete.

After installation, you can find the installed application in the Start menu.

If you need to uninstall the software at any point, you can do so through the Application Management.

2.1.2 Green Version Zip File Extraction and Running

In the provided link, you will also find a file named "TAS-GS-1.0.0.zip". Download and extract this file to generate an independent folder. To ensure that the built-in interpreter can run normally, please ensure that it is stored in a folder with a full English path and avoid any spaces in the path.

After ensuring the path is correct, look for an file called "TAS-GS.exe" within the extracted folder and double-click it to run the program.

2.2 Cloning and Running

2.2.1 Cloning the Code

This method is suitable for GNU/Linux and macOS users, as well as Windows users, but it might be a bit troublesome for Windows users.

To run the application software of this project, you need to use git to clone the code, so you need to install git and have access to the internet to access github and obtain the code. After cloning the code, you will need a Python version 3.10 or above to run the cloned file.

In addition to the above-mentioned files, you may need to install some other system-level dependencies.

Here, taking the specific operating system environment of the developer's Ubuntu 22.04.3 LTS as an example, the following commands are used to install the required dependencies:

sudo apt update
sudo apt install build-essential git pkg-config python3-dev python3-venv libgirepository1.0-dev libcairo2-dev gir1.2-webkit2-4.0 libcanberra-gtk3-module libxkbcommon0 qtwayland5 libegl1-mesa

If you skip the above steps, you may encounter errors when installing pycairo, and thus cannot complete the installation of the dependent environment.

To clone the code and install the required packages using pip, please follow the commands below:

Clone the code from GitHub:

git clone https://github.com/GeoPyTool/TAS-GS.git
cd TAS-GS
pip install -r requirement.txt

If the dependency installation is completed, you will see information similar to the following, sometimes there may be some warnings, but this will not be a big problem, as long as it is not an error, it should be basically fine.

2.2.2 Run the Project

Remain in the cloned code path and find the subfolder 'tasgs'. Use the 'cd' command to enter it and then run 'briefcase run' to start the application.

cd tasgs
briefcase run

The first run may require updating some program templates, so it might take some time. Patience is a virtue, and there's nothing you can do but wait. Additionally, you'll need a stable internet connection to access GitHub.

These very time-consuming steps mainly just appear during the first run and won't have too many similar issues later on when running the code again, which will save a significant amount of time in the future.

3 Usage

The operation and use of TAS-GS are designed to be very simple, so it should be easy for users to get started.

3.1 Data File Format

TAS-GS supports CSV and Excel files, and the specific settings can be referred to from the following screenshots:

The required columns are Label,SiO2(wt%),K2O(wt%),Na2O(wt%), where Label is your sample label, and SiO2(wt%) and K2O(wt%)+Na2O(wt%) are the data you want to plot.

Note that you should use the data normalized after adding all oxides and then calibrating, which is more reliable.

To simplify the running process and reduce design complexity, TAS-GS itself no longer provides the function of data normalization, which can be done in Excel or WPS, and is not troublesome.

This time, TAS-GS does not require any additional settings, and the program can automatically assign different colors to groups of data based on their labels, refer to the data sample data_samples/TAS.csv.

3.2 Running the Program

No matter how it is installed and run, the overall graphical interface is basically the same:

3.2.1 Open Data File

Just select a CSV or Excel file to load it into the program interface.

3.2.2 Plot and Judgment

There are two buttons on the main interface: Plot Data and Export Result. Click on the former to generate a plot:

Click on the latter to pop up the classification results:

This operation process is very intuitive, and there is basically no learning cost. With a little exploration, you can quickly get started.

3.2.3 Save Results

The judgment result table that pops up can be saved as a file, refer to /data_samples/TAS_Result.csv for the actual data, which adds the following columns to the left of the original data file:

| Label| Max_Ratio Classification| Max_Ratio Probability| Soft-Max Classification| Soft-Max Probability| TAS as VOL| | ------------ | --------------------- | --------------------- | --------------------- | --------------------- | | Zhang SH2016 | Basalt | 1 | Tholeiite | 0.047926 | Basalt | | Zhang SH2016 | Picrite | 0.684 | Picrite | 0.046181 | Basalt | | Zhang SH2016 | Basalt | 0.792 | Basalt | 0.046446 | Basalt | | Zhang SH2016 | Basalt | 0.655 | Basalt | 0.046292 | Basalt | | Zhang SH2016 | Adakite | 1 | Andesite | 0.046458 | Basaltic Andesite | | Zhang SH2016 | Basalt | 0.967 | Tholeiite | 0.047371 | Basalt | | Zhang SH2016 | Basalt | 0.905 | Basalt | 0.046621 | Basalt | | Zhang SH2016 | Tephrite | 0.964 | Basanite | 0.046108 | Basalt | | Zhang SH2016 | Picrite | 0.73 | Picrite | 0.046225 | Basalt | | Zhang SH2016 | Picrite | 0.603 | Picrite | 0.046105 | Basalt | | Zhang SH2016 | Basalt | 0.699 | Basalt | 0.046336 | Basalt | | Zhang SH2016 | Picrite | 0.862 | Picrite | 0.046412 | Basalt | | Zhang SH2016 | Komatiite | 1 | Picrite | 0.046572 | Basalt | | Zhang SH2016 | Picrite | 0.684 | Picrite | 0.046204 | Basalt | | Zhang SH2016 | Nephelinite | 0.542 | Picrite | 0.045982 | Basalt | | Zhang SH2016 | Picrite | 0.863 | Picrite | 0.046397 | Basalt | | Zhang SH2016 | Boninite | 1 | Tholeiite | 0.04698 | Basalt | | Wang chong 2016 | Basalt | 0.757 | Tholeiite | 0.047483 | Basalt | | Wang chong 2016 | Picrite | 0.803 | Tholeiite | 0.047129 | Basalt | | Wang chong 2016 | Basalt | 0.85 | Tholeiite | 0.047751 | Basalt | | Wang chong 2016 | Picrite | 0.795 | Tholeiite | 0.047208 | Basalt | | Wang chong 2016 | Basalt | 0.961 | Tholeiite | 0.048203 | Basalt | | Wang chong 2016 | Tholeiite | 1 | Tholeiite | 0.048437 | Basalt | | Wang chong 2016 | Basalt | 0.747 | Basalt | 0.046416 | Basalt | | Wang chong 2016 | Basalt | 0.903 | Tholeiite | 0.046841 | Basalt |

3.3 Save the Plot

After adjusting the plot to your satisfaction, you can click the Save Plot button on the main interface to save the current plot:

The program provides four save formats: JPG and PNG are bitmap formats, while PDF and SVG are vector formats. If you plan to use CorelDraw or Adobe Illustrator, you may prefer to save the plot as a PDF. If you intend to use Ink Scape or Affinity Designer

About

TAS Diagram combining Gaussian KDE with Adaptive Bandwidth and SoftMax Probabilistic Discrimination.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

TAS-GS

TAS-GS: An Extended TAS Diagram Software Based on Adaptive Bandwidth Gaussian Kernel Density Estimation and Softmax Probabilistic Discrimination

TAS-GS is a software for constructing TAS diagrams, which is based on adaptive bandwidth Gaussian kernel density estimation and softmax probabilistic discrimination. It can provide more accurate and reliable results for the analysis of geochemical data.

Version: 1.0.0

1 Introduction

1. Overview

TAS-GS is an extended TAS diagram software based on Adaptive Bandwidth Gaussian Kernel Density Estimation (Gaussian KDE) and Softmax Probabilistic Discrimination. The classic TAS diagram is a technique for classifying unamed igneous rocks by plotting the relationship between total alkali and silica.

1.1 Development Background and Innovation

The traditional TAS method is based on the correlation between total alkali and silica in igneous rocks, and it intuitively divides rock types on a 2D diagram. This method is simple and easy to operate. However, with the increase of data set size and diversity, the traditional boundary distinguishing method may become blurred or unstable.

The TAS-GS version developed on this basis introduces Adaptive Bandwidth Gaussian Kernel Density Estimation (Gaussian KDE) and Softmax Probabilistic Discrimination. The GS part represents this improvement. The data sample is based on the GEOROC global igneous rock database. The data method is based on the experience summarized in the teaching and research work of data science and big data analysis.

In the TAS-GS system, each sample to be classified will be determined according to the probability distribution obtained from the GEOROC database. This inherits the classification boundaries of the traditional classic TAS method, ensuring the forward compatibility of the new method with the classic diagram. Based on the probability field, the software introduces adaptive bandwidth technology for Gaussian Kernel Density Estimation, which takes into account both data shape and classification stability, avoids overfitting to the original data, and maintains numerical stability in terms of availability. As the data volume accumulates, the adaptive bandwidth will reach a basic level of stability, and the Gaussian kernel density estimation based on this will reach second-order stability, making the model more robust and providing more accurate classification solutions for igneous rocks.

1.2 Development Environment

The development environment for this software is as follows:

Library NameVersion NumberFunction Description
PySide66.6.2Qt binding library for GUI development in Python
beeware0.3.0Native cross-platform mobile and desktop app development tool
matplotlib3.8.3Data visualization library for creating high-quality charts
numpy1.26.4Scientific computing library with a wide range of mathematical functions and array operations
pandas2.2.1Data analysis library with DataFrame and other data structures
scipy1.12.0Scientific computing library with advanced mathematical algorithms
toga0.4.2Python UI toolkit for building cross-platform native GUI apps
toga-chart0.2.0An extension for Toga library to create charts and data visualizations
scikit-learn1.4.1Machine learning library with a variety of supervised and unsupervised learning algorithms

Note: Some important components, such as scikit-learn, must strictly adhere to the required version number. If other versions are installed, the software may not work properly.

1.3 Running Environment

The minimum hardware configuration required for this software to run is as follows:

Configuration ItemMinimum Requirement
Processor2 GHz or faster processor
Memory (RAM)4 GB or more
Free Hard Disk Space1 GB or more
Display Resolution1920 x 1080 resolution

This software combines PySide6 and BeeWare, which is a cross-platform GUI application development solution. It uses PySide6 to build the interface and leverages BeeWare's Briefcase for one-click packaging and running. This ensures that the application can run natively on popular operating systems such as Windows, GNU/Linux, etc.

The recommended operating system for this software is as follows:

Operating SystemVersion NumberArchitectureMinimum Version RequirementRecommended Version Requirement
Windows10x641011
LinuxUbuntu 22.04x64Ubuntu 20.04Ubuntu 22.04

2 Installation

For Windows users, the installation is particularly simple.

2.1 Download and Run for Windows System

Download link: https://pan.baidu.com/s/1Ja0kuJncBAuVbYVmSFLLVg?pwd=wzc2 Extraction code: wzc2

Please note that the currently provided installation package is only suitable for the latest mainstream Windows operating system versions, such as Windows 10 and Windows 11. For earlier versions of the operating system, due to the lack of corresponding environment for developers and ineffective testing, the software and its dependent packages may not run properly on these older versions of the system.

2.1.1 Installation Using the MSI Installer for Windows System

After downloading the installation package from the provided link (e.g., "TAS-GS-1.0.0.msi"), you can proceed with the installation by double-clicking the file.

During the installation process, you will be prompted to choose between two installation modes: one for the current user and another for the entire system.

The installation may take a few minutes, so please be patient.

Once the installation is successful, you will see a prompt indicating that the installation is complete.

After installation, you can find the installed application in the Start menu.

If you need to uninstall the software at any point, you can do so through the Application Management.

2.1.2 Green Version Zip File Extraction and Running

In the provided link, you will also find a file named "TAS-GS-1.0.0.zip". Download and extract this file to generate an independent folder. To ensure that the built-in interpreter can run normally, please ensure that it is stored in a folder with a full English path and avoid any spaces in the path.

After ensuring the path is correct, look for an file called "TAS-GS.exe" within the extracted folder and double-click it to run the program.

2.2 Cloning and Running

2.2.1 Cloning the Code

This method is suitable for GNU/Linux and macOS users, as well as Windows users, but it might be a bit troublesome for Windows users.

To run the application software of this project, you need to use git to clone the code, so you need to install git and have access to the internet to access github and obtain the code. After cloning the code, you will need a Python version 3.10 or above to run the cloned file.

In addition to the above-mentioned files, you may need to install some other system-level dependencies.

Here, taking the specific operating system environment of the developer's Ubuntu 22.04.3 LTS as an example, the following commands are used to install the required dependencies:

sudo apt update
sudo apt install build-essential git pkg-config python3-dev python3-venv libgirepository1.0-dev libcairo2-dev gir1.2-webkit2-4.0 libcanberra-gtk3-module libxkbcommon0 qtwayland5 libegl1-mesa

If you skip the above steps, you may encounter errors when installing pycairo, and thus cannot complete the installation of the dependent environment.

To clone the code and install the required packages using pip, please follow the commands below:

Clone the code from GitHub:

git clone https://github.com/GeoPyTool/TAS-GS.git
cd TAS-GS
pip install -r requirement.txt

If the dependency installation is completed, you will see information similar to the following, sometimes there may be some warnings, but this will not be a big problem, as long as it is not an error, it should be basically fine.

2.2.2 Run the Project

Remain in the cloned code path and find the subfolder 'tasgs'. Use the 'cd' command to enter it and then run 'briefcase run' to start the application.

cd tasgs
briefcase run

The first run may require updating some program templates, so it might take some time. Patience is a virtue, and there's nothing you can do but wait. Additionally, you'll need a stable internet connection to access GitHub.

These very time-consuming steps mainly just appear during the first run and won't have too many similar issues later on when running the code again, which will save a significant amount of time in the future.

3 Usage

The operation and use of TAS-GS are designed to be very simple, so it should be easy for users to get started.

3.1 Data File Format

TAS-GS supports CSV and Excel files, and the specific settings can be referred to from the following screenshots:

The required columns are Label,SiO2(wt%),K2O(wt%),Na2O(wt%), where Label is your sample label, and SiO2(wt%) and K2O(wt%)+Na2O(wt%) are the data you want to plot.

Note that you should use the data normalized after adding all oxides and then calibrating, which is more reliable.

To simplify the running process and reduce design complexity, TAS-GS itself no longer provides the function of data normalization, which can be done in Excel or WPS, and is not troublesome.

This time, TAS-GS does not require any additional settings, and the program can automatically assign different colors to groups of data based on their labels, refer to the data sample data_samples/TAS.csv.

3.2 Running the Program

No matter how it is installed and run, the overall graphical interface is basically the same:

3.2.1 Open Data File

Just select a CSV or Excel file to load it into the program interface.

3.2.2 Plot and Judgment

There are two buttons on the main interface: Plot Data and Export Result. Click on the former to generate a plot:

Click on the latter to pop up the classification results:

This operation process is very intuitive, and there is basically no learning cost. With a little exploration, you can quickly get started.

3.2.3 Save Results

The judgment result table that pops up can be saved as a file, refer to /data_samples/TAS_Result.csv for the actual data, which adds the following columns to the left of the original data file:

| Label| Max_Ratio Classification| Max_Ratio Probability| Soft-Max Classification| Soft-Max Probability| TAS as VOL| | ------------ | --------------------- | --------------------- | --------------------- | --------------------- | | Zhang SH2016 | Basalt | 1 | Tholeiite | 0.047926 | Basalt | | Zhang SH2016 | Picrite | 0.684 | Picrite | 0.046181 | Basalt | | Zhang SH2016 | Basalt | 0.792 | Basalt | 0.046446 | Basalt | | Zhang SH2016 | Basalt | 0.655 | Basalt | 0.046292 | Basalt | | Zhang SH2016 | Adakite | 1 | Andesite | 0.046458 | Basaltic Andesite | | Zhang SH2016 | Basalt | 0.967 | Tholeiite | 0.047371 | Basalt | | Zhang SH2016 | Basalt | 0.905 | Basalt | 0.046621 | Basalt | | Zhang SH2016 | Tephrite | 0.964 | Basanite | 0.046108 | Basalt | | Zhang SH2016 | Picrite | 0.73 | Picrite | 0.046225 | Basalt | | Zhang SH2016 | Picrite | 0.603 | Picrite | 0.046105 | Basalt | | Zhang SH2016 | Basalt | 0.699 | Basalt | 0.046336 | Basalt | | Zhang SH2016 | Picrite | 0.862 | Picrite | 0.046412 | Basalt | | Zhang SH2016 | Komatiite | 1 | Picrite | 0.046572 | Basalt | | Zhang SH2016 | Picrite | 0.684 | Picrite | 0.046204 | Basalt | | Zhang SH2016 | Nephelinite | 0.542 | Picrite | 0.045982 | Basalt | | Zhang SH2016 | Picrite | 0.863 | Picrite | 0.046397 | Basalt | | Zhang SH2016 | Boninite | 1 | Tholeiite | 0.04698 | Basalt | | Wang chong 2016 | Basalt | 0.757 | Tholeiite | 0.047483 | Basalt | | Wang chong 2016 | Picrite | 0.803 | Tholeiite | 0.047129 | Basalt | | Wang chong 2016 | Basalt | 0.85 | Tholeiite | 0.047751 | Basalt | | Wang chong 2016 | Picrite | 0.795 | Tholeiite | 0.047208 | Basalt | | Wang chong 2016 | Basalt | 0.961 | Tholeiite | 0.048203 | Basalt | | Wang chong 2016 | Tholeiite | 1 | Tholeiite | 0.048437 | Basalt | | Wang chong 2016 | Basalt | 0.747 | Basalt | 0.046416 | Basalt | | Wang chong 2016 | Basalt | 0.903 | Tholeiite | 0.046841 | Basalt |

3.3 Save the Plot

After adjusting the plot to your satisfaction, you can click the Save Plot button on the main interface to save the current plot:

The program provides four save formats: JPG and PNG are bitmap formats, while PDF and SVG are vector formats. If you plan to use CorelDraw or Adobe Illustrator, you may prefer to save the plot as a PDF. If you intend to use Ink Scape or Affinity Designer

About

TAS Diagram combining Gaussian KDE with Adaptive Bandwidth and SoftMax Probabilistic Discrimination.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Repository files navigation

TAS-GS

TAS-GS: An Extended TAS Diagram Software Based on Adaptive Bandwidth Gaussian Kernel Density Estimation and Softmax Probabilistic Discrimination

TAS-GS is a software for constructing TAS diagrams, which is based on adaptive bandwidth Gaussian kernel density estimation and softmax probabilistic discrimination. It can provide more accurate and reliable results for the analysis of geochemical data.

Version: 1.0.0

1 Introduction

1. Overview

TAS-GS is an extended TAS diagram software based on Adaptive Bandwidth Gaussian Kernel Density Estimation (Gaussian KDE) and Softmax Probabilistic Discrimination. The classic TAS diagram is a technique for classifying unamed igneous rocks by plotting the relationship between total alkali and silica.

1.1 Development Background and Innovation

The traditional TAS method is based on the correlation between total alkali and silica in igneous rocks, and it intuitively divides rock types on a 2D diagram. This method is simple and easy to operate. However, with the increase of data set size and diversity, the traditional boundary distinguishing method may become blurred or unstable.

The TAS-GS version developed on this basis introduces Adaptive Bandwidth Gaussian Kernel Density Estimation (Gaussian KDE) and Softmax Probabilistic Discrimination. The GS part represents this improvement. The data sample is based on the GEOROC global igneous rock database. The data method is based on the experience summarized in the teaching and research work of data science and big data analysis.

In the TAS-GS system, each sample to be classified will be determined according to the probability distribution obtained from the GEOROC database. This inherits the classification boundaries of the traditional classic TAS method, ensuring the forward compatibility of the new method with the classic diagram. Based on the probability field, the software introduces adaptive bandwidth technology for Gaussian Kernel Density Estimation, which takes into account both data shape and classification stability, avoids overfitting to the original data, and maintains numerical stability in terms of availability. As the data volume accumulates, the adaptive bandwidth will reach a basic level of stability, and the Gaussian kernel density estimation based on this will reach second-order stability, making the model more robust and providing more accurate classification solutions for igneous rocks.

1.2 Development Environment

The development environment for this software is as follows:

Library NameVersion NumberFunction Description
PySide66.6.2Qt binding library for GUI development in Python
beeware0.3.0Native cross-platform mobile and desktop app development tool
matplotlib3.8.3Data visualization library for creating high-quality charts
numpy1.26.4Scientific computing library with a wide range of mathematical functions and array operations
pandas2.2.1Data analysis library with DataFrame and other data structures
scipy1.12.0Scientific computing library with advanced mathematical algorithms
toga0.4.2Python UI toolkit for building cross-platform native GUI apps
toga-chart0.2.0An extension for Toga library to create charts and data visualizations
scikit-learn1.4.1Machine learning library with a variety of supervised and unsupervised learning algorithms

Note: Some important components, such as scikit-learn, must strictly adhere to the required version number. If other versions are installed, the software may not work properly.

1.3 Running Environment

The minimum hardware configuration required for this software to run is as follows:

Configuration ItemMinimum Requirement
Processor2 GHz or faster processor
Memory (RAM)4 GB or more
Free Hard Disk Space1 GB or more
Display Resolution1920 x 1080 resolution

This software combines PySide6 and BeeWare, which is a cross-platform GUI application development solution. It uses PySide6 to build the interface and leverages BeeWare's Briefcase for one-click packaging and running. This ensures that the application can run natively on popular operating systems such as Windows, GNU/Linux, etc.

The recommended operating system for this software is as follows:

Operating SystemVersion NumberArchitectureMinimum Version RequirementRecommended Version Requirement
Windows10x641011
LinuxUbuntu 22.04x64Ubuntu 20.04Ubuntu 22.04

2 Installation

For Windows users, the installation is particularly simple.

2.1 Download and Run for Windows System

Download link: https://pan.baidu.com/s/1Ja0kuJncBAuVbYVmSFLLVg?pwd=wzc2 Extraction code: wzc2

Please note that the currently provided installation package is only suitable for the latest mainstream Windows operating system versions, such as Windows 10 and Windows 11. For earlier versions of the operating system, due to the lack of corresponding environment for developers and ineffective testing, the software and its dependent packages may not run properly on these older versions of the system.

2.1.1 Installation Using the MSI Installer for Windows System

After downloading the installation package from the provided link (e.g., "TAS-GS-1.0.0.msi"), you can proceed with the installation by double-clicking the file.

During the installation process, you will be prompted to choose between two installation modes: one for the current user and another for the entire system.

The installation may take a few minutes, so please be patient.

Once the installation is successful, you will see a prompt indicating that the installation is complete.

After installation, you can find the installed application in the Start menu.

If you need to uninstall the software at any point, you can do so through the Application Management.

2.1.2 Green Version Zip File Extraction and Running

In the provided link, you will also find a file named "TAS-GS-1.0.0.zip". Download and extract this file to generate an independent folder. To ensure that the built-in interpreter can run normally, please ensure that it is stored in a folder with a full English path and avoid any spaces in the path.

After ensuring the path is correct, look for an file called "TAS-GS.exe" within the extracted folder and double-click it to run the program.

2.2 Cloning and Running

2.2.1 Cloning the Code

This method is suitable for GNU/Linux and macOS users, as well as Windows users, but it might be a bit troublesome for Windows users.

To run the application software of this project, you need to use git to clone the code, so you need to install git and have access to the internet to access github and obtain the code. After cloning the code, you will need a Python version 3.10 or above to run the cloned file.

In addition to the above-mentioned files, you may need to install some other system-level dependencies.

Here, taking the specific operating system environment of the developer's Ubuntu 22.04.3 LTS as an example, the following commands are used to install the required dependencies:

sudo apt update
sudo apt install build-essential git pkg-config python3-dev python3-venv libgirepository1.0-dev libcairo2-dev gir1.2-webkit2-4.0 libcanberra-gtk3-module libxkbcommon0 qtwayland5 libegl1-mesa

If you skip the above steps, you may encounter errors when installing pycairo, and thus cannot complete the installation of the dependent environment.

To clone the code and install the required packages using pip, please follow the commands below:

Clone the code from GitHub:

git clone https://github.com/GeoPyTool/TAS-GS.git
cd TAS-GS
pip install -r requirement.txt

If the dependency installation is completed, you will see information similar to the following, sometimes there may be some warnings, but this will not be a big problem, as long as it is not an error, it should be basically fine.

2.2.2 Run the Project

Remain in the cloned code path and find the subfolder 'tasgs'. Use the 'cd' command to enter it and then run 'briefcase run' to start the application.

cd tasgs
briefcase run

The first run may require updating some program templates, so it might take some time. Patience is a virtue, and there's nothing you can do but wait. Additionally, you'll need a stable internet connection to access GitHub.

These very time-consuming steps mainly just appear during the first run and won't have too many similar issues later on when running the code again, which will save a significant amount of time in the future.

3 Usage

The operation and use of TAS-GS are designed to be very simple, so it should be easy for users to get started.

3.1 Data File Format

TAS-GS supports CSV and Excel files, and the specific settings can be referred to from the following screenshots:

The required columns are Label,SiO2(wt%),K2O(wt%),Na2O(wt%), where Label is your sample label, and SiO2(wt%) and K2O(wt%)+Na2O(wt%) are the data you want to plot.

Note that you should use the data normalized after adding all oxides and then calibrating, which is more reliable.

To simplify the running process and reduce design complexity, TAS-GS itself no longer provides the function of data normalization, which can be done in Excel or WPS, and is not troublesome.

This time, TAS-GS does not require any additional settings, and the program can automatically assign different colors to groups of data based on their labels, refer to the data sample data_samples/TAS.csv.

3.2 Running the Program

No matter how it is installed and run, the overall graphical interface is basically the same:

3.2.1 Open Data File

Just select a CSV or Excel file to load it into the program interface.

3.2.2 Plot and Judgment

There are two buttons on the main interface: Plot Data and Export Result. Click on the former to generate a plot:

Click on the latter to pop up the classification results:

This operation process is very intuitive, and there is basically no learning cost. With a little exploration, you can quickly get started.

3.2.3 Save Results

The judgment result table that pops up can be saved as a file, refer to /data_samples/TAS_Result.csv for the actual data, which adds the following columns to the left of the original data file:

| Label| Max_Ratio Classification| Max_Ratio Probability| Soft-Max Classification| Soft-Max Probability| TAS as VOL| | ------------ | --------------------- | --------------------- | --------------------- | --------------------- | | Zhang SH2016 | Basalt | 1 | Tholeiite | 0.047926 | Basalt | | Zhang SH2016 | Picrite | 0.684 | Picrite | 0.046181 | Basalt | | Zhang SH2016 | Basalt | 0.792 | Basalt | 0.046446 | Basalt | | Zhang SH2016 | Basalt | 0.655 | Basalt | 0.046292 | Basalt | | Zhang SH2016 | Adakite | 1 | Andesite | 0.046458 | Basaltic Andesite | | Zhang SH2016 | Basalt | 0.967 | Tholeiite | 0.047371 | Basalt | | Zhang SH2016 | Basalt | 0.905 | Basalt | 0.046621 | Basalt | | Zhang SH2016 | Tephrite | 0.964 | Basanite | 0.046108 | Basalt | | Zhang SH2016 | Picrite | 0.73 | Picrite | 0.046225 | Basalt | | Zhang SH2016 | Picrite | 0.603 | Picrite | 0.046105 | Basalt | | Zhang SH2016 | Basalt | 0.699 | Basalt | 0.046336 | Basalt | | Zhang SH2016 | Picrite | 0.862 | Picrite | 0.046412 | Basalt | | Zhang SH2016 | Komatiite | 1 | Picrite | 0.046572 | Basalt | | Zhang SH2016 | Picrite | 0.684 | Picrite | 0.046204 | Basalt | | Zhang SH2016 | Nephelinite | 0.542 | Picrite | 0.045982 | Basalt | | Zhang SH2016 | Picrite | 0.863 | Picrite | 0.046397 | Basalt | | Zhang SH2016 | Boninite | 1 | Tholeiite | 0.04698 | Basalt | | Wang chong 2016 | Basalt | 0.757 | Tholeiite | 0.047483 | Basalt | | Wang chong 2016 | Picrite | 0.803 | Tholeiite | 0.047129 | Basalt | | Wang chong 2016 | Basalt | 0.85 | Tholeiite | 0.047751 | Basalt | | Wang chong 2016 | Picrite | 0.795 | Tholeiite | 0.047208 | Basalt | | Wang chong 2016 | Basalt | 0.961 | Tholeiite | 0.048203 | Basalt | | Wang chong 2016 | Tholeiite | 1 | Tholeiite | 0.048437 | Basalt | | Wang chong 2016 | Basalt | 0.747 | Basalt | 0.046416 | Basalt | | Wang chong 2016 | Basalt | 0.903 | Tholeiite | 0.046841 | Basalt |

3.3 Save the Plot

After adjusting the plot to your satisfaction, you can click the Save Plot button on the main interface to save the current plot:

The program provides four save formats: JPG and PNG are bitmap formats, while PDF and SVG are vector formats. If you plan to use CorelDraw or Adobe Illustrator, you may prefer to save the plot as a PDF. If you intend to use Ink Scape or Affinity Designer

About

TAS Diagram combining Gaussian KDE with Adaptive Bandwidth and SoftMax Probabilistic Discrimination.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

TAS-GS

TAS-GS: An Extended TAS Diagram Software Based on Adaptive Bandwidth Gaussian Kernel Density Estimation and Softmax Probabilistic Discrimination

TAS-GS is a software for constructing TAS diagrams, which is based on adaptive bandwidth Gaussian kernel density estimation and softmax probabilistic discrimination. It can provide more accurate and reliable results for the analysis of geochemical data.

Version: 1.0.0

1 Introduction

1. Overview

TAS-GS is an extended TAS diagram software based on Adaptive Bandwidth Gaussian Kernel Density Estimation (Gaussian KDE) and Softmax Probabilistic Discrimination. The classic TAS diagram is a technique for classifying unamed igneous rocks by plotting the relationship between total alkali and silica.

1.1 Development Background and Innovation

The traditional TAS method is based on the correlation between total alkali and silica in igneous rocks, and it intuitively divides rock types on a 2D diagram. This method is simple and easy to operate. However, with the increase of data set size and diversity, the traditional boundary distinguishing method may become blurred or unstable.

The TAS-GS version developed on this basis introduces Adaptive Bandwidth Gaussian Kernel Density Estimation (Gaussian KDE) and Softmax Probabilistic Discrimination. The GS part represents this improvement. The data sample is based on the GEOROC global igneous rock database. The data method is based on the experience summarized in the teaching and research work of data science and big data analysis.

In the TAS-GS system, each sample to be classified will be determined according to the probability distribution obtained from the GEOROC database. This inherits the classification boundaries of the traditional classic TAS method, ensuring the forward compatibility of the new method with the classic diagram. Based on the probability field, the software introduces adaptive bandwidth technology for Gaussian Kernel Density Estimation, which takes into account both data shape and classification stability, avoids overfitting to the original data, and maintains numerical stability in terms of availability. As the data volume accumulates, the adaptive bandwidth will reach a basic level of stability, and the Gaussian kernel density estimation based on this will reach second-order stability, making the model more robust and providing more accurate classification solutions for igneous rocks.

1.2 Development Environment

The development environment for this software is as follows:

Library NameVersion NumberFunction Description
PySide66.6.2Qt binding library for GUI development in Python
beeware0.3.0Native cross-platform mobile and desktop app development tool
matplotlib3.8.3Data visualization library for creating high-quality charts
numpy1.26.4Scientific computing library with a wide range of mathematical functions and array operations
pandas2.2.1Data analysis library with DataFrame and other data structures
scipy1.12.0Scientific computing library with advanced mathematical algorithms
toga0.4.2Python UI toolkit for building cross-platform native GUI apps
toga-chart0.2.0An extension for Toga library to create charts and data visualizations
scikit-learn1.4.1Machine learning library with a variety of supervised and unsupervised learning algorithms

Note: Some important components, such as scikit-learn, must strictly adhere to the required version number. If other versions are installed, the software may not work properly.

1.3 Running Environment

The minimum hardware configuration required for this software to run is as follows:

Configuration ItemMinimum Requirement
Processor2 GHz or faster processor
Memory (RAM)4 GB or more
Free Hard Disk Space1 GB or more
Display Resolution1920 x 1080 resolution

This software combines PySide6 and BeeWare, which is a cross-platform GUI application development solution. It uses PySide6 to build the interface and leverages BeeWare's Briefcase for one-click packaging and running. This ensures that the application can run natively on popular operating systems such as Windows, GNU/Linux, etc.

The recommended operating system for this software is as follows:

Operating SystemVersion NumberArchitectureMinimum Version RequirementRecommended Version Requirement
Windows10x641011
LinuxUbuntu 22.04x64Ubuntu 20.04Ubuntu 22.04

2 Installation

For Windows users, the installation is particularly simple.

2.1 Download and Run for Windows System

Download link: https://pan.baidu.com/s/1Ja0kuJncBAuVbYVmSFLLVg?pwd=wzc2 Extraction code: wzc2

Please note that the currently provided installation package is only suitable for the latest mainstream Windows operating system versions, such as Windows 10 and Windows 11. For earlier versions of the operating system, due to the lack of corresponding environment for developers and ineffective testing, the software and its dependent packages may not run properly on these older versions of the system.

2.1.1 Installation Using the MSI Installer for Windows System

After downloading the installation package from the provided link (e.g., "TAS-GS-1.0.0.msi"), you can proceed with the installation by double-clicking the file.

During the installation process, you will be prompted to choose between two installation modes: one for the current user and another for the entire system.

The installation may take a few minutes, so please be patient.

Once the installation is successful, you will see a prompt indicating that the installation is complete.

After installation, you can find the installed application in the Start menu.

If you need to uninstall the software at any point, you can do so through the Application Management.

2.1.2 Green Version Zip File Extraction and Running

In the provided link, you will also find a file named "TAS-GS-1.0.0.zip". Download and extract this file to generate an independent folder. To ensure that the built-in interpreter can run normally, please ensure that it is stored in a folder with a full English path and avoid any spaces in the path.

After ensuring the path is correct, look for an file called "TAS-GS.exe" within the extracted folder and double-click it to run the program.

2.2 Cloning and Running

2.2.1 Cloning the Code

This method is suitable for GNU/Linux and macOS users, as well as Windows users, but it might be a bit troublesome for Windows users.

To run the application software of this project, you need to use git to clone the code, so you need to install git and have access to the internet to access github and obtain the code. After cloning the code, you will need a Python version 3.10 or above to run the cloned file.

In addition to the above-mentioned files, you may need to install some other system-level dependencies.

Here, taking the specific operating system environment of the developer's Ubuntu 22.04.3 LTS as an example, the following commands are used to install the required dependencies:

sudo apt update
sudo apt install build-essential git pkg-config python3-dev python3-venv libgirepository1.0-dev libcairo2-dev gir1.2-webkit2-4.0 libcanberra-gtk3-module libxkbcommon0 qtwayland5 libegl1-mesa

If you skip the above steps, you may encounter errors when installing pycairo, and thus cannot complete the installation of the dependent environment.

To clone the code and install the required packages using pip, please follow the commands below:

Clone the code from GitHub:

git clone https://github.com/GeoPyTool/TAS-GS.git
cd TAS-GS
pip install -r requirement.txt

If the dependency installation is completed, you will see information similar to the following, sometimes there may be some warnings, but this will not be a big problem, as long as it is not an error, it should be basically fine.

2.2.2 Run the Project

Remain in the cloned code path and find the subfolder 'tasgs'. Use the 'cd' command to enter it and then run 'briefcase run' to start the application.

cd tasgs
briefcase run

The first run may require updating some program templates, so it might take some time. Patience is a virtue, and there's nothing you can do but wait. Additionally, you'll need a stable internet connection to access GitHub.

These very time-consuming steps mainly just appear during the first run and won't have too many similar issues later on when running the code again, which will save a significant amount of time in the future.

3 Usage

The operation and use of TAS-GS are designed to be very simple, so it should be easy for users to get started.

3.1 Data File Format

TAS-GS supports CSV and Excel files, and the specific settings can be referred to from the following screenshots:

The required columns are Label,SiO2(wt%),K2O(wt%),Na2O(wt%), where Label is your sample label, and SiO2(wt%) and K2O(wt%)+Na2O(wt%) are the data you want to plot.

Note that you should use the data normalized after adding all oxides and then calibrating, which is more reliable.

To simplify the running process and reduce design complexity, TAS-GS itself no longer provides the function of data normalization, which can be done in Excel or WPS, and is not troublesome.

This time, TAS-GS does not require any additional settings, and the program can automatically assign different colors to groups of data based on their labels, refer to the data sample data_samples/TAS.csv.

3.2 Running the Program

No matter how it is installed and run, the overall graphical interface is basically the same:

3.2.1 Open Data File

Just select a CSV or Excel file to load it into the program interface.

3.2.2 Plot and Judgment

There are two buttons on the main interface: Plot Data and Export Result. Click on the former to generate a plot:

Click on the latter to pop up the classification results:

This operation process is very intuitive, and there is basically no learning cost. With a little exploration, you can quickly get started.

3.2.3 Save Results

The judgment result table that pops up can be saved as a file, refer to /data_samples/TAS_Result.csv for the actual data, which adds the following columns to the left of the original data file:

| Label| Max_Ratio Classification| Max_Ratio Probability| Soft-Max Classification| Soft-Max Probability| TAS as VOL| | ------------ | --------------------- | --------------------- | --------------------- | --------------------- | | Zhang SH2016 | Basalt | 1 | Tholeiite | 0.047926 | Basalt | | Zhang SH2016 | Picrite | 0.684 | Picrite | 0.046181 | Basalt | | Zhang SH2016 | Basalt | 0.792 | Basalt | 0.046446 | Basalt | | Zhang SH2016 | Basalt | 0.655 | Basalt | 0.046292 | Basalt | | Zhang SH2016 | Adakite | 1 | Andesite | 0.046458 | Basaltic Andesite | | Zhang SH2016 | Basalt | 0.967 | Tholeiite | 0.047371 | Basalt | | Zhang SH2016 | Basalt | 0.905 | Basalt | 0.046621 | Basalt | | Zhang SH2016 | Tephrite | 0.964 | Basanite | 0.046108 | Basalt | | Zhang SH2016 | Picrite | 0.73 | Picrite | 0.046225 | Basalt | | Zhang SH2016 | Picrite | 0.603 | Picrite | 0.046105 | Basalt | | Zhang SH2016 | Basalt | 0.699 | Basalt | 0.046336 | Basalt | | Zhang SH2016 | Picrite | 0.862 | Picrite | 0.046412 | Basalt | | Zhang SH2016 | Komatiite | 1 | Picrite | 0.046572 | Basalt | | Zhang SH2016 | Picrite | 0.684 | Picrite | 0.046204 | Basalt | | Zhang SH2016 | Nephelinite | 0.542 | Picrite | 0.045982 | Basalt | | Zhang SH2016 | Picrite | 0.863 | Picrite | 0.046397 | Basalt | | Zhang SH2016 | Boninite | 1 | Tholeiite | 0.04698 | Basalt | | Wang chong 2016 | Basalt | 0.757 | Tholeiite | 0.047483 | Basalt | | Wang chong 2016 | Picrite | 0.803 | Tholeiite | 0.047129 | Basalt | | Wang chong 2016 | Basalt | 0.85 | Tholeiite | 0.047751 | Basalt | | Wang chong 2016 | Picrite | 0.795 | Tholeiite | 0.047208 | Basalt | | Wang chong 2016 | Basalt | 0.961 | Tholeiite | 0.048203 | Basalt | | Wang chong 2016 | Tholeiite | 1 | Tholeiite | 0.048437 | Basalt | | Wang chong 2016 | Basalt | 0.747 | Basalt | 0.046416 | Basalt | | Wang chong 2016 | Basalt | 0.903 | Tholeiite | 0.046841 | Basalt |

3.3 Save the Plot

After adjusting the plot to your satisfaction, you can click the Save Plot button on the main interface to save the current plot:

The program provides four save formats: JPG and PNG are bitmap formats, while PDF and SVG are vector formats. If you plan to use CorelDraw or Adobe Illustrator, you may prefer to save the plot as a PDF. If you intend to use Ink Scape or Affinity Designer

About

TAS Diagram combining Gaussian KDE with Adaptive Bandwidth and SoftMax Probabilistic Discrimination.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Repository files navigation

TAS-GS

TAS-GS: An Extended TAS Diagram Software Based on Adaptive Bandwidth Gaussian Kernel Density Estimation and Softmax Probabilistic Discrimination

TAS-GS is a software for constructing TAS diagrams, which is based on adaptive bandwidth Gaussian kernel density estimation and softmax probabilistic discrimination. It can provide more accurate and reliable results for the analysis of geochemical data.

Version: 1.0.0

1 Introduction

1. Overview

TAS-GS is an extended TAS diagram software based on Adaptive Bandwidth Gaussian Kernel Density Estimation (Gaussian KDE) and Softmax Probabilistic Discrimination. The classic TAS diagram is a technique for classifying unamed igneous rocks by plotting the relationship between total alkali and silica.

1.1 Development Background and Innovation

The traditional TAS method is based on the correlation between total alkali and silica in igneous rocks, and it intuitively divides rock types on a 2D diagram. This method is simple and easy to operate. However, with the increase of data set size and diversity, the traditional boundary distinguishing method may become blurred or unstable.

The TAS-GS version developed on this basis introduces Adaptive Bandwidth Gaussian Kernel Density Estimation (Gaussian KDE) and Softmax Probabilistic Discrimination. The GS part represents this improvement. The data sample is based on the GEOROC global igneous rock database. The data method is based on the experience summarized in the teaching and research work of data science and big data analysis.

In the TAS-GS system, each sample to be classified will be determined according to the probability distribution obtained from the GEOROC database. This inherits the classification boundaries of the traditional classic TAS method, ensuring the forward compatibility of the new method with the classic diagram. Based on the probability field, the software introduces adaptive bandwidth technology for Gaussian Kernel Density Estimation, which takes into account both data shape and classification stability, avoids overfitting to the original data, and maintains numerical stability in terms of availability. As the data volume accumulates, the adaptive bandwidth will reach a basic level of stability, and the Gaussian kernel density estimation based on this will reach second-order stability, making the model more robust and providing more accurate classification solutions for igneous rocks.

1.2 Development Environment

The development environment for this software is as follows:

Library NameVersion NumberFunction Description
PySide66.6.2Qt binding library for GUI development in Python
beeware0.3.0Native cross-platform mobile and desktop app development tool
matplotlib3.8.3Data visualization library for creating high-quality charts
numpy1.26.4Scientific computing library with a wide range of mathematical functions and array operations
pandas2.2.1Data analysis library with DataFrame and other data structures
scipy1.12.0Scientific computing library with advanced mathematical algorithms
toga0.4.2Python UI toolkit for building cross-platform native GUI apps
toga-chart0.2.0An extension for Toga library to create charts and data visualizations
scikit-learn1.4.1Machine learning library with a variety of supervised and unsupervised learning algorithms

Note: Some important components, such as scikit-learn, must strictly adhere to the required version number. If other versions are installed, the software may not work properly.

1.3 Running Environment

The minimum hardware configuration required for this software to run is as follows:

Configuration ItemMinimum Requirement
Processor2 GHz or faster processor
Memory (RAM)4 GB or more
Free Hard Disk Space1 GB or more
Display Resolution1920 x 1080 resolution

This software combines PySide6 and BeeWare, which is a cross-platform GUI application development solution. It uses PySide6 to build the interface and leverages BeeWare's Briefcase for one-click packaging and running. This ensures that the application can run natively on popular operating systems such as Windows, GNU/Linux, etc.

The recommended operating system for this software is as follows:

Operating SystemVersion NumberArchitectureMinimum Version RequirementRecommended Version Requirement
Windows10x641011
LinuxUbuntu 22.04x64Ubuntu 20.04Ubuntu 22.04

2 Installation

For Windows users, the installation is particularly simple.

2.1 Download and Run for Windows System

Download link: https://pan.baidu.com/s/1Ja0kuJncBAuVbYVmSFLLVg?pwd=wzc2 Extraction code: wzc2

Please note that the currently provided installation package is only suitable for the latest mainstream Windows operating system versions, such as Windows 10 and Windows 11. For earlier versions of the operating system, due to the lack of corresponding environment for developers and ineffective testing, the software and its dependent packages may not run properly on these older versions of the system.

2.1.1 Installation Using the MSI Installer for Windows System

After downloading the installation package from the provided link (e.g., "TAS-GS-1.0.0.msi"), you can proceed with the installation by double-clicking the file.

During the installation process, you will be prompted to choose between two installation modes: one for the current user and another for the entire system.

The installation may take a few minutes, so please be patient.

Once the installation is successful, you will see a prompt indicating that the installation is complete.

After installation, you can find the installed application in the Start menu.

If you need to uninstall the software at any point, you can do so through the Application Management.

2.1.2 Green Version Zip File Extraction and Running

In the provided link, you will also find a file named "TAS-GS-1.0.0.zip". Download and extract this file to generate an independent folder. To ensure that the built-in interpreter can run normally, please ensure that it is stored in a folder with a full English path and avoid any spaces in the path.

After ensuring the path is correct, look for an file called "TAS-GS.exe" within the extracted folder and double-click it to run the program.

2.2 Cloning and Running

2.2.1 Cloning the Code

This method is suitable for GNU/Linux and macOS users, as well as Windows users, but it might be a bit troublesome for Windows users.

To run the application software of this project, you need to use git to clone the code, so you need to install git and have access to the internet to access github and obtain the code. After cloning the code, you will need a Python version 3.10 or above to run the cloned file.

In addition to the above-mentioned files, you may need to install some other system-level dependencies.

Here, taking the specific operating system environment of the developer's Ubuntu 22.04.3 LTS as an example, the following commands are used to install the required dependencies:

sudo apt update
sudo apt install build-essential git pkg-config python3-dev python3-venv libgirepository1.0-dev libcairo2-dev gir1.2-webkit2-4.0 libcanberra-gtk3-module libxkbcommon0 qtwayland5 libegl1-mesa

If you skip the above steps, you may encounter errors when installing pycairo, and thus cannot complete the installation of the dependent environment.

To clone the code and install the required packages using pip, please follow the commands below:

Clone the code from GitHub:

git clone https://github.com/GeoPyTool/TAS-GS.git
cd TAS-GS
pip install -r requirement.txt

If the dependency installation is completed, you will see information similar to the following, sometimes there may be some warnings, but this will not be a big problem, as long as it is not an error, it should be basically fine.

2.2.2 Run the Project

Remain in the cloned code path and find the subfolder 'tasgs'. Use the 'cd' command to enter it and then run 'briefcase run' to start the application.

cd tasgs
briefcase run

The first run may require updating some program templates, so it might take some time. Patience is a virtue, and there's nothing you can do but wait. Additionally, you'll need a stable internet connection to access GitHub.

These very time-consuming steps mainly just appear during the first run and won't have too many similar issues later on when running the code again, which will save a significant amount of time in the future.

3 Usage

The operation and use of TAS-GS are designed to be very simple, so it should be easy for users to get started.

3.1 Data File Format

TAS-GS supports CSV and Excel files, and the specific settings can be referred to from the following screenshots:

The required columns are Label,SiO2(wt%),K2O(wt%),Na2O(wt%), where Label is your sample label, and SiO2(wt%) and K2O(wt%)+Na2O(wt%) are the data you want to plot.

Note that you should use the data normalized after adding all oxides and then calibrating, which is more reliable.

To simplify the running process and reduce design complexity, TAS-GS itself no longer provides the function of data normalization, which can be done in Excel or WPS, and is not troublesome.

This time, TAS-GS does not require any additional settings, and the program can automatically assign different colors to groups of data based on their labels, refer to the data sample data_samples/TAS.csv.

3.2 Running the Program

No matter how it is installed and run, the overall graphical interface is basically the same:

3.2.1 Open Data File

Just select a CSV or Excel file to load it into the program interface.

3.2.2 Plot and Judgment

There are two buttons on the main interface: Plot Data and Export Result. Click on the former to generate a plot:

Click on the latter to pop up the classification results:

This operation process is very intuitive, and there is basically no learning cost. With a little exploration, you can quickly get started.

3.2.3 Save Results

The judgment result table that pops up can be saved as a file, refer to /data_samples/TAS_Result.csv for the actual data, which adds the following columns to the left of the original data file:

| Label| Max_Ratio Classification| Max_Ratio Probability| Soft-Max Classification| Soft-Max Probability| TAS as VOL| | ------------ | --------------------- | --------------------- | --------------------- | --------------------- | | Zhang SH2016 | Basalt | 1 | Tholeiite | 0.047926 | Basalt | | Zhang SH2016 | Picrite | 0.684 | Picrite | 0.046181 | Basalt | | Zhang SH2016 | Basalt | 0.792 | Basalt | 0.046446 | Basalt | | Zhang SH2016 | Basalt | 0.655 | Basalt | 0.046292 | Basalt | | Zhang SH2016 | Adakite | 1 | Andesite | 0.046458 | Basaltic Andesite | | Zhang SH2016 | Basalt | 0.967 | Tholeiite | 0.047371 | Basalt | | Zhang SH2016 | Basalt | 0.905 | Basalt | 0.046621 | Basalt | | Zhang SH2016 | Tephrite | 0.964 | Basanite | 0.046108 | Basalt | | Zhang SH2016 | Picrite | 0.73 | Picrite | 0.046225 | Basalt | | Zhang SH2016 | Picrite | 0.603 | Picrite | 0.046105 | Basalt | | Zhang SH2016 | Basalt | 0.699 | Basalt | 0.046336 | Basalt | | Zhang SH2016 | Picrite | 0.862 | Picrite | 0.046412 | Basalt | | Zhang SH2016 | Komatiite | 1 | Picrite | 0.046572 | Basalt | | Zhang SH2016 | Picrite | 0.684 | Picrite | 0.046204 | Basalt | | Zhang SH2016 | Nephelinite | 0.542 | Picrite | 0.045982 | Basalt | | Zhang SH2016 | Picrite | 0.863 | Picrite | 0.046397 | Basalt | | Zhang SH2016 | Boninite | 1 | Tholeiite | 0.04698 | Basalt | | Wang chong 2016 | Basalt | 0.757 | Tholeiite | 0.047483 | Basalt | | Wang chong 2016 | Picrite | 0.803 | Tholeiite | 0.047129 | Basalt | | Wang chong 2016 | Basalt | 0.85 | Tholeiite | 0.047751 | Basalt | | Wang chong 2016 | Picrite | 0.795 | Tholeiite | 0.047208 | Basalt | | Wang chong 2016 | Basalt | 0.961 | Tholeiite | 0.048203 | Basalt | | Wang chong 2016 | Tholeiite | 1 | Tholeiite | 0.048437 | Basalt | | Wang chong 2016 | Basalt | 0.747 | Basalt | 0.046416 | Basalt | | Wang chong 2016 | Basalt | 0.903 | Tholeiite | 0.046841 | Basalt |

3.3 Save the Plot

After adjusting the plot to your satisfaction, you can click the Save Plot button on the main interface to save the current plot:

The program provides four save formats: JPG and PNG are bitmap formats, while PDF and SVG are vector formats. If you plan to use CorelDraw or Adobe Illustrator, you may prefer to save the plot as a PDF. If you intend to use Ink Scape or Affinity Designer

About

TAS Diagram combining Gaussian KDE with Adaptive Bandwidth and SoftMax Probabilistic Discrimination.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Repository files navigation

TAS-GS

TAS-GS: An Extended TAS Diagram Software Based on Adaptive Bandwidth Gaussian Kernel Density Estimation and Softmax Probabilistic Discrimination

TAS-GS is a software for constructing TAS diagrams, which is based on adaptive bandwidth Gaussian kernel density estimation and softmax probabilistic discrimination. It can provide more accurate and reliable results for the analysis of geochemical data.

Version: 1.0.0

1 Introduction

1. Overview

TAS-GS is an extended TAS diagram software based on Adaptive Bandwidth Gaussian Kernel Density Estimation (Gaussian KDE) and Softmax Probabilistic Discrimination. The classic TAS diagram is a technique for classifying unamed igneous rocks by plotting the relationship between total alkali and silica.

1.1 Development Background and Innovation

The traditional TAS method is based on the correlation between total alkali and silica in igneous rocks, and it intuitively divides rock types on a 2D diagram. This method is simple and easy to operate. However, with the increase of data set size and diversity, the traditional boundary distinguishing method may become blurred or unstable.

The TAS-GS version developed on this basis introduces Adaptive Bandwidth Gaussian Kernel Density Estimation (Gaussian KDE) and Softmax Probabilistic Discrimination. The GS part represents this improvement. The data sample is based on the GEOROC global igneous rock database. The data method is based on the experience summarized in the teaching and research work of data science and big data analysis.

In the TAS-GS system, each sample to be classified will be determined according to the probability distribution obtained from the GEOROC database. This inherits the classification boundaries of the traditional classic TAS method, ensuring the forward compatibility of the new method with the classic diagram. Based on the probability field, the software introduces adaptive bandwidth technology for Gaussian Kernel Density Estimation, which takes into account both data shape and classification stability, avoids overfitting to the original data, and maintains numerical stability in terms of availability. As the data volume accumulates, the adaptive bandwidth will reach a basic level of stability, and the Gaussian kernel density estimation based on this will reach second-order stability, making the model more robust and providing more accurate classification solutions for igneous rocks.

1.2 Development Environment

The development environment for this software is as follows:

Library NameVersion NumberFunction Description
PySide66.6.2Qt binding library for GUI development in Python
beeware0.3.0Native cross-platform mobile and desktop app development tool
matplotlib3.8.3Data visualization library for creating high-quality charts
numpy1.26.4Scientific computing library with a wide range of mathematical functions and array operations
pandas2.2.1Data analysis library with DataFrame and other data structures
scipy1.12.0Scientific computing library with advanced mathematical algorithms
toga0.4.2Python UI toolkit for building cross-platform native GUI apps
toga-chart0.2.0An extension for Toga library to create charts and data visualizations
scikit-learn1.4.1Machine learning library with a variety of supervised and unsupervised learning algorithms

Note: Some important components, such as scikit-learn, must strictly adhere to the required version number. If other versions are installed, the software may not work properly.

1.3 Running Environment

The minimum hardware configuration required for this software to run is as follows:

Configuration ItemMinimum Requirement
Processor2 GHz or faster processor
Memory (RAM)4 GB or more
Free Hard Disk Space1 GB or more
Display Resolution1920 x 1080 resolution

This software combines PySide6 and BeeWare, which is a cross-platform GUI application development solution. It uses PySide6 to build the interface and leverages BeeWare's Briefcase for one-click packaging and running. This ensures that the application can run natively on popular operating systems such as Windows, GNU/Linux, etc.

The recommended operating system for this software is as follows:

Operating SystemVersion NumberArchitectureMinimum Version RequirementRecommended Version Requirement
Windows10x641011
LinuxUbuntu 22.04x64Ubuntu 20.04Ubuntu 22.04

2 Installation

For Windows users, the installation is particularly simple.

2.1 Download and Run for Windows System

Download link: https://pan.baidu.com/s/1Ja0kuJncBAuVbYVmSFLLVg?pwd=wzc2 Extraction code: wzc2

Please note that the currently provided installation package is only suitable for the latest mainstream Windows operating system versions, such as Windows 10 and Windows 11. For earlier versions of the operating system, due to the lack of corresponding environment for developers and ineffective testing, the software and its dependent packages may not run properly on these older versions of the system.

2.1.1 Installation Using the MSI Installer for Windows System

After downloading the installation package from the provided link (e.g., "TAS-GS-1.0.0.msi"), you can proceed with the installation by double-clicking the file.

During the installation process, you will be prompted to choose between two installation modes: one for the current user and another for the entire system.

The installation may take a few minutes, so please be patient.

Once the installation is successful, you will see a prompt indicating that the installation is complete.

After installation, you can find the installed application in the Start menu.

If you need to uninstall the software at any point, you can do so through the Application Management.

2.1.2 Green Version Zip File Extraction and Running

In the provided link, you will also find a file named "TAS-GS-1.0.0.zip". Download and extract this file to generate an independent folder. To ensure that the built-in interpreter can run normally, please ensure that it is stored in a folder with a full English path and avoid any spaces in the path.

After ensuring the path is correct, look for an file called "TAS-GS.exe" within the extracted folder and double-click it to run the program.

2.2 Cloning and Running

2.2.1 Cloning the Code

This method is suitable for GNU/Linux and macOS users, as well as Windows users, but it might be a bit troublesome for Windows users.

To run the application software of this project, you need to use git to clone the code, so you need to install git and have access to the internet to access github and obtain the code. After cloning the code, you will need a Python version 3.10 or above to run the cloned file.

In addition to the above-mentioned files, you may need to install some other system-level dependencies.

Here, taking the specific operating system environment of the developer's Ubuntu 22.04.3 LTS as an example, the following commands are used to install the required dependencies:

sudo apt update
sudo apt install build-essential git pkg-config python3-dev python3-venv libgirepository1.0-dev libcairo2-dev gir1.2-webkit2-4.0 libcanberra-gtk3-module libxkbcommon0 qtwayland5 libegl1-mesa

If you skip the above steps, you may encounter errors when installing pycairo, and thus cannot complete the installation of the dependent environment.

To clone the code and install the required packages using pip, please follow the commands below:

Clone the code from GitHub:

git clone https://github.com/GeoPyTool/TAS-GS.git
cd TAS-GS
pip install -r requirement.txt

If the dependency installation is completed, you will see information similar to the following, sometimes there may be some warnings, but this will not be a big problem, as long as it is not an error, it should be basically fine.

2.2.2 Run the Project

Remain in the cloned code path and find the subfolder 'tasgs'. Use the 'cd' command to enter it and then run 'briefcase run' to start the application.

cd tasgs
briefcase run

The first run may require updating some program templates, so it might take some time. Patience is a virtue, and there's nothing you can do but wait. Additionally, you'll need a stable internet connection to access GitHub.

These very time-consuming steps mainly just appear during the first run and won't have too many similar issues later on when running the code again, which will save a significant amount of time in the future.

3 Usage

The operation and use of TAS-GS are designed to be very simple, so it should be easy for users to get started.

3.1 Data File Format

TAS-GS supports CSV and Excel files, and the specific settings can be referred to from the following screenshots:

The required columns are Label,SiO2(wt%),K2O(wt%),Na2O(wt%), where Label is your sample label, and SiO2(wt%) and K2O(wt%)+Na2O(wt%) are the data you want to plot.

Note that you should use the data normalized after adding all oxides and then calibrating, which is more reliable.

To simplify the running process and reduce design complexity, TAS-GS itself no longer provides the function of data normalization, which can be done in Excel or WPS, and is not troublesome.

This time, TAS-GS does not require any additional settings, and the program can automatically assign different colors to groups of data based on their labels, refer to the data sample data_samples/TAS.csv.

3.2 Running the Program

No matter how it is installed and run, the overall graphical interface is basically the same:

3.2.1 Open Data File

Just select a CSV or Excel file to load it into the program interface.

3.2.2 Plot and Judgment

There are two buttons on the main interface: Plot Data and Export Result. Click on the former to generate a plot:

Click on the latter to pop up the classification results:

This operation process is very intuitive, and there is basically no learning cost. With a little exploration, you can quickly get started.

3.2.3 Save Results

The judgment result table that pops up can be saved as a file, refer to /data_samples/TAS_Result.csv for the actual data, which adds the following columns to the left of the original data file:

| Label| Max_Ratio Classification| Max_Ratio Probability| Soft-Max Classification| Soft-Max Probability| TAS as VOL| | ------------ | --------------------- | --------------------- | --------------------- | --------------------- | | Zhang SH2016 | Basalt | 1 | Tholeiite | 0.047926 | Basalt | | Zhang SH2016 | Picrite | 0.684 | Picrite | 0.046181 | Basalt | | Zhang SH2016 | Basalt | 0.792 | Basalt | 0.046446 | Basalt | | Zhang SH2016 | Basalt | 0.655 | Basalt | 0.046292 | Basalt | | Zhang SH2016 | Adakite | 1 | Andesite | 0.046458 | Basaltic Andesite | | Zhang SH2016 | Basalt | 0.967 | Tholeiite | 0.047371 | Basalt | | Zhang SH2016 | Basalt | 0.905 | Basalt | 0.046621 | Basalt | | Zhang SH2016 | Tephrite | 0.964 | Basanite | 0.046108 | Basalt | | Zhang SH2016 | Picrite | 0.73 | Picrite | 0.046225 | Basalt | | Zhang SH2016 | Picrite | 0.603 | Picrite | 0.046105 | Basalt | | Zhang SH2016 | Basalt | 0.699 | Basalt | 0.046336 | Basalt | | Zhang SH2016 | Picrite | 0.862 | Picrite | 0.046412 | Basalt | | Zhang SH2016 | Komatiite | 1 | Picrite | 0.046572 | Basalt | | Zhang SH2016 | Picrite | 0.684 | Picrite | 0.046204 | Basalt | | Zhang SH2016 | Nephelinite | 0.542 | Picrite | 0.045982 | Basalt | | Zhang SH2016 | Picrite | 0.863 | Picrite | 0.046397 | Basalt | | Zhang SH2016 | Boninite | 1 | Tholeiite | 0.04698 | Basalt | | Wang chong 2016 | Basalt | 0.757 | Tholeiite | 0.047483 | Basalt | | Wang chong 2016 | Picrite | 0.803 | Tholeiite | 0.047129 | Basalt | | Wang chong 2016 | Basalt | 0.85 | Tholeiite | 0.047751 | Basalt | | Wang chong 2016 | Picrite | 0.795 | Tholeiite | 0.047208 | Basalt | | Wang chong 2016 | Basalt | 0.961 | Tholeiite | 0.048203 | Basalt | | Wang chong 2016 | Tholeiite | 1 | Tholeiite | 0.048437 | Basalt | | Wang chong 2016 | Basalt | 0.747 | Basalt | 0.046416 | Basalt | | Wang chong 2016 | Basalt | 0.903 | Tholeiite | 0.046841 | Basalt |

3.3 Save the Plot

After adjusting the plot to your satisfaction, you can click the Save Plot button on the main interface to save the current plot:

The program provides four save formats: JPG and PNG are bitmap formats, while PDF and SVG are vector formats. If you plan to use CorelDraw or Adobe Illustrator, you may prefer to save the plot as a PDF. If you intend to use Ink Scape or Affinity Designer

About

TAS Diagram combining Gaussian KDE with Adaptive Bandwidth and SoftMax Probabilistic Discrimination.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages