This repository contains some miscellaneous utility snippets that may make your life easier.
See the docstring at the beginning of each file for detailed description, usage, examples, etc.
A few functions to convert data files between json, csv and python dictionary/list, or wide and long format.
A script that randomize stimuli in a weird way (see the docstring in the file).
Automatically send triggers by generating keyboard presses (so you can test an fMRI task script without an MRI scanner).
Rename and reorganize the fMRI data into the Brain Imaging Data Structure (BIDS).
Prepare parcellation files with SUMA that can be later used to create ROI masks (see create_masks.py) or other things.
Create ROI masks in native space, given data preprocessed by FMRIPREP/FreeSurfer and prepared with SUMA (see suma_prep.sh).
An example for level 1 analysis given data preprocessed by FMRIPREP. This script was adapted from this notebook.