mne.stats.erp.compute_area#

mne.stats.erp.compute_area(evoked, start=None, stop=None, picks='all', mode='abs', average=False)[source]#

Compute the area under the curve of an evoked response within a given time window.

Parameters:
evokedinstance of Evoked

The evoked response object.

start, stopfloat

Start and end time of the ERP computation window in seconds. Defaults to None and None, which corresponds to the entire Evoked object.

picksstr | array_like | slice | None

Channels to include. Slices and lists of integers will be interpreted as channel indices. In lists, channel type strings (e.g., ['meg', 'eeg']) will pick channels of those types, channel name strings (e.g., ['MEG0111', 'MEG2623'] will pick the given channels. Can also be the string values 'all' to pick all channels, or 'data' to pick data channels. None (default) will pick all channels. Bad channels are included by default. Note that channels in info['bads'] will be included if their names or indices are explicitly provided.

modestr

Specifies how the area should be computed. Can be one of:

'abs'

The absolute value of the data is used.

'neg'

Only negative values are considered.

'pos'

Only positive values are considered.

'intg'

The integral of the data is computed without rectification.

Defaults to 'abs'.

averagebool

If True, the area is computed by averaging the data across channels before integration. Defaults to False.

Returns:
area_dfpandas.DataFrame

A DataFrame with columns ‘channel’ and ‘area’ containing the area under the curve for each channel. If average=True, contains a single row whose ‘channel’ value is 'Average'.