@@ -163,7 +163,7 @@ def b(event, save=True):
163163 return pn .Row (summary_table , pn .Column (button ))
164164
165165
166- def compute_moseq_df (project_dir , model_name , * , fps = 30 , smooth_heading = True ):
166+ def compute_moseq_df (project_dir , model_name , results_dict = None , * , fps = 30 , smooth_heading = True ):
167167 """Compute moseq dataframe from results dict that contains all kinematic
168168 values by frame.
169169
@@ -175,8 +175,8 @@ def compute_moseq_df(project_dir, model_name, *, fps=30, smooth_heading=True):
175175 the name of the model directory
176176 results_dict : dict
177177 dictionary of results from model fitting
178- use_bodyparts : bool
179- boolean flag whether to include data for bodyparts
178+ fps: int, optional
179+ The fps of the recordings
180180 smooth_heading : bool, optional
181181 boolean flag whether smooth the computed heading, by default True
182182
@@ -186,8 +186,8 @@ def compute_moseq_df(project_dir, model_name, *, fps=30, smooth_heading=True):
186186 the dataframe that contains kinematic data for each frame
187187 """
188188
189- # load model results
190- results_dict = load_results (project_dir , model_name )
189+ if results_dict is None :
190+ results_dict = load_results (project_dir , model_name )
191191
192192 # load index file
193193 index_filepath = os .path .join (project_dir , "index.csv" )
0 commit comments