Convert Shimadzu fNIRS TXT export to MNE Raw (.fif) and SNIRF (.snirf), with montage and events.
Project description
shimadzu-fnirs-converter
Shimadzu fNIRS TXT → SNIRF (.snirf) & MNE FIF (.fif)
Convert Shimadzu proprietary TXT exports into open neuroimaging formats for modern, reproducible pipelines.
Shimadzu raw files are not directly compatible with most analysis toolkits.
This package converts them into SNIRF (standard) and MNE FIF (native) formats for seamless use in Python/MATLAB ecosystems.
Compatible with:
- MNE-Python
- Homer3
- NIRS-KIT
- Brainstorm
- any SNIRF workflow
Features
- TXT → SNIRF
- TXT → MNE FIF (native Raw object)
- Optode/channel geometry parsing
- Origin / others coordinate support
- Event & trigger integration
- Python API + CLI
- Batch processing
- NumPy 2 compatible
- pytest tested
- Zenodo DOI archived releases
Installation
From PyPI (recommended)
pip install shimadzu-fnirs-converter
### Development install
```bash
git clone https://github.com/Aria031/shimadzu-fnirs-converter
cd shimadzu-fnirs-converter
pip install -e .
Quick Start
Python API
Save both FIF + SNIRF
from shimadzu_fnirs_converter import convert
convert(
txt_path="raw_data.TXT",
origin_path="origin.csv",
others_path="others.csv",
out_fif="sub01_raw.fif",
out_snirf="sub01_raw.snirf",
subject="sub-01",
)
Save only FIF (MNE)
from shimadzu_fnirs_converter import convert_fif
convert_fif(
txt_path="raw_data.TXT",
origin_path="origin.csv",
others_path="others.csv",
out_fif="sub01_raw.fif",
subject="sub-01",
)
Save only SNIRF
from shimadzu_fnirs_converter import convert_snirf
convert_snirf(
txt_path="raw_data.TXT",
origin_path="origin.csv",
others_path="others.csv",
out_snirf="sub01_raw.snirf",
subject="sub-01",
)
Batch conversion
from shimadzu_fnirs_converter import convert_batch
jobs = [
dict(
txt_path="sub01.TXT",
origin_path="origin.csv",
others_path="others.csv",
out_fif="sub01.fif",
subject="sub-01",
),
dict(
txt_path="sub02.TXT",
origin_path="origin.csv",
others_path="others.csv",
out_fif="sub02.fif",
subject="sub-02",
),
]
convert_batch(jobs)
Command Line
shimadzu-fnirs-converter --help
Example:
shimadzu-fnirs-converter \
--txt sub01_run1.TXT \
--origin optodes_origin.csv \
--others optodes_others.csv \
--out sub01_raw.fif \
--snirf sub01_raw.snirf \
--subject sub-01
Requirements
- Python ≥ 3.9
- numpy ≥ 2.0
- pandas ≥ 2.0
- h5py ≥ 3.10
- mne ≥ 1.6
Citation
@software{dong2026shimadzu,
author = {Dong, Jiaran and Zhang, Jingyan and Feng, Chen},
title = {shimadzu-fnirs-converter: Shimadzu fNIRS TXT to SNIRF/FIF converter},
year = {2026},
doi = {10.5281/zenodo.18605987},
url = {https://doi.org/10.5281/zenodo.18605987}
}
License
MIT License
Authors
Jiaran Dong, Jingyan Zhang, Chen Feng
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 shimadzu_fnirs_converter-0.1.2.tar.gz.
File metadata
- Download URL: shimadzu_fnirs_converter-0.1.2.tar.gz
- Upload date:
- Size: 28.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c42b3e916c9990a28d02bbd049b699c2f4d5fdcb99bc13f79d7f989bf92c6b5
|
|
| MD5 |
4cce3d05f1c1a6eec248e5cc56c785de
|
|
| BLAKE2b-256 |
11d15507da259dc5f2abcf5f0b14dc873d2c32e46dfa176275188d2df01c9b0c
|
File details
Details for the file shimadzu_fnirs_converter-0.1.2-py3-none-any.whl.
File metadata
- Download URL: shimadzu_fnirs_converter-0.1.2-py3-none-any.whl
- Upload date:
- Size: 28.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41d8c68da40e63f753070bf96211401420e0a22b7e790373b628be5e8e67f36a
|
|
| MD5 |
dc19ca8a3e573311defb3468964a8f27
|
|
| BLAKE2b-256 |
c2600363c409115da90b1a3b95d9762838b5587bfd754551f21a92fa31f6506a
|