EXAMPLES - ComputationalPsychiatry/PhysIO GitHub Wiki

Example Datasets for PhysIO

The following datasets are available to explore the read-in and modeling capabilities of PhysIO. They can be downloaded by running the function tapas_download_example_data() in Matlab, which is located in the misc subfolder of the TAPAS software release you downloaded (probably here).

Afterwards, the examples can be found in tapas/examples/<tapasVersion>/PhysIO as different subfolders (vendor/device) and shall be run directly from within these individual folders.

Besides the raw physiological logfiles, each example contains example scripts to run PhysIO as

  • SPM job (\\\*spm_job.mat)
  • editable SPM job (\\\*spm_job.m)
  • plain matlab script (\\\*matlab_script.m)

Brain Imaging Data Structure (BIDS)

CPULSE 3T

Courtesy of Hrvoje Stojic, Max Planck UCL Centre for Computational Psychiatry and Ageing Research, University College London

Vendor-computed (software: Spike2) cardiac pulse events from PPU (finger plethysmograph) data, Siemens 3T scanner, Multiband CMRR sequence

Description: This datasets contains the (compressed) tab-separated value (.tsv.gz) files as well as the meta-file (.json) holding sampling rate of the physiological recording, and its relative onset to scanning, in adherence with the BIDS standard for peripheral recordings files.

PPU 3T

Courtesy of Hrvoje Stojic, Max Planck UCL Centre for Computational Psychiatry and Ageing Research, University College London

PPU (finger plethysmograph) and breathing belt, Siemens 3T scanner, Multiband CMRR sequence

Description: Similar to CPULSE3T (same acquisition system), but now with analog data instead of vendor-detected pulses, data from different subject

PPU 3T Separate Files

Courtesy of Alexandre Sayal CIBIT, University of Coimbra

PPU (finger plethysmograph) and breathing belt, Siemens 3T scanner, Multiband CMRR sequence

Description: Similar to PPU 3T, but two separate BIDS files for cardiac and respiratory recordings, because of differing sampling rate (5 vs 20 ms). Externally converted from SIEMENS_VD/PPU3T_For_BIDS example below.

General Electric

PPU 3T

Courtesy of Steffen Bollmann, Kinderspital Zurich and ETH Zurich

PPU (finger plethysmograph) and breathing belt, General Electric 3T scanner

Description: Similar to PPU, but acquired on a GE system with two separate output logfiles for pulse oximetry and breathing amplitude, sampled with 40 Hz. The quality of the signal is particularly challenging, stemming from a patient population.

Philips

ECG 3T

Courtesy of Sandra Iglesias, Translational Neuromodeling Unit, ETH & University of Zurich

4-electrode ECG and breathing belt, Philips 3T Achieva scanner

Description: Standard example; shows how to use volume counting either from beginning or end of run to synchronize physiological logfile with acquisition onsets of fMRI scans.

ECG 7T

Courtesy of Zina-Mary Manjaly, University Hospital Zurich

4-electrode ECG and breathing belt, Philips 7T Achieva scanner

Description: The ECG data for ultra-high field data is typically much noisier than at 3 Tesla. Therefore, R-wave peaks are frequently missed by prospective trigger detection and not marked correctly in the logfile. This example shows how to select typical R-wave-peaks manually and let the algorithm find the heartbeat events.

PPU 3T

Courtesy of Diana Wotruba, University and University Hospital of Zurich

PPU (finger plethysmograph) and breathing belt, Philips 3T Achieva scanner

Description: Similar to ECG3T, but a plethysmograph instead of an ECG was used to monitor the cardiac pulsation. Example shows how to extract heart and breathing rate.

PPU 7T

Courtesy of Jakob Heinzle and Lars Kasper, TNU, University Zurich and ETH Zurich

PPU (finger plethysmograph) and breathing belt, Philips 7T Achieva scanner

Description: Challenging cardiac data that requires bandpass-filtering during preprocessing, since it is compromised by both high frequency noise (from the scanner, modulated at every slice TR) and low frequency noise (breathing modulation).

Siemens - VB

Siemens has different physiological logfile formats, for which examples are provided here. A detailed description of these formats is on a different wiki page.

This is the older Siemens log file format (also available via manual recording), which is part of software release VB, and can be determined by the file extensions .resp, .ecg, .puls, in combination with an optional .dcm DICOM header file for the first (or last) acquired volume.

A lot of 7T scanners still use this format, but it is also the default on modern 3T systems, if you don't have C2P sequences for fMRI (e.g., from CMRR) or WIPs from Siemens (see below).

ECG 3T

Courtesy of Miriam Sebold, Charite Berlin, and Quentin Huys, TNU Zurich

4-electrode ECG data, Siemens 3T scanner, logfile version 1

Description: Similar to ECG 3T, but acquired on a Siemens system with only one logfile for ECG data. The quality of the signal is challenging, stemming from a patient population.

PPU3T (Sync First and Sync Last)

Courtesy of Alexander Ritter, University of Jena, Germany

Siemens 3T pulse oximetry and respiratory bellows data, logfile version 1 DICOM header file of first and last (382nd) volume of an fMRI run, respectively.

Description: This data covering a complete scan session of a healthy volunteer showcases scan timing synchronization using the DICOM timestamps in an intricate case, where the physiological logfile spans the whole scan session (and not only the fMRI run). See TAPAS github issue #55 for further details.

ECG 3T - Logversion 3

Courtesy of Shahin Safa, see TAPAS GitHub issue 204

4-electrode ECG data, Siemens scanner, logfile version 3 corresponding respiratory data: Resp 3T - Logversion 1

Description: This is an fMRI study on the auditory system of the brain, which explains the long TR (10 s), to put scanning gaps when presenting the sound to the subject.

Resp 3T - Logversion 1

Courtesy of Shahin Safa, see TAPAS GitHub issue 204

Respiratory bellows data, Siemens scanner, logfile version 1 corresponding cardiac data: ECG 3T - Logversion 3

Description: This is an fMRI study on the auditory system of the brain, which explains the long TR (10 s), to put scanning gaps when presenting the sound to the subject.

Resp 3T - Logversion 3

Courtesy of Lars Kasper, University Health Network Toronto, Canada

Respiratory bellows data, Siemens Prisma 3T, logfile version 3

Description: Short fingertapping run with logging automatically switched off after about 2 minutes (nominally 5) due to ECG channels not connected, but requested for recording. Biomatrix sensors were not available, but are logged as 4 extra channels with constant values here.

Siemens - HCP

The Human Connectome Project uses Siemens scanners, and the logfile format that comes with their published data seems to be pre-converted and custom (even though the documentation desribes the VB format). We have implemented an own reader for that and written a little tutorial for a single subject dataset of the HCP.

https://github.com/translationalneuromodeling/tapas/issues/6#issuecomment-361001716

If you download the whole dataset (including functional image files), this example with the additional batches mentioned below also demonstrates how to use the toolbox for model assessment using statistical maps (F-contrasts).

HCP (Subject 178748)

You will have to download the dataset from the HCP yourself, we just provide the matlab batches and the physiological logfile tfMRI_MOTOR_LR_Physio_log.txt here.

For consistency with the other example files, the batch files have been renamed compared to the blog entry:

  • batch_preproc.m -> batch_preproc.m
  • batch_physio.m -> siemens_hcp_ppu3t_spm_job.m
  • batch_glm.m -> batch_glm.m

If you want to run the preproc and glm batch, place them on the same level as the subject folder 178748 for the downloaded data. The physio-batch shall reside in the same folder as the physiological logfile tfMRI_MOTOR_LR_Physio_log.txt.

Siemens - VD/VE Tics

This is the most recent logfile format of Siemens, included in Software releases VD, VE and sometimes referred to as the Tics format, because all time stamps in all files refer to the same reference point (start of the day) and count in the same intervals or "tics" of 2.5 ms from there.

You will recognize this file format via the extensions \\\_Info.log (or \\\_AcquisitionInfo.log), \\\_RESP.log, \\\_ECG.log and \\\_PULS.log. Sometimes, it is also written into the DICOM header (.dcm) file of your functional data directly. In this case, use extractCMRRPhysio.m to convert it to the above separate files before using PhysIO.

Most modern Siemens scanners, such as the Prisma or 7T Terra, use this format.

There are a couple of variants for this format around (e.g., with the WIP Multiband Protocol that is distributed to multiple sites), and PhysIO tries to support all of them.

PPU 3T

Courtesy of Saskia Bollmann, Centre for Advanced Imaging, University of Queensland, Brisbane, Australia

Pulse oximetry and breathing belt data, Siemens Prisma 3T, logfile version EJA_1, multi-echo fMRI (3 echoes)

The UUID and date/time stamps were altered for anonymization.

PPU 3T Separate Files

Courtesy of Alexandre Sayal CIBIT, University of Coimbra

PPU (finger plethysmograph) and breathing belt, Siemens 3T scanner, Multiband CMRR sequence

Description: Raw data that was used to convert to two separate BIDS files above (BIDS/PPU3T_Separate_Files) for cardiac and respiratory recordings, because of differing sampling rate (5 vs 20 ms).

The UUID and date/time stamps were altered for anonymization.