PhysIO supports physiological logfiles prepared according to the BIDS standard
In brief, BIDS files are (optionally compressed) tab-separated values
(*.tsv[.gz]) files that contain raw traces of peripheral recordings from
cardiac and respiratory sources, as well as scan trigger events
The header of the columns of this *.tsv file, as well as meta-information,
such as sampling rate and relative onset of physiological logging to MRI scan
onset is described in an accompanying *.json file
It is assumed to have the that this *.json file has the same name
(apart from the extension) as the *.tsv file
If PhysIO does not find this file, you can manually enter the timing
information in the log_files structure, and a default column order of
(cardiac, respiratory, trigger) is assumed
Example *.tsv file (with cardiac, respiratory, trigger column
If you have logfile data from any other vendor than the ones specified below, you may still use it with PhysIO:
Export your traces from cardiac and breathing recording devices into 2 text files and select log_files.vendor = 'Custom'. The format is explained in tapas_physio_new or the help window of the Batch Editor:
'Custom' expects the logfiles (separate files for cardiac and respiratory) to be plain text, with one cardiac (or respiratory) sample per row;
If heartbeat (R-wave peak) events are recorded as well, they have to be put as a 2nd column in the cardiac logfile by specifying a 1; 0 in all other rows, e.g.
0.2 00.4 1 <- cardiac pulse event0.2 0-0.3 0
You have to specify the sampling intervals for these log files (in seconds), via log_files.sampling_interval, e.g. [0.01 0.02] if you have 10 ms (100 Hz) and 20 ms (50 Hz) sampling intervals (frequencies) for cardiac and respiratory data, respectively
You will probably have to change log_files.relative_start_acquisition, if logging of your physiological recording device does not start synchronized to the first fMRI volume.
General Electric (GE)
Very similar to custom format
One text file each for ECG, pulse oximetry and respiratory data, e.g., ECGData_epiRT_phys_0921201215_38_08 or RespData_epiRT_phys_0921201215_38_08
One amplitude entry per line, e.g.,
2626 2649 2673 2699 2727 2755
sampling rate is determined as a setting beforehand, has to be noted manually (not in log file)
Physiology automatically recorded into SCANPHYSLOG_<Date>_<Time>.log (one file per scan) as soon as ECG is connected to scanner, and scan is started
tabular text (ascii) format, different columns for ECG, pulse oximetry and breathing data
additionally, trigger events and gradient timecourses are logged, and can be used for synchronization by the toolbox
fixed sampling rate (2 ms for cable connection, 1/496 ms for Wi-Fi devices)
Physiological data collection on the Siemens scanners uses the physiological monitoring unit (PMU). The initial sampling is performed at 400 Hz, but through the PMU buffer the effective sampling intervals are ECG: 2.5 ms, RESP: 20 ms, PULS: 20 ms and EXT: 5 ms.
There are several ways to control the physiological data collection. The 'manual' version is available on all platforms. It uses the telnet mpcu/ideacmdtool to manually start and stop the log file acquisition. The log files (logFileName.ecg, logFileName.resp, logFileName.puls, logFileName.ext) are stored in \MedCom\log. More details on how to record these data can be found here or in the "Other Miscellaneous Topics" slides from the IDEA course.
An example of a .puls logfile is given below. The data are stored in one long line. The text between 5002 and 6002 forms the header, and the text between 5003 and 6003 the footer. Important information in the footer is the LogStartMDHTime and the LogStopMDHTime (in ms since midnight), which can be used to synchronize the logfiles with the dicom images using the AcquisitionTime in the dicom header (in hhmmss.ms). The values 5000 and 6000 are inserted into the signal trace and indicate trigger events. Note that only the modality which is selected to be displayed during the acquisition will have triggers.
The CMRR sequence on VD/VE also allows the automatic recording of physiological log files (to be selected in the sequence special card). For more information have a look at the manual. The physiological traces are stored in logFileName_PULS.log, logFileName_RESP, logFileName_ECG.log. Timing information is stored in logFileName_Info.log and external trigger events in logFileName_EXT.log.
An example of the current format (December 2017, Release 016a) for the logFileName_Info.log is given below:
PhysIO uses the logFileName_Info.log to synchronize the physiological traces with the data acquisition. Note that the reference slice does not yet take into account the multiband slice ordering, but just assumes an even distribution. Older version of the CMRR sequence produced slightly different output files, which might work. Please log an issue if you have a very different format that is not supported.
Human Connectome Project
Disclaimer: Most of the information below is a best guess from the developers, but without any guarantee of accuracy.
The physiological log file (*paradigm*_Physio_log.txt) distributed with the Human Connectome Project data contains respiratory and puls-oximeter data in one file. The first column marks when data acquisition is performed, the second and third contain the respiratory and puls-oximeter traces, respectively. The files are written at a sampling rate of 400Hz and start and end with the scan. PhysIO does provide a reader, you just need to select the appropriate option in the file format tab. An example is provided below: