Diff for "SpmTips" - MRC CBU Imaging Wiki
location: Diff for "SpmTips"
Differences between revisions 2 and 6 (spanning 4 versions)
Revision 2 as of 2006-08-16 09:56:51
Size: 2477
Editor: RhodriCusack
Comment:
Revision 6 as of 2013-03-07 21:22:58
Size: 3270
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
[[TableOfContents]] <<TableOfContents>>
Line 9: Line 9:
As every user of SPM knows, SPM has no Cancel button, or Back key, to go back when you've made a mistake. If you get half way through specifying some steps in an SPM series of prompts, and make a mistake, or you want to stop an SPM job running, then you can do one of three things. The first is to click in the SPM matlab window (the text window for matlab, often with a >> prompt), and press control-C, followed by return. You will get an error message, and the current process will stop, returning another >> prompt to the matlab window. As every user of SPM knows, SPM has no Cancel button, or Back key, to go back when you've made a mistake. If you get half way through specifying some steps in an SPM series of prompts, and make a mistake, or you want to stop an SPM job running, then you can do one of three things. The first is to click in the SPM matlab window (the text window for matlab, often with a >> prompt), and press control-C, followed by return. You will get an error message, and the current process will stop, returning another `>>` prompt to the matlab window.
Line 15: Line 15:
If you get sick of making mistakes, and having to go back to the beginning, then consider [wiki:SpmBatch SPM batch mode], or one of our automated covariate / condition entry SPM hacks - see [wiki:SpmHowtos the SPM howtos page] for links. If you get sick of making mistakes, and having to go back to the beginning, then consider [[SpmBatch|SPM batch mode]].
Line 19: Line 19:
Run SPM on the machine with the most memory, and the fastest CPU. More memory is usually more important than speed of CPU, within reasonable limits. In the CBU, the SPM starting commands (see the [wiki:SpmVersions SPM versions page]) automatically run matlab and SPM on our linux machines, which each have 2GB of memory and are reasonably fast. Run SPM on the machine with the most memory, and the fastest CPU. More memory is usually more important than speed of CPU, within reasonable limits. In the CBU, the SPM starting commands (see the [[SpmVersions|SPM versions page]]) automatically run matlab and SPM on our linux machines, which each have 2GB of memory and are reasonably fast.
Line 21: Line 21:
[[Anchor(naughty_winzip)]] <<Anchor(naughty_winzip)>>
Line 34: Line 34:
Alternatively use an alternative to winzip. Alle Meike Wink recommends [http://www.zipgenius.it/eng zipgenius]. Alternatively use an alternative to winzip. Alle Meije Wink recommends [[http://www.zipgenius.it/eng|zipgenius]].
Line 36: Line 36:
<<Anchor(invalid_contrast)>>
== Not able to enter contrasts with SPM and matlab 7 ==

Some users of matlab 7 seems to hit the following problem:

You are unable to define contrasts using the contrast manager. The cursor sits in
the middle of the contrast definition box (not at the top LHS). Once you
enter you enter your contrast values and hit enter, the manager continues to say
contrast name defined, NO CONTRAST DEFINED.

This seems to be some very complicated bug in matlab 7
that prevents the necessary GUI callback being executed in the
contrast GUI. I (MatthewBrett) have briefly tried to track it down, but it's a real
horror. For now, you can fix this behavior by entering this at the matlab prompt, before you start the SPM contrast manager:

{{{
feature('JavaFigures',0)
}}}

or starting matlab without the java engine - from the command line:

{{{
matlab -nojvm
}}}

Miscellaneous SPM tips and tricks

This is a pot-pourri of tips for using SPM that didn't seem to fit elsewhere. We would be very grateful for any suggestions for inclusion here. Pourri, in French means 'rotten'. Hmm.

Cancelling an SPM process

As every user of SPM knows, SPM has no Cancel button, or Back key, to go back when you've made a mistake. If you get half way through specifying some steps in an SPM series of prompts, and make a mistake, or you want to stop an SPM job running, then you can do one of three things. The first is to click in the SPM matlab window (the text window for matlab, often with a >> prompt), and press control-C, followed by return. You will get an error message, and the current process will stop, returning another >> prompt to the matlab window.

The second is to right-click somewhere innocuous on the window that you are using; you may get a menu that includes crash out - select that.

The third is to close the SPM window containing the current prompt from the GUI (the SPM input window, or the SPM file selection window). This will cancel that series of prompts.

If you get sick of making mistakes, and having to go back to the beginning, then consider SPM batch mode.

SPM speed tips

Run SPM on the machine with the most memory, and the fastest CPU. More memory is usually more important than speed of CPU, within reasonable limits. In the CBU, the SPM starting commands (see the SPM versions page) automatically run matlab and SPM on our linux machines, which each have 2GB of memory and are reasonably fast.

Corrupted mat files

There can be problems with corrupted mat files, in the following situation:

  • You are using windows
  • You have downloaded an archive containing a mat file in tar.gz or tgz format

  • You used winzip to unpack the archive

This appears to be because of a winzip "feature". To get round this, you need to ensure that winzip is not using "TAR file smart CR/LF conversion"; in my version of winzip this is done via Options->Configuration, Miscellaneous tab, and unchecking the relevant checkbox...

Alternatively use an alternative to winzip. Alle Meije Wink recommends zipgenius.

Not able to enter contrasts with SPM and matlab 7

Some users of matlab 7 seems to hit the following problem:

You are unable to define contrasts using the contrast manager. The cursor sits in the middle of the contrast definition box (not at the top LHS). Once you enter you enter your contrast values and hit enter, the manager continues to say contrast name defined, NO CONTRAST DEFINED.

This seems to be some very complicated bug in matlab 7 that prevents the necessary GUI callback being executed in the contrast GUI. I (MatthewBrett) have briefly tried to track it down, but it's a real horror. For now, you can fix this behavior by entering this at the matlab prompt, before you start the SPM contrast manager:

feature('JavaFigures',0)

or starting matlab without the java engine - from the command line:

matlab -nojvm

MatthewBrett

CbuImaging: SpmTips (last edited 2013-03-07 21:22:58 by localhost)