diff --git a/.gitignore b/.gitignore
old mode 100644
new mode 100755
index a32ce2aea..cdad72a3d
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,5 @@
 *.pyc
 *.pyo
-*.sh
 *.so
 *.fif
 *.tar.gz
diff --git a/Makefile b/Makefile
index 7b7102444..484275006 100755
--- a/Makefile
+++ b/Makefile
@@ -108,10 +108,3 @@ manpages:
 			>| ../build/manpages/$$f.1; \
 	done
 
-build-doc-dev:
-	cd doc; make clean
-	cd doc; DISPLAY=:1.0 xvfb-run -n 1 -s "-screen 0 1280x1024x24 -noreset -ac +extension GLX +render" make html_dev
-
-build-doc-stable:
-	cd doc; make clean
-	cd doc; DISPLAY=:1.0 xvfb-run -n 1 -s "-screen 0 1280x1024x24 -noreset -ac +extension GLX +render" make html
diff --git a/doc/source/_static/navy.css b/doc/source/_static/navy.css
index c8419184a..04912f9ad 100755
--- a/doc/source/_static/navy.css
+++ b/doc/source/_static/navy.css
@@ -4,7 +4,7 @@
  */
 
 body {
-    font-family: 'Open Sans', 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva', 'Verdana', sans-serif;
+    font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva', 'Verdana', sans-serif;
     font-size: 14px;
     letter-spacing: -0.01em;
     line-height: 150%;
diff --git a/doc/source/_templates/layout.html b/doc/source/_templates/layout.html
index 7178e1f11..c71a45092 100755
--- a/doc/source/_templates/layout.html
+++ b/doc/source/_templates/layout.html
@@ -1,9 +1,6 @@
 {% extends "!layout.html" %}
 
 {% block extrahead %}
-
-<link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700' rel='stylesheet' type='text/css'>
-
 {% if use_google_analytics|tobool %}
     <script type="text/javascript">
     var _gaq = _gaq || [];
diff --git a/examples/README.txt b/examples/README.txt
index 75dff2db0..aebe56991 100644
--- a/examples/README.txt
+++ b/examples/README.txt
@@ -1,4 +1,6 @@
-Introductory examples
----------------------
 
-Introductory examples to MNE.
+General examples
+-------------------
+
+General-purpose and introductory examples to MNE.
+
diff --git a/examples/connectivity/plot_mne_inverse_coherence_epochs.py b/examples/connectivity/plot_mne_inverse_coherence_epochs.py
index d09357237..c8c973e7b 100644
--- a/examples/connectivity/plot_mne_inverse_coherence_epochs.py
+++ b/examples/connectivity/plot_mne_inverse_coherence_epochs.py
@@ -5,7 +5,7 @@ Compute coherence in source space using a MNE inverse solution
 
 This examples computes the coherence between a seed in the left
 auditory cortex and the rest of the brain based on single-trial
-MNE-dSPM inverse solutions.
+MNE-dSPM inverse soltions.
 
 """
 # Author: Martin Luessi <mluessi@nmr.mgh.harvard.edu>
diff --git a/examples/forward/README.txt b/examples/forward/README.txt
deleted file mode 100644
index 89db5587d..000000000
--- a/examples/forward/README.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-
-Forward modeling
-----------------
-
-From BEM segmentation, coregistration, setting up source spaces
-to actual computation of forward solution.
diff --git a/examples/plot_compute_mne_inverse.py b/examples/inverse/plot_compute_mne_inverse.py
similarity index 100%
rename from examples/plot_compute_mne_inverse.py
rename to examples/inverse/plot_compute_mne_inverse.py
diff --git a/examples/io/README.txt b/examples/io/README.txt
deleted file mode 100644
index 45f88d173..000000000
--- a/examples/io/README.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-
-Input/Ouput
------------
-
-Reading and writing files.
diff --git a/examples/forward/plot_bem_contour_mri.py b/examples/plot_bem_contour_mri.py
similarity index 100%
rename from examples/forward/plot_bem_contour_mri.py
rename to examples/plot_bem_contour_mri.py
diff --git a/examples/visualization/plot_channel_epochs_image.py b/examples/plot_channel_epochs_image.py
similarity index 100%
rename from examples/visualization/plot_channel_epochs_image.py
rename to examples/plot_channel_epochs_image.py
diff --git a/examples/visualization/plot_clickable_image.py b/examples/plot_clickable_image.py
similarity index 100%
rename from examples/visualization/plot_clickable_image.py
rename to examples/plot_clickable_image.py
diff --git a/examples/forward/plot_coregistration_transform.py b/examples/plot_coregistration_transform.py
similarity index 100%
rename from examples/forward/plot_coregistration_transform.py
rename to examples/plot_coregistration_transform.py
diff --git a/examples/forward/plot_decimate_head_surface.py b/examples/plot_decimate_head_surface.py
similarity index 100%
rename from examples/forward/plot_decimate_head_surface.py
rename to examples/plot_decimate_head_surface.py
diff --git a/examples/preprocessing/plot_define_target_events.py b/examples/plot_define_target_events.py
similarity index 100%
rename from examples/preprocessing/plot_define_target_events.py
rename to examples/plot_define_target_events.py
diff --git a/examples/io/plot_epochs_to_data_frame.py b/examples/plot_epochs_to_data_frame.py
similarity index 100%
rename from examples/io/plot_epochs_to_data_frame.py
rename to examples/plot_epochs_to_data_frame.py
diff --git a/examples/preprocessing/plot_estimate_covariance_matrix_baseline.py b/examples/plot_estimate_covariance_matrix_baseline.py
similarity index 100%
rename from examples/preprocessing/plot_estimate_covariance_matrix_baseline.py
rename to examples/plot_estimate_covariance_matrix_baseline.py
diff --git a/examples/preprocessing/plot_estimate_covariance_matrix_raw.py b/examples/plot_estimate_covariance_matrix_raw.py
similarity index 100%
rename from examples/preprocessing/plot_estimate_covariance_matrix_raw.py
rename to examples/plot_estimate_covariance_matrix_raw.py
diff --git a/examples/visualization/plot_evoked_delayed_ssp.py b/examples/plot_evoked_delayed_ssp.py
similarity index 100%
rename from examples/visualization/plot_evoked_delayed_ssp.py
rename to examples/plot_evoked_delayed_ssp.py
diff --git a/examples/visualization/plot_evoked_topomap.py b/examples/plot_evoked_topomap.py
similarity index 100%
rename from examples/visualization/plot_evoked_topomap.py
rename to examples/plot_evoked_topomap.py
diff --git a/examples/visualization/plot_evoked_topomap_delayed_ssp.py b/examples/plot_evoked_topomap_delayed_ssp.py
similarity index 100%
rename from examples/visualization/plot_evoked_topomap_delayed_ssp.py
rename to examples/plot_evoked_topomap_delayed_ssp.py
diff --git a/examples/visualization/plot_evoked_whitening.py b/examples/plot_evoked_whitening.py
similarity index 100%
rename from examples/visualization/plot_evoked_whitening.py
rename to examples/plot_evoked_whitening.py
diff --git a/examples/plot_extract_events_from_raw.py b/examples/plot_extract_events_from_raw.py
index 4d52daf6b..4d8c1a283 100644
--- a/examples/plot_extract_events_from_raw.py
+++ b/examples/plot_extract_events_from_raw.py
@@ -25,7 +25,7 @@ raw = Raw(fname)
 events = mne.find_events(raw, stim_channel='STI 014')
 
 # Writing events
-mne.write_events('sample_audvis_raw-eve.fif', events)
+mne.write_events('events.fif', events)
 
 for ind, before, after in events[:5]:
     print("At sample %d stim channel went from %d to %d"
diff --git a/examples/plot_from_raw_to_epochs_to_evoked.py b/examples/plot_from_raw_to_epochs_to_evoked.py
index d36bff025..c2934c685 100644
--- a/examples/plot_from_raw_to_epochs_to_evoked.py
+++ b/examples/plot_from_raw_to_epochs_to_evoked.py
@@ -16,6 +16,7 @@ data and then saved to disk.
 import mne
 from mne import io
 from mne.datasets import sample
+import matplotlib.pyplot as plt
 
 print(__doc__)
 
@@ -25,17 +26,14 @@ data_path = sample.data_path()
 # Set parameters
 raw_fname = data_path + '/MEG/sample/sample_audvis_filt-0-40_raw.fif'
 event_fname = data_path + '/MEG/sample/sample_audvis_filt-0-40_raw-eve.fif'
-tmin, tmax = -0.2, 0.5
-
-# Select events to extract epochs from.
-event_id = {'Auditory/Left': 1, 'Auditory/Right': 2}
+event_id, tmin, tmax = 1, -0.2, 0.5
 
 #   Setup for reading the raw data
 raw = io.Raw(raw_fname)
 events = mne.read_events(event_fname)
 
 #   Plot raw data
-fig = raw.plot(events=events, event_color={1: 'cyan', -1: 'lightgray'})
+fig = raw.plot(events=events, event_color={event_id: 'cyan', -1: 'lightgray'})
 
 #   Set up pick list: EEG + STI 014 - bad channels (modify to your needs)
 include = []  # or stim channels ['STI 014']
@@ -56,21 +54,26 @@ epochs.plot()
 epochs.drop_bad_epochs()
 epochs.plot_drop_log(subject='sample')
 
-# Average epochs and get evoked data corresponding to the left stimulation
-evoked = epochs['Left'].average()
+evoked = epochs.average()  # average epochs and get an Evoked dataset.
 
 evoked.save('sample_audvis_eeg-ave.fif')  # save evoked data to disk
 
 ###############################################################################
 # View evoked response
+times = 1e3 * epochs.times  # time in miliseconds
+
+ch_max_name, latency = evoked.get_peak(mode='neg')
 
 evoked.plot()
 
-###############################################################################
-# Save evoked responses for different conditions to disk
+plt.xlim([times[0], times[-1]])
+plt.xlabel('time (ms)')
+plt.ylabel('Potential (uV)')
+plt.title('EEG evoked potential')
 
-# average epochs and get Evoked datasets
-evokeds = [epochs[cond].average() for cond in ['Left', 'Right']]
+plt.axvline(latency * 1e3, color='red',
+            label=ch_max_name, linewidth=2,
+            linestyle='--')
+plt.legend(loc='best')
 
-# save evoked data to disk
-mne.write_evokeds('sample_auditory_and_visual_eeg-ave.fif', evokeds)
+plt.show()
diff --git a/examples/plot_from_raw_to_multiple_epochs_to_evoked.py b/examples/plot_from_raw_to_multiple_epochs_to_evoked.py
new file mode 100644
index 000000000..410239032
--- /dev/null
+++ b/examples/plot_from_raw_to_multiple_epochs_to_evoked.py
@@ -0,0 +1,72 @@
+"""
+====================================================================
+Extract epochs for multiple conditions, save evoked response to disk
+====================================================================
+
+This script shows how to read the epochs for multiple conditions from
+a raw file given a list of events. The epochs are averaged to produce
+evoked data and then saved to disk.
+
+"""
+# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
+#          Eric Larson <larson.eric.d@gmail.com>
+#          Denis Engemann <denis.engemann@gmail.com>
+#
+# License: BSD (3-clause)
+
+import mne
+from mne import io
+from mne.datasets import sample
+from mne.epochs import combine_event_ids
+import matplotlib.pyplot as plt
+
+print(__doc__)
+
+data_path = sample.data_path()
+
+###############################################################################
+# Set parameters
+raw_fname = data_path + '/MEG/sample/sample_audvis_filt-0-40_raw.fif'
+event_fname = data_path + '/MEG/sample/sample_audvis_filt-0-40_raw-eve.fif'
+event_ids = {'AudL': 1, 'AudR': 2, 'VisL': 3, 'VisR': 4}
+tmin = -0.2
+tmax = 0.5
+
+#   Setup for reading the raw data
+raw = io.Raw(raw_fname)
+events = mne.read_events(event_fname)
+
+#   Set up pick list: EEG + STI 014 - bad channels (modify to your needs)
+include = []  # or stim channels ['STI 014']
+raw.info['bads'] += ['EEG 053']  # bads + 1 more
+
+# pick EEG channels
+picks = mne.pick_types(raw.info, meg=False, eeg=True, stim=False, eog=True,
+                       include=include, exclude='bads')
+# Read epochs
+epochs = mne.Epochs(raw, events, event_ids, tmin, tmax, picks=picks,
+                    baseline=(None, 0), reject=dict(eeg=80e-6, eog=150e-6))
+# Let's equalize the trial counts in each condition
+epochs.equalize_event_counts(['AudL', 'AudR', 'VisL', 'VisR'], copy=False)
+# Now let's combine some conditions
+combine_event_ids(epochs, ['AudL', 'AudR'], {'Auditory': 12}, copy=False)
+combine_event_ids(epochs, ['VisL', 'VisR'], {'Visual': 34}, copy=False)
+
+# average epochs and get Evoked datasets
+evokeds = [epochs[cond].average() for cond in ['Auditory', 'Visual']]
+
+# save evoked data to disk
+mne.write_evokeds('sample_auditory_and_visual_eeg-ave.fif', evokeds)
+
+###############################################################################
+# View evoked response
+plt.clf()
+ax = plt.subplot(2, 1, 1)
+evokeds[0].plot(axes=ax)
+plt.title('EEG evoked potential, auditory trials')
+plt.ylabel('Potential (uV)')
+ax = plt.subplot(2, 1, 2)
+evokeds[1].plot(axes=ax)
+plt.title('EEG evoked potential, visual trials')
+plt.ylabel('Potential (uV)')
+plt.show()
diff --git a/examples/preprocessing/plot_interpolate_bad_channels.py b/examples/plot_interpolate_bad_channels.py
similarity index 100%
rename from examples/preprocessing/plot_interpolate_bad_channels.py
rename to examples/plot_interpolate_bad_channels.py
diff --git a/examples/forward/plot_left_cerebellum_volume_source.py b/examples/plot_left_cerebellum_volume_source.py
similarity index 100%
rename from examples/forward/plot_left_cerebellum_volume_source.py
rename to examples/plot_left_cerebellum_volume_source.py
diff --git a/examples/forward/plot_make_forward.py b/examples/plot_make_forward.py
similarity index 100%
rename from examples/forward/plot_make_forward.py
rename to examples/plot_make_forward.py
diff --git a/examples/visualization/plot_meg_eeg_fields_3d.py b/examples/plot_meg_eeg_fields_3d.py
similarity index 100%
rename from examples/visualization/plot_meg_eeg_fields_3d.py
rename to examples/plot_meg_eeg_fields_3d.py
diff --git a/examples/io/plot_objects_from_arrays.py b/examples/plot_objects_from_arrays.py
similarity index 100%
rename from examples/io/plot_objects_from_arrays.py
rename to examples/plot_objects_from_arrays.py
diff --git a/examples/io/plot_read_and_write_raw_data.py b/examples/plot_read_and_write_raw_data.py
similarity index 100%
rename from examples/io/plot_read_and_write_raw_data.py
rename to examples/plot_read_and_write_raw_data.py
diff --git a/examples/forward/plot_read_bem_surfaces.py b/examples/plot_read_bem_surfaces.py
similarity index 100%
rename from examples/forward/plot_read_bem_surfaces.py
rename to examples/plot_read_bem_surfaces.py
diff --git a/examples/io/plot_read_epochs.py b/examples/plot_read_epochs.py
similarity index 100%
rename from examples/io/plot_read_epochs.py
rename to examples/plot_read_epochs.py
diff --git a/examples/io/plot_read_evoked.py b/examples/plot_read_evoked.py
similarity index 100%
rename from examples/io/plot_read_evoked.py
rename to examples/plot_read_evoked.py
diff --git a/examples/forward/plot_read_forward.py b/examples/plot_read_forward.py
similarity index 100%
rename from examples/forward/plot_read_forward.py
rename to examples/plot_read_forward.py
diff --git a/examples/io/plot_read_noise_covariance_matrix.py b/examples/plot_read_noise_covariance_matrix.py
similarity index 100%
rename from examples/io/plot_read_noise_covariance_matrix.py
rename to examples/plot_read_noise_covariance_matrix.py
diff --git a/examples/preprocessing/plot_rereference_eeg.py b/examples/plot_rereference_eeg.py
similarity index 100%
rename from examples/preprocessing/plot_rereference_eeg.py
rename to examples/plot_rereference_eeg.py
diff --git a/examples/preprocessing/plot_shift_evoked.py b/examples/plot_shift_evoked.py
similarity index 100%
rename from examples/preprocessing/plot_shift_evoked.py
rename to examples/plot_shift_evoked.py
diff --git a/examples/simulation/plot_simulate_evoked_data.py b/examples/plot_simulate_evoked_data.py
similarity index 100%
rename from examples/simulation/plot_simulate_evoked_data.py
rename to examples/plot_simulate_evoked_data.py
diff --git a/examples/visualization/plot_ssp_projs_sensitivity_map.py b/examples/plot_ssp_projs_sensitivity_map.py
similarity index 100%
rename from examples/visualization/plot_ssp_projs_sensitivity_map.py
rename to examples/plot_ssp_projs_sensitivity_map.py
diff --git a/examples/visualization/plot_ssp_projs_topomaps.py b/examples/plot_ssp_projs_topomaps.py
similarity index 100%
rename from examples/visualization/plot_ssp_projs_topomaps.py
rename to examples/plot_ssp_projs_topomaps.py
diff --git a/examples/visualization/plot_topo_channel_epochs_image.py b/examples/plot_topo_channel_epochs_image.py
similarity index 100%
rename from examples/visualization/plot_topo_channel_epochs_image.py
rename to examples/plot_topo_channel_epochs_image.py
diff --git a/examples/visualization/plot_topo_compare_conditions.py b/examples/plot_topo_compare_conditions.py
similarity index 100%
rename from examples/visualization/plot_topo_compare_conditions.py
rename to examples/plot_topo_compare_conditions.py
diff --git a/examples/visualization/plot_topo_customized.py b/examples/plot_topo_customized.py
similarity index 100%
rename from examples/visualization/plot_topo_customized.py
rename to examples/plot_topo_customized.py
diff --git a/examples/visualization/plot_topography.py b/examples/plot_topography.py
similarity index 100%
rename from examples/visualization/plot_topography.py
rename to examples/plot_topography.py
diff --git a/examples/preprocessing/plot_virtual_evoked.py b/examples/plot_virtual_evoked.py
similarity index 100%
rename from examples/preprocessing/plot_virtual_evoked.py
rename to examples/plot_virtual_evoked.py
diff --git a/examples/io/read_events.py b/examples/read_events.py
similarity index 100%
rename from examples/io/read_events.py
rename to examples/read_events.py
diff --git a/examples/simulation/README.txt b/examples/simulation/README.txt
deleted file mode 100644
index bec6bcce3..000000000
--- a/examples/simulation/README.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-
-Data Simulation
----------------
-
-Tools to generate simulation data.
diff --git a/examples/visualization/README.txt b/examples/visualization/README.txt
deleted file mode 100644
index 25af47af5..000000000
--- a/examples/visualization/README.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-
-Visualization
--------------
-
-Looking at data and processing output.
diff --git a/examples/visualization/plot_evoked_erf_erp.py b/examples/visualization/plot_evoked_erf_erp.py
deleted file mode 100644
index db9f68b01..000000000
--- a/examples/visualization/plot_evoked_erf_erp.py
+++ /dev/null
@@ -1,48 +0,0 @@
-"""
-=================================
-Plotting ERF/ERP with evoked data
-=================================
-
-Load evoked data and plot.
-
-"""
-# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
-#
-# License: BSD (3-clause)
-
-import matplotlib.pyplot as plt
-from mne.datasets import sample
-from mne import read_evokeds
-
-print(__doc__)
-
-path = sample.data_path()
-fname = path + '/MEG/sample/sample_audvis-ave.fif'
-
-# load evoked and subtract baseline
-condition = 'Left Auditory'
-evoked = read_evokeds(fname, condition=condition, baseline=(None, 0))
-
-evoked.plot()
-
-###############################################################################
-# Or plot manually after extracting peak latency
-
-evoked = evoked.pick_types(meg=False, eeg=True)
-times = 1e3 * evoked.times  # time in miliseconds
-
-ch_max_name, latency = evoked.get_peak(mode='neg')
-
-plt.figure()
-plt.plot(times, 1e6 * evoked.data.T, 'k-')
-plt.xlim([times[0], times[-1]])
-plt.xlabel('time (ms)')
-plt.ylabel('Potential (uV)')
-plt.title('EEG evoked potential')
-
-plt.axvline(latency * 1e3, color='red',
-            label=ch_max_name, linewidth=2,
-            linestyle='--')
-plt.legend(loc='best')
-
-plt.show()
diff --git a/mne/connectivity/spectral.py b/mne/connectivity/spectral.py
index a1bc27bce..5c0c7cbd5 100644
--- a/mne/connectivity/spectral.py
+++ b/mne/connectivity/spectral.py
@@ -539,8 +539,8 @@ def spectral_connectivity(data, method='coh', indices=None, sfreq=2 * np.pi,
     to compute the connectivity between the signal with index 0 and signals
     "2, 3, 4" (a total of 3 connections) one can use the following::
 
-        indices = (np.array([0, 0, 0]),    # row indices
-                   np.array([2, 3, 4]))    # col indices
+        indices = (np.array([0, 0, 0],    # row indices
+                   np.array([2, 3, 4])))  # col indices
 
         con_flat = spectral_connectivity(data, method='coh',
                                          indices=indices, ...)
diff --git a/mne/datasets/utils.py b/mne/datasets/utils.py
index e7745e3e7..be6f5fb0d 100644
--- a/mne/datasets/utils.py
+++ b/mne/datasets/utils.py
@@ -120,7 +120,7 @@ def _data_path(path=None, force_update=False, update_path=True, download=True,
         archive_name = "MNE-sample-data-processed.tar.gz"
         folder_name = "MNE-sample-data"
         url = "ftp://surfer.nmr.mgh.harvard.edu/pub/data/MNE/" + archive_name
-        hash_ = 'f73186795af820428e5e8e779ce5bfcf'
+        hash_ = '1bb9f993bfba2057e0039c306a717109'
     elif name == 'spm':
         archive_name = 'MNE-spm-face.tar.bz2'
         folder_name = "MNE-spm-face"
diff --git a/mne/decoding/time_gen.py b/mne/decoding/time_gen.py
index 9332ae63a..c6598c8b6 100644
--- a/mne/decoding/time_gen.py
+++ b/mne/decoding/time_gen.py
@@ -119,12 +119,8 @@ class GeneralizationAcrossTime(object):
         The categories used for training.
     estimators_ : list of list of sklearn.base.BaseEstimator subclasses.
         The estimators for each time point and each fold.
-    y_pred_ : list of lists of arrays of floats,
-              shape (n_train_times, n_test_times, n_epochs, n_prediction_dims)
-        The single-trial predictions estimated by self.predict() at each
-        training time and each testing time. Note that the number of testing
-        times per training time need not be regular, else
-        np.shape(y_pred_) = [n_train_time, n_test_time, n_epochs].
+    y_pred_ : np.ndarray, shape (n_train_times, n_test_times, n_epochs, n_prediction_dims)
+        Class labels for samples in X.
     scores_ : list of lists of float
         The scores estimated by self.scorer_ at each training time and each
         testing time (e.g. mean accuracy of self.predict(X)). Note that the
@@ -307,12 +303,9 @@ class GeneralizationAcrossTime(object):
 
         Returns
         -------
-        y_pred : list of lists of arrays of floats,
-                 shape (n_train_t, n_test_t, n_epochs, n_prediction_dims)
-            The single-trial predictions at each training time and each testing
-            time. Note that the number of testing times per training time need
-            not be regular;
-            else, np.shape(y_pred_) = [n_train_time, n_test_time, n_epochs].
+        y_pred_ : np.ndarray, shape (n_train_time, n_test_time, n_epochs,
+                               n_prediction_dim)
+            Class labels for samples in X.
         """
 
         # clean in case gat.predict() is called at unexpected moments
@@ -365,10 +358,12 @@ class GeneralizationAcrossTime(object):
         parallel, p_time_gen, _ = parallel_func(_predict_time_loop, n_jobs)
 
         # Loop across estimators (i.e. training times)
-        self.y_pred_ = parallel(p_time_gen(X, self.estimators_[t_train], cv,
-                                slices, self.predict_mode)
-                                for t_train, slices in
-                                enumerate(test_times_['slices']))
+        packed = parallel(p_time_gen(X, self.estimators_[t_train], cv,
+                          slices, self.predict_mode)
+                          for t_train, slices in
+                          enumerate(test_times_['slices']))
+
+        self.y_pred_ = np.transpose(tuple(zip(*packed)), (1, 0, 2, 3))
         return self.y_pred_
 
     def score(self, epochs=None, y=None, scorer=None, test_times=None):
@@ -463,7 +458,7 @@ class GeneralizationAcrossTime(object):
         self.y_true_ = y  # true regressor to be compared with y_pred
 
         # Preprocessing for parallelization:
-        n_jobs = min(len(self.y_pred_[0][0]), check_n_jobs(self.n_jobs))
+        n_jobs = min(self.y_pred_.shape[2], check_n_jobs(self.n_jobs))
         parallel, p_time_gen, n_jobs = parallel_func(_score_loop, n_jobs)
 
         # Score each training and testing time point
diff --git a/mne/forward/forward.py b/mne/forward/forward.py
index c41a70fce..abacd7091 100644
--- a/mne/forward/forward.py
+++ b/mne/forward/forward.py
@@ -1226,6 +1226,7 @@ def apply_forward_raw(fwd, stc, raw_template, start=None, stop=None,
     raw.info = _fill_measurement_info(raw.info, fwd, sfreq)
     raw.info['projs'] = []
     raw._projector = None
+    raw._update_times()
     return raw
 
 
diff --git a/mne/io/base.py b/mne/io/base.py
index 578109de7..a2ab5b8b1 100644
--- a/mne/io/base.py
+++ b/mne/io/base.py
@@ -233,7 +233,7 @@ class _BaseRaw(ProjMixin, ContainsMixin, PickDropChannelsMixin,
                                    'not %s' % preload.dtype)
             self._data = preload
             self.preload = True
-            self._last_samps = np.array([self._data.shape[1] - 1])
+            last_samps = [self._data.shape[1] - 1]
             load_from_disk = False
         else:
             if last_samps is None:
@@ -246,7 +246,8 @@ class _BaseRaw(ProjMixin, ContainsMixin, PickDropChannelsMixin,
                 raise ValueError('bad preload: %s' % preload)
             else:
                 load_from_disk = True
-            self._last_samps = np.array(last_samps)
+        self._last_samps = np.array(last_samps)
+        self._first_samps = np.array(first_samps)
         self.info = info
         cals = np.empty(info['nchan'])
         for k in range(info['nchan']):
@@ -257,13 +258,13 @@ class _BaseRaw(ProjMixin, ContainsMixin, PickDropChannelsMixin,
         self.comp = comp
         self._orig_comp_grade = orig_comp_grade
         self._filenames = list(filenames)
-        self._first_samps = np.array(first_samps)
         self.orig_format = orig_format
         self._projectors = list()
         self._projector = None
         # If we have True or a string, actually do the preloading
         if load_from_disk:
             self._preload_data(preload)
+        self._update_times()
 
     def _read_segment(start, stop, sel, data_buffer, projector, verbose):
         """Read a chunk of raw data
@@ -321,6 +322,12 @@ class _BaseRaw(ProjMixin, ContainsMixin, PickDropChannelsMixin,
         self.preload = True
         self.close()
 
+    def _update_times(self):
+        """Helper to update times"""
+        self._times = np.arange(self.n_times) / float(self.info['sfreq'])
+        # make it immutable
+        self._times.flags.writeable = False
+
     @property
     def first_samp(self):
         return self._first_samps[0]
@@ -868,6 +875,7 @@ class _BaseRaw(ProjMixin, ContainsMixin, PickDropChannelsMixin,
         # adjust affected variables
         self._data = np.concatenate(new_data, axis=1)
         self.info['sfreq'] = sfreq
+        self._update_times()
 
     def crop(self, tmin=0.0, tmax=None, copy=True):
         """Crop raw data file.
@@ -922,6 +930,7 @@ class _BaseRaw(ProjMixin, ContainsMixin, PickDropChannelsMixin,
         if raw.preload:
             # slice and copy to avoid the reference to large array
             raw._data = raw._data[:, smin:smax + 1].copy()
+        raw._update_times()
         return raw
 
     @verbose
@@ -1355,7 +1364,7 @@ class _BaseRaw(ProjMixin, ContainsMixin, PickDropChannelsMixin,
     @property
     def times(self):
         """Time points"""
-        return np.arange(self.n_times) / float(self.info['sfreq'])
+        return self._times
 
     @property
     def n_times(self):
@@ -1477,6 +1486,7 @@ class _BaseRaw(ProjMixin, ContainsMixin, PickDropChannelsMixin,
             self._last_samps = np.r_[self._last_samps, r._last_samps]
             self._rawdirs += r._rawdirs
             self._filenames += r._filenames
+        self._update_times()
 
     def close(self):
         """Clean up the object.
diff --git a/mne/io/kit/kit.py b/mne/io/kit/kit.py
index 447715681..8de71ac9a 100644
--- a/mne/io/kit/kit.py
+++ b/mne/io/kit/kit.py
@@ -114,8 +114,7 @@ class RawKIT(_BaseRaw):
     def __repr__(self):
         s = ('%r' % op.basename(self._kit_info['fname']),
              "n_channels x n_times : %s x %s" % (len(self.info['ch_names']),
-                                                 self.last_samp + 1 -
-                                                 self.first_samp))
+                                                 self._kit_info['n_samples']))
         return "<RawKIT  |  %s>" % ', '.join(s)
 
     def read_stim_ch(self, buffer_size=1e5):
@@ -495,7 +494,7 @@ def _set_dig_kit(mrk, elp, hsp, auto_decimate=True):
         hsp = _read_dig_points(hsp)
     n_pts = len(hsp)
     if n_pts > KIT.DIG_POINTS:
-        hsp = _decimate_points(hsp, res=5)
+        hsp = _decimate_points(hsp, decim=5)
         n_new = len(hsp)
         msg = ("The selected head shape contained {n_in} points, which is "
                "more than recommended ({n_rec}), and was automatically "
@@ -550,8 +549,6 @@ def get_kit_info(rawfile):
 
     Returns
     -------
-    info : instance of Info
-        An Info for the instance.
     sqd : dict
         A dict containing all the sqd parameter settings.
     """
@@ -679,7 +676,7 @@ def get_kit_info(rawfile):
         info['sfreq'] = float(sqd['sfreq'])
         info['bads'] = []
         info['acq_pars'], info['acq_stim'] = None, None
-        info['filename'] = rawfile
+        info['filename'] = None
         info['ctf_head_t'] = None
         info['dev_ctf_t'] = []
         info['nchan'] = sqd['nchan']
diff --git a/mne/preprocessing/ica.py b/mne/preprocessing/ica.py
index c7ba1ef94..1db0a2678 100644
--- a/mne/preprocessing/ica.py
+++ b/mne/preprocessing/ica.py
@@ -666,6 +666,7 @@ class ICA(ContainsMixin):
 
         out._projector = None
         self._export_info(out.info, raw, add_channels)
+        out._update_times()
 
         return out
 

Epoch-ing too slow when #events is large..
So I have several ABR dataset where I have about 8000 trials.  Epoching is way too slow and I suspect that the issue is related to not pre-allocating memory in ```_get_data_from_disk``` and growing the ```_data``` array one epoch at a time. When I don't do ```preload=True```,  when I eventually have to average, ```epochs.average()``` is too slow. 

Am I missing something or is there room to speed things up?
diff --git a/mne/decoding/tests/test_time_gen.py b/mne/decoding/tests/test_time_gen.py
index c1a2328a5..16ef8c904 100644
--- a/mne/decoding/tests/test_time_gen.py
+++ b/mne/decoding/tests/test_time_gen.py
@@ -124,7 +124,7 @@ def test_generalization_across_time():
     # --- number of trials
     assert_true(gat.y_train_.shape[0] ==
                 gat.y_true_.shape[0] ==
-                len(gat.y_pred_[0][0]) == 14)
+                gat.y_pred_.shape[2] == 14)
     # ---  number of folds
     assert_true(np.shape(gat.estimators_)[1] == gat.cv)
     # ---  length training size
diff --git a/mne/realtime/tests/test_mockclient.py b/mne/realtime/tests/test_mockclient.py
index 631ca003e..a16217f45 100644
--- a/mne/realtime/tests/test_mockclient.py
+++ b/mne/realtime/tests/test_mockclient.py
@@ -86,6 +86,7 @@ def test_find_events():
     raw._data[stim_channel_idx, 520:530] = 6
     raw._data[stim_channel_idx, 530:532] = 5
     raw._data[stim_channel_idx, 540] = 6
+    raw._update_times()
 
     # consecutive=False
     find_events = dict(consecutive=False)
diff --git a/mne/tests/test_event.py b/mne/tests/test_event.py
index 2cde41291..8bffa5e7a 100644
--- a/mne/tests/test_event.py
+++ b/mne/tests/test_event.py
@@ -150,6 +150,7 @@ def test_find_events():
     # Reset some data for ease of comparison
     raw._first_samps[0] = 0
     raw.info['sfreq'] = 1000
+    raw._update_times()
 
     stim_channel = 'STI 014'
     stim_channel_idx = pick_channels(raw.info['ch_names'],

pip install -e .[dev]
parse_log_pytest
requirements.txt
numpy>=1.16.0 pandas>=1.0.0 scikit-learn h5py pysurfer nose nose-timer pytest
apt-get update apt-get install -y gcc
3.7
requirements/base.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
apptools==5.2.1
certifi @ file:///croot/certifi_1671487769961/work/certifi
configobj==5.0.9
cycler==0.11.0
envisage==7.0.3
exceptiongroup==1.2.2
fonttools==4.38.0
h5py==3.8.0
importlib-metadata==6.7.0
importlib-resources==5.12.0
iniconfig==2.0.0
joblib==1.3.2
kiwisolver==1.4.5
matplotlib==3.5.3
mayavi==4.8.1
-e git+https://github.com/mne-tools/mne-python.git@edceb8f38349d6dc0cade1c9f8384cc0707ce3e8#egg=mne
nibabel==4.0.2
nose==1.3.7
nose-timer==1.0.1
numpy==1.21.6
packaging==24.0
pandas==1.3.5
Pillow==9.5.0
pluggy==1.2.0
pyface==8.0.0
Pygments==2.17.2
pyparsing==3.1.4
pysurfer==0.11.2
pytest==7.4.4
python-dateutil==2.9.0.post0
pytz==2025.2
scikit-learn==1.0.2
scipy==1.7.3
six==1.17.0
threadpoolctl==3.1.0
tomli==2.0.1
traits==6.4.3
traitsui==8.0.0
typing_extensions==4.7.1
vtk==9.3.1
zipp==3.15.0

name: mne-python
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2022.12.7=py37h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=22.3.1=py37h06a4308_0
  - python=3.7.16=h7a1cb2a_0
  - readline=8.2=h5eee18b_0
  - setuptools=65.6.3=py37h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.38.4=py37h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - apptools==5.2.1
      - configobj==5.0.9
      - cycler==0.11.0
      - envisage==7.0.3
      - exceptiongroup==1.2.2
      - fonttools==4.38.0
      - h5py==3.8.0
      - importlib-metadata==6.7.0
      - importlib-resources==5.12.0
      - iniconfig==2.0.0
      - joblib==1.3.2
      - kiwisolver==1.4.5
      - matplotlib==3.5.3
      - mayavi==4.8.1
      - nibabel==4.0.2
      - nose==1.3.7
      - nose-timer==1.0.1
      - numpy==1.21.6
      - packaging==24.0
      - pandas==1.3.5
      - pillow==9.5.0
      - pluggy==1.2.0
      - pyface==8.0.0
      - pygments==2.17.2
      - pyparsing==3.1.4
      - pysurfer==0.11.2
      - pytest==7.4.4
      - python-dateutil==2.9.0.post0
      - pytz==2025.2
      - scikit-learn==1.0.2
      - scipy==1.7.3
      - six==1.17.0
      - threadpoolctl==3.1.0
      - tomli==2.0.1
      - traits==6.4.3
      - traitsui==8.0.0
      - typing-extensions==4.7.1
      - vtk==9.3.1
      - zipp==3.15.0
prefix: /opt/conda/envs/mne-python

mne/tests/test_event.py::test_find_events
mne/decoding/tests/test_time_gen.py::test_time_generalization mne/decoding/tests/test_time_gen.py::test_generalization_across_time mne/realtime/tests/test_mockclient.py::test_find_events mne/tests/test_event.py::test_io_events
mne/realtime/tests/test_mockclient.py::test_mockclient mne/realtime/tests/test_mockclient.py::test_get_event_data mne/tests/test_event.py::test_add_events mne/tests/test_event.py::test_merge_events mne/tests/test_event.py::test_pick_events mne/tests/test_event.py::test_make_fixed_length_events mne/tests/test_event.py::test_define_events
Makefile examples/visualization/plot_topo_customized.py mne/connectivity/spectral.py examples/visualization/plot_channel_epochs_image.py examples/visualization/plot_evoked_topomap_delayed_ssp.py examples/io/read_events.py examples/forward/plot_bem_contour_mri.py examples/io/plot_read_evoked.py mne/decoding/time_gen.py .gitignore examples/preprocessing/plot_interpolate_bad_channels.py examples/io/plot_read_epochs.py examples/forward/plot_coregistration_transform.py mne/forward/forward.py examples/forward/plot_read_bem_surfaces.py doc/source/_templates/layout.html examples/visualization/plot_evoked_delayed_ssp.py examples/visualization/plot_meg_eeg_fields_3d.py examples/preprocessing/plot_virtual_evoked.py examples/io/plot_epochs_to_data_frame.py examples/simulation/plot_simulate_evoked_data.py examples/visualization/plot_topography.py examples/visualization/README.txt examples/preprocessing/plot_rereference_eeg.py examples/forward/plot_make_forward.py examples/visualization/plot_ssp_projs_sensitivity_map.py examples/plot_from_raw_to_epochs_to_evoked.py examples/io/plot_read_and_write_raw_data.py examples/preprocessing/plot_define_target_events.py examples/forward/plot_read_forward.py mne/datasets/utils.py examples/preprocessing/plot_shift_evoked.py examples/io/README.txt examples/forward/README.txt examples/visualization/plot_ssp_projs_topomaps.py examples/visualization/plot_topo_channel_epochs_image.py examples/forward/plot_decimate_head_surface.py mne/preprocessing/ica.py examples/io/plot_objects_from_arrays.py mne/io/kit/kit.py examples/visualization/plot_clickable_image.py examples/preprocessing/plot_estimate_covariance_matrix_baseline.py examples/plot_compute_mne_inverse.py examples/README.txt examples/plot_from_raw_to_multiple_epochs_to_evoked.py examples/visualization/plot_evoked_whitening.py doc/source/_static/navy.css examples/visualization/plot_evoked_erf_erp.py examples/visualization/plot_evoked_topomap.py examples/io/plot_read_noise_covariance_matrix.py examples/visualization/plot_topo_compare_conditions.py mne/io/base.py examples/preprocessing/plot_estimate_covariance_matrix_raw.py examples/plot_extract_events_from_raw.py examples/simulation/README.txt examples/connectivity/plot_mne_inverse_coherence_epochs.py examples/forward/plot_left_cerebellum_volume_source.py
examples/plot_evoked_topomap_delayed_ssp.py Makefile examples/plot_read_forward.py examples/plot_shift_evoked.py examples/plot_virtual_evoked.py mne/connectivity/spectral.py examples/plot_meg_eeg_fields_3d.py mne/decoding/time_gen.py .gitignore examples/plot_evoked_delayed_ssp.py examples/plot_estimate_covariance_matrix_raw.py examples/plot_decimate_head_surface.py examples/plot_coregistration_transform.py examples/plot_evoked_whitening.py examples/plot_read_evoked.py examples/plot_topography.py mne/forward/forward.py examples/plot_bem_contour_mri.py doc/source/_templates/layout.html examples/plot_clickable_image.py examples/plot_rereference_eeg.py examples/plot_topo_customized.py examples/plot_read_and_write_raw_data.py examples/visualization/README.txt examples/plot_simulate_evoked_data.py examples/read_events.py examples/plot_read_noise_covariance_matrix.py examples/plot_from_raw_to_epochs_to_evoked.py mne/datasets/utils.py examples/plot_define_target_events.py examples/plot_left_cerebellum_volume_source.py examples/io/README.txt examples/forward/README.txt examples/plot_make_forward.py examples/plot_read_bem_surfaces.py examples/plot_epochs_to_data_frame.py mne/preprocessing/ica.py mne/io/kit/kit.py examples/plot_interpolate_bad_channels.py examples/plot_channel_epochs_image.py examples/inverse/plot_compute_mne_inverse.py examples/README.txt examples/plot_topo_channel_epochs_image.py examples/plot_from_raw_to_multiple_epochs_to_evoked.py examples/plot_ssp_projs_sensitivity_map.py doc/source/_static/navy.css examples/plot_evoked_topomap.py examples/visualization/plot_evoked_erf_erp.py examples/plot_ssp_projs_topomaps.py examples/plot_objects_from_arrays.py examples/plot_read_epochs.py mne/io/base.py examples/plot_topo_compare_conditions.py examples/plot_extract_events_from_raw.py examples/simulation/README.txt examples/connectivity/plot_mne_inverse_coherence_epochs.py examples/plot_estimate_covariance_matrix_baseline.py