AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
December 16, 2014 02:46PM
3dretroicor wants cardiac pulse waveform data in a format like a "stim_file" input to 3dDeconvolve (i.e. something plottable with 1dplot). Fortunately, your list of R-wave times is like a "stim_times" input to 3dDeconvolve, and there just happens to be a tool for converting a stim_times data file to a stim_file format: timing_tool.py, e.g.

timing_tool.py -timing rwave.times.txt -timing_to_1D rwave.1D -tr 0.02 -stim_dur 0.001 -min_frac 0.01 -run_len 300

where rwave.times.txt is your list of R-wave times (all times in seconds, in one row--use 1dtranspose first if your numbers are in a column); rwave.1D is the 1D output; tr=0.02 for a simulated 50Hz sample rate (you can go faster if you like); duration 0.001 and fraction 0.01 are small numbers so the peaks are not smeared; and the run length is 300 seconds (change this to suit your run length).

This will generate a waveform with '1's at the R-wave times and '0's otherwise. Note that the default threshold for the pulse in 3dretroicor is 1, so you will need to either do something like "3dretroicor -threshold 0.5 ..." or modify the file again, e.g. 1deval -a rwave.1D -expr 'a*5' > rwave.fix.1D
Subject Author Posted

3dretroicor

sjordaz December 15, 2014 08:45PM

Re: 3dretroicor

Fred December 16, 2014 02:46PM

Re: 3dretroicor

sjordaz December 18, 2014 09:33PM