Skip to content

Conversation

@jona-sassenhagen
Copy link
Contributor

Have plot_evoked_topo use plot_compare_evokeds.

Benefits: looks nicer, CIs, code reuse, API consistency.

preemptively tagging @sappelhoff @mmagnuski @cbrnr @choldgraf ...

closes #4746

type_name = ', '.join(cls.__name__ for cls in iter_types)
if not isinstance(item, types):
raise TypeError(item_name, ' must be an instance of ', type_name,
raise TypeError(item_name + ' must be an instance of ' + type_name +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this change? and either way once we release we would be able to start using fstrings.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it printed weird before.

Don't see how an fstring would be better here. You could already do it with string interpolation right? this is very transparent.

Copy link
Contributor Author

@jona-sassenhagen jona-sassenhagen Nov 16, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also @larsoner fixed the very same bug in your recent PR anyways :) via string interpolation



def _plot_evoked_topo(evoked, layout=None, layout_scale=0.945, color=None,
def _handle_grads_for_topos(evokeds, noise_cov=None, scalings=None,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we come up with a better name than handle?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honest, I'm not sure how to call what it's doing. (Note I didn't write that code, only moved it.)

@jona-sassenhagen
Copy link
Contributor Author

Ok the current implementation is bad. Will hopefully solve it better with @drammock :)

@jona-sassenhagen
Copy link
Contributor Author

Thanks for looking over it though @massich

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move evoked topo plot to plot_compare_evokeds

3 participants