siemphysdat

Utility to chop physio measures (voltages) from Siemens Physiologic Monitoring Unit (PMU) and generate respiration volume per time (RVT) regressors for a single MR protocol with AFNI's RetroTS.m

This is for you if you want 1D inputs for 3dretroicor or afni_proc.py (ricor block) and have physio recordings (*.resp and *.puls) files the look like this:

1 2 40 280 ...
ECG  Freq Per: 0 0
PULS Freq Per: 74 807
RESP Freq Per: 20 2860
....
6003

Usage

siemphysdat respfile pulsefile MRdir

look for new *dat (chopped physio) and *slibase.1D (RVT regressors, ready for -ricor in afni_proc.py) files

Example/Practice

run ./prepareForDemo.bash and follow instructions.

works on files included in data/ and save output to data/phys

Help

see siemphysdat -h, perldoc siemphysdat, or ./prepareForDemo.bash

Install

cpanm App::AFNI::SiemensPhysio

Hint: get cpanm like curl -L https://cpanmin.us | perl - --sudo App::cpanminus

From this source

with Dist::Zilla

dzil build
dzil install

Trouble Shooting/Dependencies

quick edits

export PERL5LIB="$PERL5LIB:$(pwd)/lib"
lib/bin/siemphysdat

RetroTS.m in path

You should have afni's matlab scripts and they should be your MATLABPATH (e.g. export MATLABPATH="$HOME/afni_matlab:$MATLABPATH")

dicom_hinfo in path

dicom_hinfo from AFNI is used to read slice timing, TR, and MR times. This must be in PATH.

See which dicom_hinfo to check.

See Also/Alternatives

exvolt as described by the Aguirre Lab @ UPenn

Name

Think seam-fizz that. The icon is a seam and "fizzy bubbles"

Octave

RetroTS.m works with octave but all afni .m functions must have | and & replaced with || and &&