SPM 5 is all around SPM 5 Tutorials

  • Slides: 22
Download presentation
SPM 5 is all around! SPM 5 Tutorials by the Wellcome Department of Imaging

SPM 5 is all around! SPM 5 Tutorials by the Wellcome Department of Imaging Neuroscience

SPM 5: What’s New? q Version Control System: Subversion q User Interface + Documentation

SPM 5: What’s New? q Version Control System: Subversion q User Interface + Documentation q Data Formats (NIFTI-1) me John q Spatial Normalisation and Segmentation q f. MRI: Bayesian Analysis with Spatial Priors q EEG/MEG: Time-frequency Analysis Stefan DCM for ERPs Jérémie Source Localisation Will 2

SPM 5 requirements: q Matlab 6. 5. 1 or 7. 0 q Provided with

SPM 5 requirements: q Matlab 6. 5. 1 or 7. 0 q Provided with compiled MEX-files for Windows, Linux (32/64 -bit), Solaris. q NIFTI-1 file format for images SPM 5 is: q q 500 Matlab files 100 000 lines of Matlab code 10 000 lines of C code gallons of beer 3

SPM 5: When? 8 Feb 2005: Teasing by Will on the SPM list 4

SPM 5: When? 8 Feb 2005: Teasing by Will on the SPM list 4 May 2005: Mouth watering by John on the SPM list 9 May 2005: Beta release of SPM 5 (this is SPM 5 b (revision 136)) 18 May 2005: First updates published … October 2005: SPM 5 Tutorials November 2005: SPM 5 release 4

SPM devel, SPM 5 b or SPM 5? q “SPM devel” per say doesn’t

SPM devel, SPM 5 b or SPM 5? q “SPM devel” per say doesn’t really exist anymore. q SPM 5 b (beta) is on the same line of development than SPM 5 (but not SPM 2). SPM 5 line of development SPM 2 SPM 5 b SPM 5 t A fully patched SPM 5 b is indeed SPM 5. 5

I want SPM 5 here and now ! How to get the latest version

I want SPM 5 here and now ! How to get the latest version of SPM 5? q Old-fashioned ways Download it from the web Get it from the FIL network q The disruptive innovation “Subversion” What is it? Tortoise. SVN (Windows only) SPM Update Toolbox q A few more comments Revision numbers Matlab path 6

Download SPM 5 from the web q Download the latest package: Registration form: http:

Download SPM 5 from the web q Download the latest package: Registration form: http: //www. fil. ion. ucl. ac. uk/spm/software/download. html FTP link where you can download spm 5 b. tar. gz ftp: //ftp. fil. ion. ucl. ac. uk/spm/restricted/xxxxxx/ Unpack the tar. gz archive using any data compression software (Win. Zip, 7 -zip, gunzip, …) (not using “TAR file smart CR/LF conversion” but “Use folder names”) q Download the updates: FTP directory: ftp: //ftp. fil. ion. ucl. ac. uk/spm 5 b_updates/ Updates_README. txt Updates_? ? ? . tar. gz Unpack Updates_? ? ? . tar. gz to overwrite your SPM installation q Check for updates regularly for new features/bugs fixes… 7

Get SPM 5 from the FIL network An updated version is available on the

Get SPM 5 from the FIL network An updated version is available on the Unix network: /local/spm 5 b Copy this folder to overwrite your local copy from time to time… Don’t use SPM directly over the network! 8

Subversion http: //subversion. tigris. org/ http: //svnbook. red-bean. com/ q Subversion is the free/open-source

Subversion http: //subversion. tigris. org/ http: //svnbook. red-bean. com/ q Subversion is the free/open-source version control system used for SPM code. Manages files and directories over time. Remember every change even made to files and directories. Allows to recover older version of the code or examine the history of how your data changed. Collaborative editing and sharing of data (source code). 9

Subversion SPM your SPM working copy Command line Tortoise SVN SPM Update Client interface

Subversion SPM your SPM working copy Command line Tortoise SVN SPM Update Client interface Subversion library Internet/Intranet (any TCP/IP Network) Subversion server bread. fil. ion. ucl. ac. uk SPM SPM repository Subversion Repository 10

Tortoise. SVN http: //tortoisesvn. sourceforge. net/ q Tortoise. SVN is a free open-source client

Tortoise. SVN http: //tortoisesvn. sourceforge. net/ q Tortoise. SVN is a free open-source client for the Subversion control system. q Extension for the Windows Explorer. q Icons overlay shows all versioned / modified files. q All Subversion commands available from the explorer context menu. available via a simple right click. q Tortoise. SVN requires the administrative rights on your computer to be installed. 11

Tortoise. SVN: Checkout URL of the repository: svn: //bread. fil. ion. ucl. ac. uk/spm/trunk/

Tortoise. SVN: Checkout URL of the repository: svn: //bread. fil. ion. ucl. ac. uk/spm/trunk/ Right click in the Windows Explorer 12

Tortoise. SVN: Update Case 1: your SPM files needed to be updated. Case 2:

Tortoise. SVN: Update Case 1: your SPM files needed to be updated. Case 2: your SPM files are up-to-date. 13

Tortoise. SVN: Diff If you modify a file: 14

Tortoise. SVN: Diff If you modify a file: 14

SPM Update Toolbox (1) http: //www. fil. ion. ucl. ac. uk/spm/local/update/ q An all-in-one

SPM Update Toolbox (1) http: //www. fil. ion. ucl. ac. uk/spm/local/update/ q An all-in-one Matlab toolbox including standalone Subversion binaries for several platforms: Ø Windows XP Ø Linux (32 -bit) Ø Solaris q It does not require the administrative rights on your computer to be installed. q The graphical user interface provides only the Subversion commands you need as a non-developer (update, no commit). q All your operations are logged in a text file so that you can track the exact date of each time you updated your SPM files. 15

SPM Update Toolbox (2) Download the toolbox from: http: //www. fil. ion. ucl. ac.

SPM Update Toolbox (2) Download the toolbox from: http: //www. fil. ion. ucl. ac. uk/spm/local/update/ Unpack the. zip archive using any data compression software In Matlab, modify the path to include this new directory or move into it. Type SPM_update at the prompt and return. Create a new folder for it! 16

SPM Update Toolbox (3) Case 1: Your version is up-to-date. 17

SPM Update Toolbox (3) Case 1: Your version is up-to-date. 17

SPM Update Toolbox (4) Case 2: Your version is not up-to-date or you modified

SPM Update Toolbox (4) Case 2: Your version is not up-to-date or you modified some files. 18

Matlab Path Add Folder (and not with Subfolders) Remove older SPM versions from the

Matlab Path Add Folder (and not with Subfolders) Remove older SPM versions from the path 19

SPM Matlab Files function [C, h, Ph, F] = spm_reml(YY, X, Q, N, OPT)

SPM Matlab Files function [C, h, Ph, F] = spm_reml(YY, X, Q, N, OPT) % Re. ML estimation of covariance components from y*y' % FORMAT [C, h, Ph, F] = spm_reml(YY, X, Q, N, [OPT]); % % YY - (m x m) sample covariance matrix Y*Y' {Y = (m x n) data matrix} % X - (m x p) design matrix % Q - {1 x q} covariance components % N - number of samples % % OPT = 1 : log-normal hyper- parameterisation % % C - (m x m) estimated errors = h(1)*Q{1} + h(2)*Q{2} +. . . % h - (q x 1) Re. ML hyperparameters h % Ph - (q x q) conditional precision of h [or log(h), if OPT(1)] % % F - [-ve] free energy F = log evidence = p(Y|X, Q) = Re. ML objective % % Performs a Fisher-Scoring ascent on F to find Re. ML variance parameter % estimates. %_____________________________________ % Copyright (C) 2005 Wellcome Department of Imaging Neuroscience % John Ashburner & Karl Friston % $Id: spm_reml. m 249 2005 -10 -05 17: 58: 37 Z karl $ Syntax Definition H 1 Line >> lookfor reml Help >> help spm_reml Maintainer(s) 20 SVN Properties

SVN Revision Numbers q Each revision number ($Rev$) corresponds to a “snapshot” of the

SVN Revision Numbers q Each revision number ($Rev$) corresponds to a “snapshot” of the repository: Rev. 136 SPM 5 b Rev. 252 HEAD (current version) Rev. xxx SPM 5 q Differences between the several ways to get SPM: Download web Get from network Subversion: Tortoise. SVN SPM Update Tbx 136: SPM 5 b 252: HEAD xxx: SPM 5 21

SPM 5 ready to use SPM 5 is available… SPM 5 is stable… SPM

SPM 5 ready to use SPM 5 is available… SPM 5 is stable… SPM 5 is fully functional… 22