braindecode.util.resolve_montage_name#

braindecode.util.resolve_montage_name(name)[source]#

Resolve an MNE standard montage name for the installed MNE version.

MNE 1.13 renamed the standard_1005 and standard_1020 montages to colin27_1005 and colin27_1020 and deprecated the legacy names, which will raise in MNE 1.14 [1]. As braindecode supports mne>=1.11, this helper returns the spelling understood by the installed MNE version, so that neither a FutureWarning (MNE >= 1.13) nor a ValueError (MNE < 1.13, new names unknown) can occur.

Parameters:

name (str) – Name of a standard montage, in either the legacy or the current spelling.

Returns:

name itself, unless it is one of the renamed montages and the installed MNE knows the new spelling, in which case the new spelling is returned.

Return type:

str

References