Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
e01d041
WIP: refactor plot_epochs_image
drammock May 18, 2019
5f1644c
two tiny docstring fixes
drammock Jun 6, 2019
6a08e66
do RMS combining of grads
drammock Jun 6, 2019
4432dab
warn if trying to combine across single channel
drammock Jun 7, 2019
f510960
remove unused import
drammock Jun 7, 2019
b13097e
docstring improvements
drammock Jun 7, 2019
4a8d0b5
WIP refactor combining grad pairs
drammock Jun 9, 2019
117d3f7
fix circle: docstring
drammock Jun 9, 2019
641469a
no need to combine grad pairs
drammock Jun 10, 2019
ffc5a4f
debugging and cleanup
drammock Jun 10, 2019
6b49c93
remove cruft
drammock Jun 10, 2019
16a18f7
fix lgtm: unused variable
drammock Jun 11, 2019
dcb1503
doc: better docstring for "order"
drammock Jun 11, 2019
0b20337
fix: apply "order" to image data, not to epochs
drammock Jun 11, 2019
63c292f
fix: nest scipy import
drammock Jun 11, 2019
a2345ca
fix: don't overwrite title
drammock Jun 11, 2019
b287f5f
better error messages
drammock Jun 11, 2019
d9320dc
fix axes dict keys when evoked=False
drammock Jun 11, 2019
c3cee3a
fix name collision
drammock Jun 11, 2019
92402fb
remove cruft
drammock Jun 11, 2019
adaf7b3
overhaul tests
drammock Jun 11, 2019
76e4e3b
sty: don't use dict() as default param value
drammock Jun 12, 2019
b934e9c
whitespace
drammock Jun 12, 2019
8019540
fix: pick cmap based on combined vals, not raw data vals
drammock Jun 12, 2019
70a49ae
doc: better comments
drammock Jun 12, 2019
cb1fd8c
STY: clearer variable name
drammock Jun 12, 2019
dbde4f5
fix: restore unique titles if multiple figures
drammock Jun 12, 2019
b7cef36
add "combine" to docdict
drammock Jun 12, 2019
fd41831
move _make_combine_callable to utils
drammock Jun 12, 2019
580e3b4
fix nested import; disable gfp
drammock Jun 12, 2019
d358724
STY: cleanup
drammock Jun 13, 2019
ee5ca83
finish overhaul
drammock Jun 18, 2019
5e8a257
remove cruft
drammock Jun 18, 2019
4bc3e69
update contributors list
drammock Jun 19, 2019
206b1ba
fix: don't nest lists when >1 figs returned
drammock Jun 19, 2019
ec9f7b7
fix: make truncate_xaxis=False actually work
drammock Jun 20, 2019
ce5c2f9
better style handling
drammock Jun 20, 2019
bd278f2
bugfixes
drammock Jun 20, 2019
0aa229c
better comments/warnings
drammock Jun 20, 2019
4182e80
overhaul plot_compare_evokeds test
drammock Jun 20, 2019
1535d96
doc, fix: don't remove gfp from docstring; other docstring cleanup
drammock Jun 21, 2019
0fb7647
test: get test_plot_compare_evokeds to pass
drammock Jun 22, 2019
cf3cac2
fix: misc fixes
drammock Jun 22, 2019
3ff825d
fix Travis (docstring_length_ignores)
drammock Jun 22, 2019
391f507
fix: copy color dict before modifying; fix split legend
drammock Jun 27, 2019
2bf1a2f
fix: variable name collision; unnecessary indent; don't plot CI unnec…
drammock Jun 28, 2019
703b533
fix: avoid modifying dict outside function scope; decide to plot CI o…
drammock Jun 28, 2019
41af49e
fix: really allow CI on/off per condition
drammock Jun 28, 2019
9b71930
fix confidence bands; don't try to plot ref_meg (CTF test)
drammock Jun 28, 2019
63b0777
add coverage TODOs
drammock Jun 28, 2019
857ab2b
more consistent helper func name
drammock Jun 28, 2019
43b3924
sty: make test easier to follow
drammock Jun 28, 2019
3fbe174
refactor axis handling; various cleanups
drammock Jul 2, 2019
6cb4840
fix CI: pydocstyle
drammock Jul 2, 2019
ed6a94c
fix CI: allow misc channels (ICA)
drammock Jul 2, 2019
c82d63f
fix docstring
drammock Jul 2, 2019
3ccef5b
fix: integration with epochs.plot() right-clicking
drammock Jul 2, 2019
d93814a
fix: method params
drammock Jul 2, 2019
359d579
fix: docstrings
drammock Jul 2, 2019
7d02603
fix: close figs during testing
drammock Jul 3, 2019
6fa882c
fix epochs.plot_image tests
drammock Jul 3, 2019
6f55624
API: show_legend -> legend
drammock Jul 5, 2019
ee6ede0
fix deprecation in docstring
drammock Jul 5, 2019
56e8899
minor cleanup
drammock Jul 5, 2019
fe090e1
fix: make tag-specified colors work with colorbar
drammock Jul 5, 2019
d41eacb
enh: shrink colorbar for discrete colors
drammock Jul 5, 2019
a367150
docstring improvements [skip travis][skip azp]
drammock Jul 6, 2019
f3bcff2
enable invert_y in plot_epochs_image
drammock Jul 6, 2019
d0e35b2
avoid changing dict outside function scope
drammock Jul 6, 2019
3fb04e2
clarify logic
drammock Jul 6, 2019
4dcfdf8
remove cruft
drammock Jul 6, 2019
9fdf68f
fix test now that invert_y works
drammock Jul 6, 2019
27b1674
address Jona's comments
drammock Jul 9, 2019
dc158d6
remove cruft
drammock Jul 9, 2019
501c64f
fix: fix CIs, fix comment
drammock Jul 9, 2019
5c64f99
restore eric's MPL fix that I force-pushed into oblivion
drammock Jul 10, 2019
0d42b84
fix: add forgotten deprecation; update whats_new
drammock Jul 10, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions doc/whats_new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,22 @@ Bug
API
~~~

- New parameter ``clear`` in :func:`mne.viz.plot_epochs_image` for clearing pre-existing axes before plotting into them by `Daniel McCloy`_

- :func:`mne.viz.plot_epochs_image` no longer supports ``group_by='type'`` — combining by channel type is now the default when ``picks`` is a channel type string; to get individual plots for each channel, pass ``picks`` as a list of channel names or indices by `Daniel McCloy`_

- New parameter ``combine`` in :func:`mne.viz.plot_compare_evokeds` for specifying method to combine information across channels by `Daniel McCloy`_

- The ``gfp`` parameter of :func:`mne.viz.plot_compare_evokeds` is deprecated; use ``combine='gfp'`` instead by `Daniel McCloy`_

- The ``truncate_yaxis='max_ticks'`` parameter of :func:`mne.viz.plot_compare_evokeds` is deprecated; use ``truncate_yaxis='auto'`` instead by `Daniel McCloy`_

- The ``truncate_xaxis`` and ``truncate_yaxis`` parameters of :func:`mne.viz.plot_compare_evokeds` now perform one-sided truncation unless both are ``True`` by `Daniel McCloy`_

- The ``show_legend`` parameter of :func:`mne.viz.plot_compare_evokeds` is renamed to ``legend`` by `Daniel McCloy`_

- :func:`mne.viz.plot_compare_evokeds` always returns a list of figures even when a single figure is generated by `Daniel McCloy`_

- Deprecate ``average=True`` and ``spatial_colors=False`` for :func:`mne.Epochs.plot_psd` by `Jeff Hanna`_

- :func:`mne.io.read_raw_brainvision` no longer raises an error when there are inconsistencies between ``info['chs']`` and ``montage`` but warns instead by `Joan Massich`_
Expand Down
2 changes: 1 addition & 1 deletion mne/channels/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ def _merge_grad_data(data, method='rms'):
elif method == 'rms':
data = np.sqrt(np.sum(data ** 2, axis=1) / 2)
else:
raise ValueError('method must be "rms" or "mean, got %s.' % method)
raise ValueError('method must be "rms" or "mean", got %s.' % method)
return data.reshape(data.shape[:1] + orig_shape[1:])


Expand Down
4 changes: 2 additions & 2 deletions mne/epochs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1065,14 +1065,14 @@ def plot_image(self, picks=None, sigma=0., vmin=None, vmax=None,
colorbar=True, order=None, show=True, units=None,
scalings=None, cmap=None, fig=None, axes=None,
overlay_times=None, combine=None, group_by=None,
evoked=True, ts_args=dict(), title=None):
evoked=True, ts_args=None, title=None, clear=False):
return plot_epochs_image(self, picks=picks, sigma=sigma, vmin=vmin,
vmax=vmax, colorbar=colorbar, order=order,
show=show, units=units, scalings=scalings,
cmap=cmap, fig=fig, axes=axes,
overlay_times=overlay_times, combine=combine,
group_by=group_by, evoked=evoked,
ts_args=ts_args, title=title)
ts_args=ts_args, title=title, clear=clear)

@verbose
def drop(self, indices, reason='USER', verbose=None):
Expand Down
1 change: 0 additions & 1 deletion mne/tests/test_docstring_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ def get_name(func, cls=None):
]
char_limit = 800 # XX eventually we should probably get this lower
docstring_length_ignores = [
'mne.viz.evoked.plot_compare_evokeds::cmap',
'mne.filter.construct_iir_filter::iir_params',
]
tab_ignores = [
Expand Down
8 changes: 8 additions & 0 deletions mne/utils/docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,14 @@
``None``.
"""

# Visualization
docdict['combine'] = """
combine : None | str | callable
How to combine information across channels. If a :class:`str`, must be
Comment thread
drammock marked this conversation as resolved.
one of 'mean', 'median', 'std' (standard deviation) or 'gfp' (global
field power).
"""

# PSD plotting
docdict["plot_psd_doc"] = """
Plot the power spectral density across channels.
Expand Down
821 changes: 408 additions & 413 deletions mne/viz/epochs.py

Large diffs are not rendered by default.

Loading