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 21, 2017 01:13PM
Thank you Rick for your explanations.
There was no doubt that the real-time system will work. I simply asked my questions to understand better how it works and see if I can simply start from those demo programs (I think this is easiest because I have the data sent directly in real time from the scanner to the Mac already, which is similar to running the demo).
I understand from your answer that using realtime_receiver.py is optional. So I think my first question is in case I am not using it, what should I do to interact with AFNI and the RT-plugin to extract the data at each time point? I guess this will require anyway a piece of afni scripts to change some variables in the RT-Options so the RT-plugin knows what to compute and write out, e.g. a text file that contains the ROI mean.
However, If using realtime_receiver is easier, I would rather go from there (But wait! there must be a reason you said it is not necessary for the real-time system).
With the goal to have a txt file generated after each TR, I am wading thru the realtime_receiver Python code now ...
In 'realtime_receiver.py' and 'compute_TR_data()', it looks like 'rti.extras[[i]][j]' stores the mean of ROI [[i]] at time point [j]. And then this data at the said time point is appended to 'self.TR_data' under 'process_one_TR()'.
I think what I should do next is add a few lines under 'def process_demo_data(self):' to allow for the last value in 'self.TR_data' written out to a txt file.
I am planning to add the following but not sure if it will work since I am not familiar with Python:
-----
def process_demo_data(self):
...
file_name = "timepoint"+str(length)+".txt"
txt_file = open(file_name, "w")
txt_file.write("%s" % self.TR_data[length-1][0])
txt_file.close()
...
-----

Maybe you can give me a better way to do.
Again, thank you very much for your helps.

Duong



Edited 2 time(s). Last edit at 12/21/2017 01:17PM by dlhuynh.
Subject Author Posted

real time afni question (12/12/17 re-posted)

dlhuynh December 19, 2017 04:38PM

Re: real time afni question (12/12/17 re-posted)

rick reynolds December 20, 2017 09:40AM

Re: real time afni question (12/12/17 re-posted)

dlhuynh December 21, 2017 01:13PM

Re: real time afni question (12/12/17 re-posted)

rick reynolds December 27, 2017 12:41PM

Re: real time afni question (12/12/17 re-posted)

dlhuynh December 28, 2017 12:58PM

Re: real time afni question (12/12/17 re-posted)

rick reynolds January 05, 2018 09:59AM