Skip to main content

python pypi tests DOI

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 :melon:
@Juncheng Zhang :tangerine:
@Jeonghoon Choi :pineapple:
@Jiazhen Liu :grapes:

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)

Source distribution for snirf2bids 0.8.7
File Size Uploaded
snirf2bids-0.8.7.tar.gz 22.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for snirf2bids 0.8.7
File Interpreter ABI Platform
snirf2bids-0.8.7-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

0.8.7 This release

2 release files

0.8.4

2 release files

0.8.3

2 release files

0.7.8

2 release files

0.7.7

2 release files

0.7.6

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.1

2 release files

0.6.7

2 release files

0.6.6

2 release files

0.6.5

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

1 release file

0.1.20

1 release file

0.1.19

1 release file

0.1.18

1 release file

0.1.17

1 release file

0.1.16

1 release file

0.1.14

1 release file

0.1.13

1 release file

0.1.10

1 release file

0.1.9

1 release file

0.1.8

1 release file

0.1.7

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page