snirf2BIDS
Conveniently generate BIDS files from SNIRF files.
Installation
pip install snirf2bids
snirf2bids requires Python > 3.
Usage
SNIRF files with valid BIDS names can be converted into BIDS metadata text files.
For use with snirf2bids, a SNIRF file name must include at least the sub- and task- entitites and end in _nirs.snirf, i.e. sub-01_task-tapping_nirs.snirf.
Generate BIDS text files from a SNIRF file
If the list_files parameter is empty, snirf2bids replaces all existing BIDS files with newly generated ones; otherwise, it replaces only the files specified in list_files. The parameter retain_old_info, with a default value of True, ensures that information in the existing scans and participants files is retained whenever a conflict occurs.
snirf2bids.snirf2bids('<path to snirf file>', 'outputpath = <folder to generate files in>', 'list_files =<list of BIDS files to replace>' , 'retain_old_info=True')
Generate BIDS text files from a SNIRF file or from all SNIRF files within a directory and its subdirectories
If the list_files parameter is empty, snirf2bids replaces all existing BIDS files with newly generated ones; otherwise, it replaces only the files specified in list_files. The parameter retain_old_info, with a default value of True, ensures that information in the existing scans and participants files is retained whenever a conflict occurs.
snirf2bids.snirf2bids_recurse('<path to a directiory or path to snirf file>', 'list_files =<list of BIDS files to replace>', 'retain_old_info=True')
Export BIDS text files in JSON Format
s = snirf2bids.snirf2json('<path to snirf file>') # Returns serialized JSON in which keys are filenames and values are their contents
Contributors
Developed by BU BME Senior Design Group 3 (2022): Christian Arthur, Jeonghoon Choi, Jiazhen Liu, Juncheng Zhang and the Boston University Neurophotonics Center.
@Christian Arthur 🍈
@Juncheng Zhang 🍊
@Jeonghoon Choi 🍍
@Jiazhen Liu 🍇
This project exists thanks to:
Metadata
Release files for snirf2bids 0.8.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| snirf2bids-0.8.7.tar.gz | 22.1 kB | Without provenance | Details for snirf2bids-0.8.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| snirf2bids-0.8.7-py3-none-any.whl | Python 3 | none | any | Details for snirf2bids-0.8.7-py3-none-any.whl |
Total release size: 42.6 kB
Release files / snirf2bids-0.8.7.tar.gz
| Download URL | snirf2bids-0.8.7.tar.gz |
|---|---|
| Size | 22.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
804f2c9b5f02dbf61dbac29579169815f56f539511cd17d6a770a7eb23ede0a0
|
|
BLAKE2b-256 checksum How to use checksums |
e76010d3ce0b87c0e3dd4b9906ccfbf005f82419ad27c34b79341a05b758b8a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.9.21
|
Release files / snirf2bids-0.8.7-py3-none-any.whl
| Download URL | snirf2bids-0.8.7-py3-none-any.whl |
|---|---|
| Size | 20.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7904284f1bd1df00dac0eced143b79101d6db5d84e31556fa3f2974eff54c17c
|
|
BLAKE2b-256 checksum How to use checksums |
f019c3a1754395ea07fb76b9c9656f418ce8cc11aeaf3a6aee942adfff93eed4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.9.21
|
Security for snirf2bids 0.8.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.