Luis Hernandez wrote: > Dear SPMers, > > I'd like to automate our SPM analysis using scripts, thus bypassing the user interface (We have lots of subjects, and it would be a very arduous task). Does anyone else do this? Is there a place where I could look at some scripts to get started? Any advice? > > Thanks in advance, > > - Luis Yes, we are doing FMRI realignment, normalisation, smoothing, statistics and display_of_results using home written matlab scripts that bypass the user interface . These were implemented when SPM96 was released. These scripts are basically just an adapted version of the spm*ui*.m routines in which I replaced the UI parts with variables. These variables are initialised by another script that calls the adapted spm*no_ui*.m functions. In addition the scripts perform a lot of logging, and write the results in specified directories. There's also a "test-mode" of the scripts, that can be run to check the syntaxis of the parameters that the user entered, before starting everything overnight. It's nice to start up the scripts at night, come in the lab the next morning, and see sag, cor, and tran resliced results... Why didn't I release the scripts (yet)? First, I tested/debugged the script only for a limited set of parameters, e.g. only delayed box car design in statistics. Secondly, I commented most of the scripts in my native language -Dutch. Instead of investing a lot of time to make these scripts fully debugged, and user friendly enough to be distributed, I prefer to wait for SPM98, and then rewrite the scripts for that SPM version - (I'll do the fmri section only). Stefan. -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Stefan Sunaert Department of Radiology, KUL MR Research Centre University Hospital Gasthuisberg, K.U.Leuven Herestraat 49, B-3000 Leuven (Belgium) Phone: +32 16 347754, Fax : +32 16 343769 mailto:[log in to unmask] http://www.student.kuleuven.ac.be/~m8805410/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~