explicitly declare slice order in fmri realignment example to avoid deprecation warning
Merge pull request #197 from matthew-brett/rollimg-fix0-default

RF: use fix0 to fix rollimg axis errors for TR=0

Many FMRI images have TR=0 in the affine, and this causes an error with
the previous default ``fix0=False`` for rolimg. The case is common, and I
think the fix is safe, so setting to default.
more elegant syntax
Merge pull request #199 from jonathan-taylor/formula_fix

MISC: update to multi session contrast

Modified multi_session example so that one can verify that the contrast_matrix calculations yields what is expected
Merge pull request #198 from alexis-roche/fix-realign4d-example

RF: explicitly declare slice order in fmri realignment example

To complement Matthew's (recently merged) PR on refactoring labs examples - as suggested by Satra.
RF: refactor imports, file save for affine example

Imports to standard order.

Saving parameters and image with different file names.
RF: warn about mpl dependency in contrast example
RF: use new spaces interface for tempimage example

We were using the old AffineTransform raw call.
RF: use new space api for image from array example
RF: remove iterations param in 4D realign example

I think there is no way of passing the number of iterations into the 4D
realign routines.
RF: remove temporary directory output from example

Example was writing to a temporary directory
RF: document, rename matplotlib import in examples

Change MPL import to standard naming.  Various tiny comment and
whitespace cleanups.
DOC: add some README files to examples directories
RF+DOC: refactoring fiac example files

Fix various obvious import errors, document and rename.

[ci skip]
DOC: point to latest README for data release

We haven't released the data yet because we haven't resolved the
license. Point to the latest version of the README file on github for a
link, for now.
RF: cleanup + modernize imports for mayavi example
NF: add results comparison helper

This commit also records the regression testing I did against the
results of the ``fiac_example`` script from June 2009.

I ran the current ``fiac_example`` script against the same preprocessed
FIAC data, found on Fernando's machine.  The results from Fernando and
Jonathan's run of June 2009 were in the same directories.

There have been some extremely small precision changes in the NIPY code
since then due to changes in nibabel used for reading / writing images,
but these should not affect the results.

In order to make the current code replicate the previous results I had
to:

* Temporarily revert some (correct) more recent edits of the design code

    diff --git a/examples/fiac/fiac_example.py b/examples/fiac/fiac_example.py
    index c635287..cfb37f0 100644
    --- a/examples/fiac/fiac_example.py
    +++ b/examples/fiac/fiac_example.py
    @@ -55,7 +55,7 @@ def run_model(subj, run):
        # The TR of the experiment
        TR = 2.5
        # The time of the first volume
    -    Tstart = 0.0
    +    Tstart = 1.25
        # The array of times corresponding to each volume in the fMRI data
        volume_times = np.arange(nvol) * TR + Tstart
        # This recarray of times has one column named 't'.  It is used in the
    diff --git a/nipy/modalities/fmri/fmristat/hrf.py b/nipy/modalities/fmri/fmristat/hrf.py
    index e468dcb..02fe624 100644
    --- a/nipy/modalities/fmri/fmristat/hrf.py
    +++ b/nipy/modalities/fmri/fmristat/hrf.py
    @@ -57,7 +57,7 @@ def spectral_decomposition(hrf2decompose,
            TODO
        """
        if time is None:
    -        time = np.linspace(-15,50,3251)
    +        time = np.linspace(-15,50,3751)
        dt = time[1] - time[0]
        if delta is None:
            delta = np.arange(-4.5, 4.6, 0.1)

  This caused some small changes in precision only.

* allow for sign flip in image comparison

  The statistic images include tests on the second of two basis
  functions from the spectral set.  In 2009, this had a more or less
  random sign.  About a year ago I put a constraint on the sign (after
  discussing with Jonathan) so the sign need not be the same as the
  previous run of this analysis.

* Zero out the first two slices of the group mask

  There were some very low signal voxels at the bottom of the mask that
  were causing some numerical precision errors in the statistic images
  (but not the effect, sd images) for subject ``fiac_06``

* Reprocess subject ``fiac_03`` run 1 with TStart of 0

  It turned out that fiac_03 run 1 had been rerun a few days after the
  others, in 2009, with a Tstart (time of reference slice) of 0
  instead of the previous 1.25 (see above).

After these changes, the comparison script passes for all runs and
subjects.

During testing I sometimes went back to look at and run the code from
June 2009, specifically commit dc9d02b.
NF: add hashes for FIAC preprocessed data

To allow regression testing and to show the FIAC data file structure.
RF+TEST: refactor, fix, test isestimable function

``isestimable`` was using the wrong dimension for 1D vectors, and was
writing to ``shape``, thus modifying the input argument.  Add doctests
and tests.
BF: add back estimable check for FIAC example

``isestimable`` now fixed; add back estimable check for FIAC designs.