Print

Print


Dear Selim,

The batch interface for contrast estimation is slow because it saves the
SPM.mat file after each estimated contrast. I modified
config/spm_run_con.m such that SPM.mat is only saved once at the end.
This should make things faster (on par with Colin's script) provided all
contrasts are for the same analysis and specified within the same module
in the batch interface.
It would be useful if others were testing this modification before it
makes its way in the next set of SPM12 updates - it works fine for me
but I might miss some corner cases.

Best regards,
Guillaume.



On 23/02/17 17:13, Colin Hawco wrote:
> I think the attached script will be useful. it takes an estimated 1st level SPm.mat file (defined by pointing to the directory in which it was calculated) and a contrast matrix (one contrast per line, must be the full matrix though, meaning as many colums as there are beta_00**.nii files) and generates con and spmT files. 
> 
> Easy to run in a simple loop passing many directors. 1000 contrasts shouldn't take more than a couple hours on a decent machine, and requirte no input from you. 
> 
> Good luck,
> 
> Colin Hawco, PhD
> Neuranalysis Consulting
> Neuroimaging analysis and consultation
> www.neuranalysis.com
> [log in to unmask]
> 
> 
> 
> -----Original Message-----
> From: SPM (Statistical Parametric Mapping) [mailto:[log in to unmask]] On Behalf Of Selim Onat
> Sent: February-22-17 3:18 PM
> To: [log in to unmask]
> Subject: [SPM] beta -> tmap on command line
> 
> hi,
> 
> I would like to ask for programmers advice on transforming beta images to tmaps in an efficient way with spm 12 (or similar). 
> 
> I am facing the problem of transforming >1000 beta images to tmaps, "matlabbatch + spm_jobman" is helpful as always, but very very VERY slow. Updating the SPM.mat file becomes tedious. I estimate that I could gain 3 factors of magnitude in efficiency by doing this on the command line.
> 
> Best,
> s.
> 

-- 
Guillaume Flandin, PhD
Wellcome Trust Centre for Neuroimaging
University College London
12 Queen Square
London WC1N 3BG