From fc46b370b49db1953844f4c65cd177648dfcb99c Mon Sep 17 00:00:00 2001 From: samuelbray32 Date: Fri, 20 Dec 2024 13:07:07 -0800 Subject: [PATCH] cleanup outdated usages of PoseOutput --- src/spyglass/behavior/core.py | 2 +- src/spyglass/behavior/moseq.py | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/spyglass/behavior/core.py b/src/spyglass/behavior/core.py index 6d6fc19d7..658080928 100644 --- a/src/spyglass/behavior/core.py +++ b/src/spyglass/behavior/core.py @@ -38,7 +38,7 @@ def create_group( group_name : str Name of the group keys : List[dict] - list of keys from PoseOutput to include in the group + list of keys from PositionOutput to include in the group bodyparts : List[str], optional body parts to include in the group, by default None includes all from every set """ diff --git a/src/spyglass/behavior/moseq.py b/src/spyglass/behavior/moseq.py index b9c96edf8..324095d69 100644 --- a/src/spyglass/behavior/moseq.py +++ b/src/spyglass/behavior/moseq.py @@ -1,4 +1,3 @@ -import hashlib import os from pathlib import Path @@ -322,9 +321,9 @@ def make(self, key): num_iters = (MoseqSyllableSelection & key).fetch1("num_iters") # load data and format for moseq - video_path = (PoseOutput & merge_key).fetch_video_path() + video_path = (PositionOutput & merge_key).fetch_video_path() video_name = Path(video_path).stem + ".mp4" - bodyparts_df = (PoseOutput & merge_key).fetch_dataframe() + bodyparts_df = (PositionOutput & merge_key).fetch_pose_dataframe() if bodyparts is None: bodyparts = bodyparts_df.keys().get_level_values(0).unique().values @@ -348,10 +347,7 @@ def make(self, key): results_df.index = bodyparts_df.index # save results into a nwbfile - nwb_file_name = PoseOutput.merge_get_parent(merge_key).fetch1( - "nwb_file_name" - ) - nwb_file_name = PoseOutput.merge_get_parent(merge_key).fetch1( + nwb_file_name = PositionOutput.merge_get_parent(merge_key).fetch1( "nwb_file_name" ) analysis_file_name = AnalysisNwbfile().create(nwb_file_name)