Unofficial parser for NETZSCH STA (Simultaneous Thermal Analysis) NGB instrument binary files. Not affiliated with, endorsed by, or approved by NETZSCH-Gerätebau GmbH.
Project description
pyNGB - NETZSCH STA File Parser
A high-performance Python library for parsing NETZSCH STA (Simultaneous Thermal Analysis) NGB files with comprehensive metadata extraction and analysis tools.
⚠️ Disclaimer: This package is not affiliated with NETZSCH-Gerätebau GmbH. NETZSCH is a trademark of NETZSCH-Gerätebau GmbH.
Features
- Strict Binary Parsing: a record-grammar tokenizer parses every byte of the file — no pattern-match guessing (tens of milliseconds per file)
- Complete Metadata: Extract instrument settings, sample info, and experimental conditions
- Baseline Correction: Automatic baseline subtraction with validation
- DTG Analysis: Derivative thermogravimetry calculation with smoothing options
- Batch Processing: Parallel processing of multiple files
- Data Export: Convert data to Parquet or CSV; export metadata to JSON
- CLI Support: Command-line interface for automation
Installation
pip install pyngb
Quick Example
from pyngb import read_ngb
import polars as pl
import json
# Load NGB file with embedded metadata
table = read_ngb("experiment.ngb-ss3")
df = pl.from_arrow(table)
# Access data
print(f"Loaded {df.height} data points")
print(f"Temperature range: {df['sample_temperature'].min():.1f} to {df['sample_temperature'].max():.1f} °C")
# Access metadata
metadata = json.loads(table.schema.metadata[b'file_metadata'])
print(f"Sample: {metadata.get('sample_name', 'Unknown')}")
# Baseline correction
corrected = read_ngb("sample.ngb-ss3", baseline_file="baseline.ngb-bs3")
# DTG analysis
from pyngb.api.analysis import add_dtg
table_with_dtg = add_dtg(table, method="savgol", smooth="medium")
Command Line Usage
The CLI is available as the pyngb console script (or equivalently python -m pyngb):
# Convert single file
pyngb convert sample.ngb-ss3
# Batch processing with baseline correction
pyngb convert *.ngb-ss3 -b baseline.ngb-bs3 -f parquet -o ./processed/
# Inspect file structure / run data-quality checks
pyngb inspect sample.ngb-ss3
pyngb validate sample.ngb-ss3
# Get help
pyngb --help
Documentation
- Getting Started - Installation and first steps
- User Guide - Core functionality and examples
- API Reference - Complete function documentation
- Troubleshooting - Common issues and solutions
- Contributing - Development guidelines
License
MIT License. See LICENSE for details.
Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Made with ❤️ for the scientific community
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyngb-0.4.0.tar.gz.
File metadata
- Download URL: pyngb-0.4.0.tar.gz
- Upload date:
- Size: 1.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a80cb8ac26934ff9477fc3ff05b5074e57b1561819d07ba69f408df0e51d094
|
|
| MD5 |
19b3fdb3cdbffe181a91a43c9e1563a8
|
|
| BLAKE2b-256 |
f34e184c6151731c19d6fab9a876bb9e841ecb561fda23b188ae4c1b2e3b3af9
|
Provenance
The following attestation bundles were made for pyngb-0.4.0.tar.gz:
Publisher:
ci-cd.yml on GraysonBellamy/pyngb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyngb-0.4.0.tar.gz -
Subject digest:
9a80cb8ac26934ff9477fc3ff05b5074e57b1561819d07ba69f408df0e51d094 - Sigstore transparency entry: 2134347340
- Sigstore integration time:
-
Permalink:
GraysonBellamy/pyngb@1eebe5788168b376ff79ef16a365585e4aecb1f6 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/GraysonBellamy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci-cd.yml@1eebe5788168b376ff79ef16a365585e4aecb1f6 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pyngb-0.4.0-py3-none-any.whl.
File metadata
- Download URL: pyngb-0.4.0-py3-none-any.whl
- Upload date:
- Size: 90.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53b99a50c7b3ed7e8b3a003e10e65da95d98b0db214fd5883f4a1b8fb917aa9b
|
|
| MD5 |
dea45c19ddd54b357721183a0b20b47a
|
|
| BLAKE2b-256 |
42761389387c9a418c0f86a037fd09e4f70848d414fb6d740405aa78fae53363
|
Provenance
The following attestation bundles were made for pyngb-0.4.0-py3-none-any.whl:
Publisher:
ci-cd.yml on GraysonBellamy/pyngb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyngb-0.4.0-py3-none-any.whl -
Subject digest:
53b99a50c7b3ed7e8b3a003e10e65da95d98b0db214fd5883f4a1b8fb917aa9b - Sigstore transparency entry: 2134347435
- Sigstore integration time:
-
Permalink:
GraysonBellamy/pyngb@1eebe5788168b376ff79ef16a365585e4aecb1f6 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/GraysonBellamy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci-cd.yml@1eebe5788168b376ff79ef16a365585e4aecb1f6 -
Trigger Event:
release
-
Statement type: