Skip to content

Commit

Permalink
Another attempt to fix circle.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaeilepp authored and larsoner committed Dec 20, 2016
1 parent b4cb41d commit f0d78dd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
5 changes: 2 additions & 3 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ dependencies:
else
echo "Conda already set up.";
fi
- conda install -n circleenv --yes numpy scipy scikit-learn matplotlib sphinx=1.4.1 pillow six IPython pandas;
- conda install -n circleenv --yes traits=4.6.0 traitsui=5.1.0;
- conda install -n circleenv --yes mayavi;
- conda install -n circleenv --yes numpy scipy scikit-learn matplotlib sphinx=1.4.1 pillow six IPython pandas apptools=4.4.0 envisage=4.5.1 pyface=5.1.0 traits=4.6.0 traitsui=5.1.0 vtk=5.10.1;
- pip install mayavi==4.4.4;
- ls -al /home/ubuntu/miniconda;
- ls -al /home/ubuntu/miniconda/bin;
- echo $PATH;
Expand Down
8 changes: 4 additions & 4 deletions examples/connectivity/plot_mne_inverse_coherence_epochs.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,20 @@
event_id, tmin, tmax = 1, -0.2, 0.5
method = "dSPM" # use dSPM method (could also be MNE or sLORETA)

# Load data
# Load data.
inverse_operator = read_inverse_operator(fname_inv)
label_lh = mne.read_label(fname_label_lh)
raw = mne.io.read_raw_fif(fname_raw)
events = mne.read_events(fname_event)

# Add a bad channel
# Add a bad channel.
raw.info['bads'] += ['MEG 2443']

# pick MEG channels
# pick MEG channels.
picks = mne.pick_types(raw.info, meg=True, eeg=False, stim=False, eog=True,
exclude='bads')

# Read epochs
# Read epochs.
epochs = mne.Epochs(raw, events, event_id, tmin, tmax, picks=picks,
baseline=(None, 0),
reject=dict(mag=4e-12, grad=4000e-13, eog=150e-6))
Expand Down
4 changes: 4 additions & 0 deletions mne/viz/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ def plot_cov(cov, info, exclude=[], colorbar=True, proj=False, show_svd=True,

fig_cov, axes = plt.subplots(1, len(idx_names),
figsize=(2.5 * len(idx_names), 2.7))
if isinstance(axes, plt.Axes):
axes = [axes]
for k, (idx, name, _, _) in enumerate(idx_names):
axes[k].imshow(C[idx][:, idx], interpolation="nearest", cmap='RdBu_r')
axes[k].set(title=name)
Expand All @@ -119,6 +121,8 @@ def plot_cov(cov, info, exclude=[], colorbar=True, proj=False, show_svd=True,
fig_svd = None
if show_svd:
fig_svd, axes = plt.subplots(1, len(idx_names))
if isinstance(axes, plt.Axes):
axes = [axes]
for k, (idx, name, unit, scaling) in enumerate(idx_names):
s = linalg.svd(C[idx][:, idx], compute_uv=False)
# Protect against true zero singular values
Expand Down

0 comments on commit f0d78dd

Please sign in to comment.