pymaid.get_landmark_groups

pymaid.get_landmark_groups(with_locations=False, with_members=False, remote_instance=None) Tuple[DataFrame, DataFrame | None, Dict[int, List[int]] | None][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:

  • groups (pd.DataFrame) – A DataFrame with columns group_id, name, user_id, project_id, creation_time, edition_time.

  • locations (pd.DataFrame, optional (default None)) – A DataFrame with columns location_id, x, y, z, group_id.

  • members (dict[int, list[int]], optional (default None)) – A dict mapping group ID to a list of landmark IDs (members of that group).

Examples

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