Skip to main content

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

PyPI version Python 3.10+ License: MIT Tests

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

  • Fast Binary Parsing: Optimized parsing with NumPy and PyArrow (typically well under a second 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 sample.ngb-ss3

# Batch processing with baseline correction
pyngb *.ngb-ss3 -b baseline.ngb-bs3 -f parquet -o ./processed/

# Get help
pyngb --help

Documentation

License

MIT License. See LICENSE for details.

Support


Made with ❤️ for the scientific community

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyngb-0.2.0.tar.gz (1.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyngb-0.2.0-py3-none-any.whl (88.7 kB view details)

Uploaded Python 3

File details

Details for the file pyngb-0.2.0.tar.gz.

File metadata

  • Download URL: pyngb-0.2.0.tar.gz
  • Upload date:
  • Size: 1.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyngb-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ae7ea615c82b9a13a3d883fc73fd338935796d1efdca2f385024e78880cbb477
MD5 7895b42cb99c6e4895bca7c93655450c
BLAKE2b-256 945b88f35fd18b3f393742a25652ae22cfc16d0ed527d55d09c7cd9102737ce9

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyngb-0.2.0.tar.gz:

Publisher: ci-cd.yml on GraysonBellamy/pyngb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyngb-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pyngb-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 88.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyngb-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ba569269a9b98733f2e8aa77134556adcfec07c87ad9c915360ff3208a28a878
MD5 1b17d4ee2f23b95ee258fb0aeab42187
BLAKE2b-256 68bf736760ef98f604f0e01bd69dc1b45daf2e86fd38767663ee27bdc5ca99a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyngb-0.2.0-py3-none-any.whl:

Publisher: ci-cd.yml on GraysonBellamy/pyngb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page