deepof.data.Coordinates

class deepof.data.Coordinates(project_path: str, project_name: str, arena: str, arena_dims: array, bodypart_graph: str, path: str, quality: dict, scales: ndarray, frame_rate: int, arena_params: List, tables: dict, table_paths: List, trained_model_path: str, videos: List, video_resolution: List, angles: dict | None = None, animal_ids: List = ('',), areas: dict | None = None, distances: dict | None = None, connectivity: Graph | None = None, excluded_bodyparts: list | None = None, exp_conditions: dict | None = None)

Class for storing the results of a ran project. Methods are mostly setters and getters in charge of tidying up the generated tables.

__init__(project_path: str, project_name: str, arena: str, arena_dims: array, bodypart_graph: str, path: str, quality: dict, scales: ndarray, frame_rate: int, arena_params: List, tables: dict, table_paths: List, trained_model_path: str, videos: List, video_resolution: List, angles: dict | None = None, animal_ids: List = ('',), areas: dict | None = None, distances: dict | None = None, connectivity: Graph | None = None, excluded_bodyparts: list | None = None, exp_conditions: dict | None = None)

Class for storing the results of a ran project. Methods are mostly setters and getters in charge of tidying up the generated tables.

Parameters:
  • project_name (str) – name of the current project.

  • project_path (str) – path to the folder containing the motion tracking output data.

  • arena (str) – Type of arena used for the experiment. See deepof.data.Project for more information.

  • arena_dims (np.array) – Dimensions of the arena. See deepof.data.Project for more information.

  • bodypart_graph (nx.Graph) – Graph containing the body part connectivity. See deepof.data.Project for more information.

  • path (str) – Path to the folder containing the results of the experiment.

  • quality (dict) – Dictionary containing the quality of the experiment. See deepof.data.Project for more information.

  • scales (np.ndarray) – Scales used for the experiment. See deepof.data.Project for more information.

  • frame_rate (int) – frame rate of the processed videos.

  • arena_params (List) – List containing the parameters of the arena. See deepof.data.Project for more information.

  • tables (dict) – Dictionary containing the tables of the experiment. See deepof.data.Project for more information.

  • table_paths (List) – List containing the paths to the tables of the experiment. See deepof.data.Project for more information.f

  • trained_model_path (str) – Path to the trained models used for the supervised pipeline. For internal use only.

  • videos (List) – List containing the videos used for the experiment. See deepof.data.Project for more information.

  • video_resolution (List) – List containing the automatically detected resolution of the videos used for the experiment.

  • angles (dict) – Dictionary containing the angles of the experiment. See deepof.data.Project for more information.

  • animal_ids (List) – List containing the animal IDs of the experiment. See deepof.data.Project for more information.

  • areas (dict) – dictionary with areas to compute. By default, it includes head, torso, and back.

  • distances (dict) – Dictionary containing the distances of the experiment. See deepof.data.Project for more information.

  • excluded_bodyparts (list) – list of bodyparts to exclude from analysis.

  • exp_conditions (dict) – Dictionary containing the experimental conditions of the experiment. See deepof.data.Project for more information.

Methods

__init__(project_path, project_name, arena, ...)

Class for storing the results of a ran project.

deep_unsupervised_embedding(preprocessed_object)

Annotates coordinates using a deep unsupervised autoencoder.

edit_arenas([videos, arena_type, verbose])

Tag the arena in the videos.

get_angles([degrees, speed, selected_id, ...])

Return a table_dict object with the angles between body parts animal as values.

get_areas([speed, selected_id])

Return a table_dict object with all relevant areas (head, torso, back, full).

get_coords([center, polar, speed, align, ...])

Return a table_dict object with the coordinates of each animal as values.

get_distances([speed, selected_id, ...])

Return a table_dict object with the distances between body parts animal as values.

get_graph_dataset([animal_id, ...])

Generate a dataset with all specified features.

get_quality()

Retrieve a dictionary with the tagging quality per video, as reported by DLC or SLEAP.

get_videos([play])

Retuens the videos associated with the dataset as a list.

load_exp_conditions(filepath)

Load experimental conditions from a wide-format csv table.

save([filename, timestamp])

Save the current state of the Coordinates object to a pickled file.

supervised_annotation([params, center, ...])

Annotates coordinates with behavioral traits using a supervised pipeline.

Attributes

get_arenas

Retrieve all available information associated with the arena.

get_exp_conditions

Return the stored dictionary with experimental conditions per subject.

__init__(project_path: str, project_name: str, arena: str, arena_dims: array, bodypart_graph: str, path: str, quality: dict, scales: ndarray, frame_rate: int, arena_params: List, tables: dict, table_paths: List, trained_model_path: str, videos: List, video_resolution: List, angles: dict | None = None, animal_ids: List = ('',), areas: dict | None = None, distances: dict | None = None, connectivity: Graph | None = None, excluded_bodyparts: list | None = None, exp_conditions: dict | None = None)

Class for storing the results of a ran project. Methods are mostly setters and getters in charge of tidying up the generated tables.

Parameters:
  • project_name (str) – name of the current project.

  • project_path (str) – path to the folder containing the motion tracking output data.

  • arena (str) – Type of arena used for the experiment. See deepof.data.Project for more information.

  • arena_dims (np.array) – Dimensions of the arena. See deepof.data.Project for more information.

  • bodypart_graph (nx.Graph) – Graph containing the body part connectivity. See deepof.data.Project for more information.

  • path (str) – Path to the folder containing the results of the experiment.

  • quality (dict) – Dictionary containing the quality of the experiment. See deepof.data.Project for more information.

  • scales (np.ndarray) – Scales used for the experiment. See deepof.data.Project for more information.

  • frame_rate (int) – frame rate of the processed videos.

  • arena_params (List) – List containing the parameters of the arena. See deepof.data.Project for more information.

  • tables (dict) – Dictionary containing the tables of the experiment. See deepof.data.Project for more information.

  • table_paths (List) – List containing the paths to the tables of the experiment. See deepof.data.Project for more information.f

  • trained_model_path (str) – Path to the trained models used for the supervised pipeline. For internal use only.

  • videos (List) – List containing the videos used for the experiment. See deepof.data.Project for more information.

  • video_resolution (List) – List containing the automatically detected resolution of the videos used for the experiment.

  • angles (dict) – Dictionary containing the angles of the experiment. See deepof.data.Project for more information.

  • animal_ids (List) – List containing the animal IDs of the experiment. See deepof.data.Project for more information.

  • areas (dict) – dictionary with areas to compute. By default, it includes head, torso, and back.

  • distances (dict) – Dictionary containing the distances of the experiment. See deepof.data.Project for more information.

  • excluded_bodyparts (list) – list of bodyparts to exclude from analysis.

  • exp_conditions (dict) – Dictionary containing the experimental conditions of the experiment. See deepof.data.Project for more information.