romainVala / matvol

batch scripting files for neuroimaging
Apache License 2.0
4 stars 5 forks source link

Optimize auto_add_obj MultiEcho #63

Closed benoitberanger closed 3 years ago

benoitberanger commented 3 years ago

In job_sort_echos and job_afni_proc_multi_echo, the computation time of the _auto_addobj was proportional to nSubj2 x nRun2 x nEcho. The quadratic (2) effect was negligible with small & modest size dataset. However, with large dataset (nSubj > 100 & Run > 1) the computation time was atrocious. This is due do bad code optimization, which is corrected with this PR. New cputime is proportional to nSubj x nRun x nEcho. Yay !