frites.conn.conn_ravel_directed#

frites.conn.conn_ravel_directed(da, sep='-', drop_within=False)[source]#

Ravel a directed array.

This function reorganize a directed array that contains the coordinates x->y and y->x to a single coordinate ‘x->y’.

Parameters
daxarray.DataArray

Xarray DataArray that should at least contains the dimensions ‘roi’ and ‘direction’. The dimension ‘direction’ should also contains the coordinates ‘x->y’ and ‘y->x’

seppython:str | ‘-’

Separator used to separate the pairs of roi names.

drop_withinbool | python:False

Drop within node connections

Returns
da_rxarray.DataArray

Raveled array of directed connectivity