diff --git a/rec_to_nwb/processing/builder/originators/position_originator.py b/rec_to_nwb/processing/builder/originators/position_originator.py index 79a713ef..6815e4c4 100644 --- a/rec_to_nwb/processing/builder/originators/position_originator.py +++ b/rec_to_nwb/processing/builder/originators/position_originator.py @@ -201,8 +201,9 @@ def get_position_with_corrected_timestamps(position_tracking_path, ptp_enabled): # Additionally, for offline tracking, frames can be skipped if the # frame is labeled as bad. video_position_info = pd.merge( - video_info, position_tracking, right_index=True, left_index=True, how="left" - ) + video_info.drop(columns=[x for x in ['xloc','yloc','xloc2','yloc2'] if x in video_info.columns]), + position_tracking, right_index=True, left_index=True, how="left" + ) if ptp_enabled: logger.info("PTP detected")