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
- da
xarray.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’
- sep
python:str
| ‘-’ Separator used to separate the pairs of roi names.
- drop_withinbool |
python:False
Drop within node connections
- da
- Returns
- da_r
xarray.DataArray
Raveled array of directed connectivity
- da_r