meanap.pipeline.channel_layout

Electrode channel-ID -> spatial coordinate lookup, port of getCoordsFromLayout.m.

MEA-NAP doesn’t compute coordinates from the recording itself — they come from a fixed lookup table keyed by Params.channelLayout (the MEA hardware type, e.g. 'Axion64' or 'MCS60'). Needed for any spatial network plot.

Functions

get_coords_from_layout(channel_layout)

Returns (channels, coords) for a known MEA channel layout name.

meanap.pipeline.channel_layout.get_coords_from_layout(channel_layout)[source]

Returns (channels, coords) for a known MEA channel layout name.

coords is (len(channels), 2), scaled to roughly [0, 8] (matches MATLAB’s final coords = coords * 8). Callers should look up coordinates by channel ID (dict(zip(channels, coords))) rather than relying on array order/length matching a recording’s own channel list — MCS layouts drop grounded corner electrodes, so their returned channels is shorter than a full-grid recording’s channel array.

Parameters:

channel_layout (str)

Return type:

tuple[ndarray, ndarray]