Skip to content

Commit

Permalink
Accommodate missing LP data
Browse files Browse the repository at this point in the history
  • Loading branch information
bjhardcastle committed Nov 23, 2024
1 parent ceb2c70 commit a7e0b51
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/npc_sessions/sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3052,9 +3052,13 @@ def _lp(self) -> tuple[pynwb.core.DynamicTable, ...]:

df = pd.DataFrame()
for result_name in utils.LP_RESULT_TYPES:
result_df = utils.get_LPFaceParts_result_dataframe(
self.id, utils.LP_MAPPING[camera_name], result_name
)
try:
result_df = utils.get_LPFaceParts_result_dataframe(
self.id, utils.LP_MAPPING[camera_name], result_name
)
except FileNotFoundError as exc:
logging.info(repr(exc))
return ()
if len(timestamps) != len(result_df):
logger.warning(
f"{self.id} {camera_name} {result_name} lightning pose face parts output has wrong shape {len(df)}, expected {len(timestamps)} frames."
Expand Down

0 comments on commit a7e0b51

Please sign in to comment.