FIX: cov raw test
Merge pull request #151 from mluessi/fix_cov_test

Fix for failing cov test
WIP: ICA decomposition for Raw and Epochs (cleaned branch)

Summary of changes
- Adding ICA class that sets up a seed and has methods to decompose, clean and recompose raw and epochs data using FastICA (scikits-learn).
- The ICA class supports the different channel types. To prewhiten / standardize the data before passing to FastICA either a noise covariance matrix is used and if not available, a simple standardization of the variances to 1.
- Adding panel plot function to viz that is useful for visually inspect ICA components at one glance. For the time being this is the way to determine artifact components
- Adding RawFromMerg class (subclass or Raw) to fiff.raw to initialize a new raw instance from the original instance and the ica processessed data. This is supposed to be cleaner than just deepcopying the exisiting instance which also would break the fids.
- Adding examples tha demonstrate the entire workflow.

TODO:
- complete tests of the noise_cov case
- further test plausibility of recomposed (unchanged) data
    - find sensible atol criterion for np.allclose
    - compare standardization- to noise-cov pre-whitening
    - compare dimension reduction to non-reduction results
- complete the epochs based workflow
- integrate components-selection into plotting function

At this moment I'm not exatly sure how to handle the component selection for the epochs case. Naive approach: just as for raw =>> plot slices of concatenated epochs. Complex approach. Treat epochs individually.
Comments / opinioins are highly welcome.
WIP/API: refinign API, adding epochs support

Summary of Changes
==================
- refactoring the API for ICA
    - I choose to go with @mluessi 's proposal to make the ICA remember the last fit. As Consequence the attribute name space now is way cleaner, just .sources, .mixing, .source_ids. One good reason for keeping sources is that it just makes everything simpler, starting including recomposition and plotting. Silly operations are block by ValueErrors that mock about the user as she tries to recompose data which aren't fitted.
    - I included @agramfort 's proposal with regard to the initalization
- cleaned the sorting function, it now should look much nicer to your eyes.
- updated the __repr__ it now tells you what you have fitted (or not).
- in general the code should be much easier to read now. In order to minimize code reduplication the follwing jobs are delegated to according private functions: pre-whitening, initial fitting, recomposition (denoising)
- In addition: pyflakes and cosmetic operations, thanks for your comments.
- I created separate examples for the epochs and the raw case
- conformed viz.py to the API-changes

TODO
====
- Passing parameters to the underlying FastICA. Explicitly, param by param (copy FastICA docstring) or as pseud-kwargs dict, e.g. ica_params. Wdyt?
- Method / alternative constructor for updating epochs objects. Wdyt?
- Tests
- interactive component deselection (clicking). Well, still don't have a clue how. But would be great.
WIP/FIX: Adding full support for epochs ica
- created EpochsFromMerge class along the lines for RawFromMerge
- added copy arg for denoise_epochs
- updated example
ENH : first iteration over ICA code
ENH: Second iteration
- cosmits, tiny pyflakes
ENH: next iteration over ICA code

Summary:
- removed dubious merge classes and added copy methods to Raw and Epochs
- refactored ICA class
 - now the ica is once fit and besides the mixing and the channel names the fit info (from where it was fit) nothing is stored.
 - raw and epochs get passed to decompose_raw, get_sources, pick_sources etc.
 - everything matching the initially picked channels can be de- and recomposed, anytime during later processing.
 - added mechanism taking care of the picks. the functions / methods can be called without passing picks. if omitted, they get reconstructed from the channel property (which internally handles the channel names as numpy array). if non-matching, exception will be thrown.
 - sources can be requested and get calculated internally when removing epochs
 - changed method names: decompose_raw, pick_sources_raw, get_sources_raw and the same for epochs
 - changed the sort function. it now only sorts the sources. a sort buffer takes care of silly slips that might happen when using different sort methods on get_sources and pick_sources
 - delegated repetitive stuff to additional private methods

 TODO:
 - test fitting epochs
 - test the sort buffer
 - nose tests
ENH: Next iteration over ICA code

Summary:
- removing supefluous private functions
- cleaning and code
- fixing and testing the epochs de- / re-composition from epochs and raw
- updating epochs example
- testing sorting buffer / logger

I think I'm done with this for the moment.
Unfortunately the epochs decomposition does not look so nice as compared to
the raw decomposition ['not enugh removed'], even when using the raw fit ['too much removed']. Maybe different cost functions have to be tested...
ENH: cleaning up
- dropping sort buffer / history, turns out to be unnecessary
ENH: next iteration over ICA code
- tiny fixes
- restoring the raw example
- making nicer comparison plots for raw data re/recomposition
ENH: polishing api / examples.
- moving examples to preprocessing
- dropping property
- enhancing _check_picks
- moving to included/excluded terminology, dropping bads / picks in the context of recomposition
ENH: ... moving files
FIX: nasty indexing bug
WIP: first test for ica.py
- invoking the ica methods
- for noise_cov and pseudo-whitening
- performing simple assert statements for ica results
FIX: fixes based on tests
FIX/ENH: removing confusing conditionals in ica._chek_picks
- now either you re-pass the fitted picks or you don't
- either way the fitted picks are used
ENH : cleanup of ICA code + test + examples
ENH: big cleanup
- removing unnecessary magic
- thinning out the sort function
- adding support for source-sorting on 3 dimensional arrays as draw from epochs
- adding sorting tests
- adding docstrings to viz (finally ;-)

TODO:
- explore parameters for epochs ica / look for nicer results. then update example
ENH: cleanup - tested n_component is None case
- updated __repr__
- included some FastICA parameters in the __init__ in order to increase flexibility