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.py

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 ... [measure's full timeseries on a single line]
ECG  Freq Per: 0 0
PULS Freq Per: 74 807
RESP Freq Per: 20 2860
....
6003

Usage

siemphysdat respfile pulsefile MRdir
# or
siemphysdat respfile pulsefile -j BIDS_protcol_info.json

Output

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

run without packaging

If you want to quickly edit or run without (re-)installing

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

whats in your PATH

RetroTS.py and dicom_hinfo from AFNI are likely to be used and should be in your PATH.

See which dicom_hinfo to check.

RetroTS.m in path

N.B. We now default to RetroTS.py, which has a bug fix. If you really want to use the matlab code, you should have afni's matlab scripts and they should be your MATLABPATH (e.g. export MATLABPATH="$HOME/afni_matlab:$MATLABPATH")

Octave

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

See Also/Alternatives

exvolt as described by the Aguirre Lab @ UPenn

Name

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