Dear AFNI Team,
I am currently using the realtime plug-in to write the ROI average at each TR into a text file. I do this by opening 3 terminals: (i) the first terminal for running realtime_receiver.py along with the the -write_text_data option. (ii) the second for running afni -rt along with the AFNI_REALTIME environment variables. (iii) The third for running DImon in -rt mode.
I notice that there is a delay of a few (~3-4) TRs before any data is written into the text file. This happens only initially for the very first TRs. Specifically, after a delay of about 3 TRs the text file is dumped with 3 lines simultaneously, corresponding to the ROI averages for the first 3 TRs respectively. Following that, each line is written sequentially (as expected) at each TR.
The behavior described above is not just for how the text file is written using the -write_text_data option, but is also replicated in the terminal when using the -show_data option.
I have tried increasing and decreasing the value passed using the -pause option in Dimon, and used rtfeedme instead of Dimon, but always run into this delay problem. In fact, when testing at the scanner while acquiring dicom images in realtime, this initial delay increases to approximately 5 TRs.
I was wondering as to what the reason for this delay was, and if there was any way to eliminate (or considerably minimize) it?
Any help would be much appreciated. Thank you.