pymaid.get_landmark_groups

pymaid.get_landmark_groups(with_locations=False, with_members=False, remote_instance=None) Tuple[DataFrame, Optional[DataFrame], Optional[Dict[int, List[int]]]][source]

Get the landmark groups, optionally with IDs of their members and locations.

Parameters
  • with_locations (bool, optional) – Return a DataFrame of locations associated with group members, by default False

  • with_members (bool, optional) – Return a dict of group IDs to landmark IDs, by default False

  • remote_instance (pymaid.CatmaidInstance, optional) –

Returns

The first element is a DataFrame with columns group_id, name, user_id, project_id, creation_time, edition_time.

The second element is optionally a DataFrame with columns location_id, x, y, z, group_id.

The third element is optionally a dict mapping group ID to a list of landmark IDs (members of that group).

Return type

3-tuple of (dataframe, optional dataframe, optional dict[int, int])

Examples

>>> # Join the group and location tables
>>> groups, locations, _ = pymaid.get_landmark_groups(True, False)
>>> combined = groups.merge(locations, on="group_id")