Metadata-Version: 2.1
Name: pybif6
Version: 0.1.0
Summary: ToF-SIMS BIF6 file parsing library
Author-Email: Shenghui Ye <yesh@aliyun.com>
License: GPL-3
Project-URL: Homepage, https://github.com/yesh0/pybif6
Project-URL: Issues, https://github.com/yesh0/pybif6/issues
Requires-Python: >=3.9
Requires-Dist: numpy>=2.0.2
Description-Content-Type: text/markdown

# pybif6

This tiny project rewrites [the BIF6 file parsing part] of [the R package `tofsims`] in Python.

[the BIF6 file parsing part]: https://github.com/lorenzgerber/tofsims/blob/master/src/c_importer.cpp
[the R package `tofsims`]: https://github.com/lorenzgerber/tofsims

## Usage

```python
import pybif6

for inteval_image in pybif6.parse_bif6("path/to/bif6/file"):
    print(
        f'id: {inteval_image.id}, '
        f'mz_lower: {inteval_image.mz_lower}, '
        f'mz_middle: {inteval_image.mz_middle}, '
        f'mz_upper: {inteval_image.mz_upper}, '
        f'image: {inteval_image.image.shape}'
    )
    # The image data is stored in `inteval_image.image`, a 2D numpy array.
```
