visbrain.objects.ConnectObj.analyse_connections

ConnectObj.analyse_connections(roi_obj='talairach', group_by=None, get_centroids=False, replace_bad=True, bad_patterns=[-1, 'undefined', 'None'], distance=None, replace_with='Not found', keep_only=None)[source][source]

Analyse connections.

Parameters
roi_objstring/list | ‘talairach’

The ROI object to use. Use either ‘talairach’, ‘brodmann’ or ‘aal’ to use a predefined ROI template. Otherwise, use a RoiObj object or a list of RoiObj.

group_bystr | None

Name of the column inside the dataframe for gouping connectivity results.

replace_badbool | True

Replace bad values (True) or not (False).

bad_patternslist | [-1, ‘undefined’, ‘None’]

Bad patterns to replace if replace_bad is True.

replace_withstring | ‘Not found’

Replace bad patterns with this string.

keep_onlylist | None

List of string patterns to keep only sources that match.

Returns
dfpandas.DataFrames

A Pandas DataFrame or a list of DataFrames if roi_obj is a list.