Hi Jaewon,
I would like to using MonekeyLogic with task-fMRI.
For example, one scan duration is 240s , I would like monkeylogic program to have the matching duration.
The trial block paradigm is (Fixation center Scene 4 sec + Fixation center Grating Scene 6 sec + MultiTarget Scene 2 sec)
Each program consists of 20 trials ,so that’s 240s in total.
-20230215_run02_trial5_ITI0.bhv2 – 63s
-20230215_run03_trial5_ITI1000.bhv2 – 66s
Take 5 trials as example, I set ITI (Inter-trial Interval) to be 0 ms, without showing traces or records in ITI, It still took 3s more than expected for each program, eg 5trials*12s + 3 s.
I found even I set ITI=1000ms , the difference of total time still varied from trial to trial.
For 20 trials , it will cause more uncertainty, which is unexpected and causes problems for me to align it with fmri data.
- What I tried
I have tried to modify the elegant LBC-fMRI demo code first, but it seems complicated for me to modify LBC_ImageChanger to SineGrating directly.
So I reused built-in adapter of Concurrent and RewardScheduler to create scenes. And I also set “goodmonkey” with 'nonblocking’,2 to save time.
The codes are attached.
Q1 – How could I control the total time of all trials, to match a fixed duration of fMRI scan?
Q2 – For RewardScheduler, how to set the allowing-break-fixation duration ? For example ,first the subject fixates for 300ms, then breaks fixation for more than 500ms(the duration I would like to modify), then reset the hold time back to be initial 1500ms.
Q3 - 2 warning showed when ITI = 0,
Warning 1 - Trial 2 : Desired ITI exceeded
Warning 2 – Trial3: 1 skipped frames occurred.
I am not sure whether these warnings also effects the total time.
Q4: In my bhv2 file, from “Start trial” to first scene “Fix Cue” , it have about 300ms interval time. Is it possible to shorten it?
The frame interval and drawing time are at 30ms level, which seems not to be the main issue?
Q5: Or do you have a better idea for implementing the task?
My ML version is 2.2.31.
Thank you.