pyTGA¶
Description¶
A simple python library for parsing and processing Thermogravimetric analysis (TGA) data. At the moment, .txt files from Perkin Elmer, Mettler Toledo, Netzsch, as well as files from TA Instruments (excel & txt) are supported. Work in progress, if you have suggestions or requests please submit an issue.
⚠️ WARNING: pyTGA is under active development. Please report any issues using the Issue Tracker.
Getting started¶
New to python and want to use pyTGA?¶
Here is a quick guide: (Click to expand)
Install a distribution¶
The easiest way to get started with Python for scientific computing is with Anaconda:
Includes Python, package manager, and many scientific libraries
Provides a user-friendly interface (Anaconda Navigator)
Comes with Jupyter Notebook for interactive analysis
Handles most dependencies automatically
Install a code editor¶
To be able to write and run code, you should use a code editor such as
Learn the basics¶
There are plenty of online tutorials available. Here are some recommendations:
Learn about the most important libraries¶
For many applications in science, you won’t need much more than these 3 libraries:
NumPy - fundamental package for scientific computing in Python
pandas - data analysis and manipulation library
Matplotlib - comprehensive library for plotting
Installation¶
Install from PyPI:
pip install pyTGA
Development installation¶
If you want to install the development version:
Clone the repository:
git clone https://github.com/MyonicS/pyTGA
Install the package in development mode with dev dependencies by navigating to the cloned repository in your python environment and executing:
pip install -e .[dev]
Usage¶
Import the package
import pyTGA as tga
Parse a TGA file using
tga_exp = tga.parse_TGA('*path-to-your-file*')
Use the .quickplot method to have a first look at your data:
tga_exp.quickplot()
Access individual stages as pandas DataFrame:
tga_exp.stages['stage1']
Access the data of the whole experiment:
tga_exp.full
To get started, check out the ‘Quickstart’ notebook here.
Documentation¶
Full documentation of the package, including example use cases is available here.
You can also download example notebooks from the repository here using example data.
Roadmap¶
support for more manufacturers and file formats
unified weight/temperature/time parsing
more common processing features (please make suggestions with detailed explanations)
Contributing¶
Contributions are more than welcome! The easiest way to contribute is to suggest new features as an issue. If you want to contribute code or add to the documentation, fork the repository, implement your changes and submit a pull request. If you have a question, get in touch.