forcelocs#

forcelocs(chanlocs, *locations)#

Rotate an electrode montage to force named channels to X/Y positions.

Each location specification is (value, axis, label, ...). The mean coordinate of the named electrodes is rotated with the corresponding Z coordinate on the unit sphere. Specifications are applied in order.

Parameters:
  • chanlocs (Any) – EEGLAB channel-location dictionaries with X/Y/Z coordinates.

  • *locations (Any) – One or more (value, "x"|"y", channel labels...) specs.

Returns:

A deep-copied montage with all coordinate representations refreshed.

Return type:

Any