Skip to content

optimizeGA calculation of break period insertion? #49

@monicathieu

Description

@monicathieu

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions