How many hours of fMRI on OpenNeuro?
  • Python 97.8%
  • Shell 2.2%
Find a file
2025-10-08 18:25:43 +02:00
.python-version Create a uv project 2025-10-08 18:25:43 +02:00
analyze.py Add missing type hints 2025-10-08 18:25:43 +02:00
pyproject.toml Finish plotting 2025-10-08 18:25:43 +02:00
README.md Create a uv project 2025-10-08 18:25:43 +02:00
run.sh Add a simple bash script 2025-10-08 18:25:43 +02:00
stats.py Add plot showing hours in each year, improve plots 2025-10-08 18:25:43 +02:00
uv.lock Finish plotting 2025-10-08 18:25:43 +02:00

MRI hours

The goal of this little project is to answer the question: "How many fMRI hours are there on OpenNeuro?" which was asked by pmin on Neurostars: Total amount of fMRI hours on OpenNeuro?. The approach was suggested by effigies in the same thread: fetch a kilobyte from each BOLD file with datalad-fuse, read the NIfTI header with nibabel, and calculate TR * nvols.

This relies on PyBIDS to list BOLD files and get corresponding TR. Datasets for which a BIDSLayout object can not be initialized are skipped (reasons can vary, and can also be related to modalities other than BOLD). Files for which an S3 URL is not available are also skipped. For this reason, the total time reported will be slightly lower than what could be accessed if each dataset got debugged individually, but including files accessible through standard means should be a reasonable concession.