mne-tools/mne-python — pull request #1346 by rgoj (2014-06-14 14:02:22+00:00)
Title: WIP/ENH/FIX TF Beamformer source spectrogram edge effects

Addresses "edge effects" problems mentioned in #812, #814, i.e. source spectrograms showing results of time-frequency beamforming that look like this:

![tf_lcmv_er_same_reg](https://cloud.githubusercontent.com/assets/4092165/3278612/10aea8c2-f3ca-11e3-9611-15f0bde830c0.png)
[Figure achieved by running the plot_tf_lcmv example after setting both noise and data regularization parameters to the same value]

These edge effects appear because in the current code the first and last time points in the source spectrograms come from one time window. In the middle time bins each bin is an average of all time windows containing that bin (i.e. 6 time windows when the time window is 300 ms and the time step is 50 ms). This sometimes leads to non-averaged activity at the edges being higher than the smoothed activity in the middle ot the time range.

This doesn't occur that often, but I think it should be fixed, i.e. ideally all the time-frequency bins should display comparable quantities instead of displaying averages of varying numbers of time windows or even non-smoothed data.

This fix adds the ability to choose tmin and tmax when plotting the source spectrogram and changes the tf_lcmv example, so that it calculates tf_lcmv estimates between -0.55 and 0.75, but displays only data from the 0.3 to 0.5 range, as previously.

This was very simple... however I noticed that the maximum found by the example when baselines are used for noise covariance after the changes differ slightly from the maximum found from before the changes were made. This is due to the how baselining is implemented in the tf_lcmv example and function and so requires more changes. Coming soon.