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  

|
November 23, 2020 05:20PM
Dear AFNI expert,

I try to use make_random_timing.py to generate timing files for our experiment. In this experiment, we use a fast-scanning protocol with a short TR (199ms). We also want to synchronize the presentation of stimulus with TR, with jittered ITIs following some kind of distribution (e.g., decay, or uniform). There are three conditions (each with a stimulus duration), thus there are three types of stimulus durations (e.g., 199ms, 597ms, and 1791ms). In make_random_timing.py script, we make the durations for both stimuli and rest as multiples of TR. The run duration, pre-rest duration and post-rest duration are also multiples of TR. However, in the generated timing files, it seems that the program rounds up the durations of the stimuli into 200ms, 600ms, 1800ms or so, making the onsets of stimuli (especially for those in the middle stage of a run) not being locked with TR. In the generated timing files, for some events, the timing has four decimals (0.1ms order). I understand that this is just at milisecond order, and may not make too much difference. But I still would like to see if it is possible to make the timing completely locked with TR (e.g., all onsets of stimuli are multiples of 199ms in a run). Also, is there a way to control the number of decimals in the event list files generated by -write_event_list. For your reference, I put the script that I use below. Thanks!

make_random_timing.py \
-num_runs 12 \
-run_time 318.4 \
-tr 0.199 \
-tr_locked \
-t_digits 3 \
-pre_stim_rest 7.960 \
-post_stim_rest 9.950 \
-add_timing_class stima 0.597 \
-add_timing_class stimb 1.791 \
-add_timing_class stimc 0.199 \
-add_timing_class rest 3.98 -1 -1 dist=decay t_gran=0.199 \
-add_stim_class Short 16 stima rest \
-add_stim_class Long 16 stimb rest \
-add_stim_class Single 16 stimc rest \
-show_timing_stats \
-show_rest_events \
-write_event_list events.adv.txt \
-seed 12345 \
-prefix stimes



Edited 2 time(s). Last edit at 11/24/2020 03:11PM by qiuhai.
Subject Author Posted

stimulus duration in make_random_timing.py

qiuhai November 23, 2020 05:20PM