Physiopy/phys2bids: BIDS formatting of physiological recordings

Presented During:

Poster No:


Submission Type:

Abstract Submission 


The phys2bids contributors physiopy1, Daniel Alcalá2, Apoorva Ayyagari3, Molly Bright3, César Caballero-Gaudes4, Vicente Ferrer Gallardo5, Soichi Hayashi6, Ross Markello7, Stefano Moia8, Rachael Stickland3, Eneko Uruñuela4, Kristina Zvolanek3


1See all-contributors table, Fig. 1, A, 2Basque Center on Cognition, Brain and Language, Donostia, Gipuzcoa, 3Northwestern University, Chicago, IL, 4Basque Center on Cognition, Brain and Language, Donostia - San Sebastián, Gipuzkoa, 5Basque Center on Cognition Brain and Language, San Sebastian, Guipuzcoa, 6Department of Psychological and Brain Sciences, Indiana University, Bloomington, IN, 7McGill University, Montreal, Quebec, 8Basque Center on Cognition, Brain and Language, Donostia, Guipúzcoa

First Author:

The phys2bids contributors physiopy  
See all-contributors table
Fig. 1, A


Daniel Alcalá  
Basque Center on Cognition, Brain and Language
Donostia, Gipuzcoa
Apoorva Ayyagari  
Northwestern University
Chicago, IL
Molly Bright  
Northwestern University
Chicago, IL
César Caballero-Gaudes  
Basque Center on Cognition, Brain and Language
Donostia - San Sebastián, Gipuzkoa
Vicente Ferrer Gallardo  
Basque Center on Cognition Brain and Language
San Sebastian, Guipuzcoa
Soichi Hayashi  
Department of Psychological and Brain Sciences, Indiana University
Bloomington, IN
Ross Markello  
McGill University
Montreal, Quebec
Stefano Moia  
Basque Center on Cognition, Brain and Language
Donostia, Guipúzcoa
Rachael Stickland  
Northwestern University
Chicago, IL
Eneko Uruñuela  
Basque Center on Cognition, Brain and Language
Donostia - San Sebastián, Gipuzkoa
Kristina Zvolanek  
Northwestern University
Chicago, IL


The BOLD fMRI signal contains multiple subject-dependent sources of physiological origin. This fact can be exploited to capture physiological states (e.g. cerebrovascular reactivity) [1,6], or physiological fluctuations can be treated as noise and removed to improve activation or connectivity mapping [2,4]. In both cases, it is necessary to measure physiological signals (e.g. cardiac pulse, chest volume, exhaled CO2 and O2, skin conductance). It is becoming common practice in the neuroimaging community to share collected data on public platforms that rely on Brain Imaging Data Structure (BIDS [3]). However, due to (I) the high variability in the experimental setup and measurement process, (II) the lack of tools to convert such data into BIDS format, and (III) the lack of consensus guidelines for how to use such data in neuroimaging pipelines, few centres or researchers routinely collect and utilize physiological data and even fewer share them. Here, we introduce the development of physiopy: a user-friendly, community-driven bundle of tools that aim to help researchers collect, share, and prepare physiological data for neuroimaging analysis.


Phys2bids is the first tool of physiopy [5]. Currently, it consists of two parts: a Python 3.0 script that reads and formats physiological data files into BIDS, and documentation that helps with physiological data collection setup and introduces its use in neuroimaging experiments. The script currently supports AcqKnowledge native files and LabChart files in text format. Such files are organised in "channels", with one channel typically recording the MRI trigger to improve signal alignment. The user can retrieve information about the input file (with the "-info" option) which returns a short log with the name and sampling rate of all the channels in the file. In addition, a series of plots are generated (one for each channel) and can be used to understand or verify what type of data the channel contains. As default, the script converts the input file to a TSV file for each sampling frequency present. If a set of parameters that describes the related fMRI volumes are provided, the scripts can detect the time of the first fMRI volume (by deriving and thresholding the trigger channel), and correct it if the wrong number of trigger points have been found. Moreover, if a file containing experiment-specific descriptors (i.e. a heuristic file) is provided, the script returns the input file in BIDS format. Phys2bids documentation contains instructions on how to install and run phys2bids, how to write a heuristic file, advice for setting up physiological recordings, tips on how to improve the measurements, and information on how to use such data in neuroimaging pipelines. The documentation aims to help users get acquainted with the measurement process, obtain quality measurements, and give explanations and examples for how to account for physiological fluctuations in fMRI data analysis.


Figure 1B shows an example output of the phys2bids script when option "-info" is used. Each channel of the input physiological file is plotted against time and has been correctly identified by the script. Figure 2 demonstrates the capability of phys2bids to automatically identify triggers from an input file.
Supporting Image: fig1_phy2bids_V6.png
Supporting Image: Figure2_phys2bids.png


Physiopy is an open-source, community-based development project that adheres to the all-contributors acknowledgement. With its development, we aim to increase the collection and application of physiological signals in neuroimaging experiments, by improving awareness of their use, proposing a standard setup (while supporting as many setups as possible), and facilitating the sharing process. In the future, we plan to offer preprocessing and analysis scripts and support multiple input formats, thereby accommodating the variety of instruments used in physiological measurement and the versatility of data collection in the neuroimaging field. Phys2bids can be found at

Modeling and Analysis Methods:

Methods Development

Neuroinformatics and Data Sharing:

Databasing and Data Sharing 1
Informatics Other

Physiology, Metabolism and Neurotransmission :

Neurophysiology of Imaging Signals 2
Physiology, Metabolism and Neurotransmission Other


Data analysis
Data Organization
Other - Physiology; BIDS; Documentation; Open Science; Community

1|2Indicates the priority used for review

My abstract is being submitted as a Software Demonstration.


Please indicate below if your study was a "resting state" or "task-activation” study.


Healthy subjects only or patients (note that patient studies may also involve healthy subjects):

Healthy subjects

Was any human subjects research approved by the relevant Institutional Review Board or ethics panel? NOTE: Any human subjects studies without IRB approval will be automatically rejected.


Was any animal research approved by the relevant IACUC or other animal research panel? NOTE: Any animal studies without IACUC approval will be automatically rejected.

Not applicable

Please indicate which methods were used in your research:


Which processing packages did you use for your study?

Other, Please list  -   Python

Provide references using author date format

1. Bright, M.G. (2013), ‘Reliable quantification of BOLD fMRI cerebrovascular reactivity despite poor breath-hold performance’, Neuroimage, vol. 83, pp. 559-568
2. Caballero-Gaudes, C. (2017), ‘Methods for cleaning the BOLD fMRI signal’, Neuroimage, vol. 154, pp. 128-149
3. Gorgolewski, K.J. (2016), ‘The brain imaging data structure, a format for organizing and describing outputs of neuroimaging experiments’, Scientific Data, vol. 3, no. 160044
4. Murphy, K. (2013), ‘Resting-state fMRI confounds and cleanup’, Neuroimage, vol. 80, pp. 349-359
5. The phys2bids contributors (2019), doi: 10.5281/zenodo.3586045
6. Wise, R.G. (2004), ‘Resting fluctuations in arterial carbon dioxide induce significant low frequency variations in BOLD signal’, Neuroimage, vol. 21, no. 4, pp. 1652-1664