A Python package for online gas chromatography.
Project description
ChromStream
A Python package for processing on-line gas chromatography data. ChromStream provides tools to parse, analyze, and visualize chromatographic data from various GC systems, and combine it with data from logfiles such as temperature and pressure.
Features
- Parse chromatographic data from multiple formats:
- Chromeleon (exported txt)
- Agilent .d directories
- Agilent .dx files
- ChromStream HDF5 experiment files
- Access to data at experiment, channel and chromatogram level
- Quick plotting of chromatograms
- Small selection of baseline corrections, possibility to use custom ones
- Integration using a dict of peaks
- Addition of logfiles
- Export experiments to a compact HDF5 format
Installation
Installing using pip
pip install ChromStream
Install using uv
If you're using uv for fast Python package management:
uv add ChromStream
Quick Start
Check the Quickstart Notebook to see a full demonstration of the most important features of the package. Here's a simple example of how to set up an experiment, add chromatograms and plot them:
import chromstream as cs
exp = cs.Experiment(name='hello there')
exp.add_chromatogram('path-to-your-chromatogram') #loop over files to add multiple
exp.plot_chromatograms()
To access specific channels:
exp.channels['channel-name'].plot()
For specific chromatograms:
exp.channels['channel-name'].chromatograms[0].plot()
Supported File Formats
ChromStream currently supports parsing data from:
- Chromeleon software exports (
.txt) - Agilent .d directories and .dx files
- ChromStream HDF5 experiment files (
.h5) - simple log files (e.g. exported from labview)
ChromStream can also export Experiment objects to HDF5 and load them back again:
import chromstream as cs
exp = cs.Experiment(name="example")
exp.add_mult_chromatograms("path-to-run.dx")
exp.to_hdf5("example.h5")
loaded = cs.parse_experiment_hdf5("example.h5")
Documentation
- You can find the full documentation of the package here.
Example Notebooks
Check out the example_notebooks/ directory for comprehensive examples:
example_calibration.ipynb- GC calibration procedurescracking_example.ipynb- full procedure for analyzing a cracking datasetexporting_hdf5.ipynb- brief example showing HDF5 export and re-loading
Roadmap
- Support for more files formats
- Addition of more data sources such as spectroscopy
- JSON persistence
- tests
Contributing
This package is in active development. Any help is appreciated. You can submit feature requests or bug reports as issues on the repository. If you have a specific file format which presently is nto supported please provide an example file. PRs are more than welcome.
Authors
Sebastian Rejman - Fritz-Haber-Institute / Utrecht University
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
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 chromstream-0.2.0.tar.gz.
File metadata
- Download URL: chromstream-0.2.0.tar.gz
- Upload date:
- Size: 36.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1840c6f7ed695ed832ef2cbcd939b8f275dd63b1f637873025c29c19323f9e69
|
|
| MD5 |
8656a5d76644a3d4633251600b332841
|
|
| BLAKE2b-256 |
7484a50b6b575a487d80b8b350ab645959f5b826909e8c18d9bd02c2f009f1f9
|
File details
Details for the file chromstream-0.2.0-py3-none-any.whl.
File metadata
- Download URL: chromstream-0.2.0-py3-none-any.whl
- Upload date:
- Size: 31.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b1c8f2ef0c0a605a20b31eb5b83b7ed984dfb78d2f028ea180accceb861f36c
|
|
| MD5 |
c1a300796d8226e3a7a44f46c746ed1f
|
|
| BLAKE2b-256 |
0fc9a571c00b23309ac6ba43d7925aa7c8bbe5a38b859ad13a75676d1a7a9b98
|