cogpy.io.xml_anat_map

Anatomical channel remapping from OpenEphys XML metadata.

Note

Lab-internal module. Assumes the OpenEphys XML anatomy layout used in the Bhatt Lab. Not part of the stable public API.

Functions

create_empty_anat_map(width, height)

detect_order(arr)

Detects the ordering of a 2D square array.

read_anat_map(xml_dict)

columnwise

remap_array(arr, anat_map, gridshape)

Remaps an array to a specified grid shape based on an anatomical map.

reshape_dataarray_to_grid(data_array, metadata)

Reshapes and transposes a DataArray to grid format based on provided metadata.

test_detect_order()

Tests the detect_order function.

update_anat_map(bad_channels, anat_map)

saves the bad channels in the skip field of the anat_map dataframe.

write_anat_map(anat_map, xml_dict[, grid_shape])