Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optimizeGA calculation of break period insertion? #49

Open
monicathieu opened this issue Oct 9, 2023 · 0 comments
Open

optimizeGA calculation of break period insertion? #49

monicathieu opened this issue Oct 9, 2023 · 0 comments

Comments

@monicathieu
Copy link

Hi CanlabCore maintainers,

I have a question about the calculation of list lengths for fMRI stimulus sequences in OptimizeDesign11/optimizeGA. I can see in line 233 that when restevery and restlength are turned on in the controller script (and dorests is positive), numRestStim is calculated as the total number of ISI-length rest intervals to add onto the duration of the task (including stimulus intervals and blank ITI intervals).

My question is, what function is that - 1 performing in that formula? I was using optimizeGA to optimize some run orders recently, and I noticed that the numbers of trials and rest intervals that get reported out by the optimizeGA output weren't lining up exactly with what I expected based on what I input for freqConditions, scanLength, restevery, and restlength. (I was calculating scanLength as a function of condition counts and rest intervals, so it should have lined up exactly!) However, in our local version of the CanlabCore repository, I tried removing the - 1 from the formula calculating numStim with rests, and then the numbers coming out of optimizeGA lined up with the numbers going in. (The break intervals that show up in the resulting optimized trial orders were the right length as well after I removed the - 1.)

I wanted to write here to make sure I wasn't breaking something else in the formula? Thanks for your guidance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant