Skip to content

Support specifying start and stop time points for averaging in evoked.plot_topomap() #12857

@cbrnr

Description

@cbrnr

The API for evoked.plot_topomap() is rather specific in that the times argument only accepts one or more time points, which are used to create the topomap(s). However, a common (the most common?) approach for analyzing ERP data is to use the mean amplitude within a given time window.

For example, if I wanted to plot the average amplitude from 185ms to 240ms, it would be ideal to directly specify this time range when creating the topomap. Currently, the API requires manually finding the midpoint (185 + (240 - 185) / 2 = 212.5) and passing it to times, and then passing the width (240 - 185 = 55) separately via the average argument, which feels a bit cumbersome.

Unfortunately, I don't have a good idea how to incorporate this use case into the current API (especially because times can already be an array of time points, but these do not specify time windows). I'd be interested in what you think about improving support for computing averages within time windows – or maybe this is already possible and I'm just missing something? Also, this issue might apply to more ERP-related functions, but this was the first one I found.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions