Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jun 10, 2024
1 parent b451bc7 commit ed1f3a1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ install_requires =
pandas
rich
importlib-metadata;python_version<"3.8"
python_requires = >=3.7
python_requires = >=3.8
include_package_data = true
package_dir =
=src
Expand Down
7 changes: 4 additions & 3 deletions src/pupil_labs/dynamic_content_on_rim/dynamic_rim.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
This script is used to plot gaze over a video displayed on RIM
enrichment eye tracking recording.
"""

import glob
import logging
import os
Expand Down Expand Up @@ -162,9 +163,9 @@ def main():
# Applying the perspective transform
xy_transf = cv2.perspectiveTransform(xy, M)
# Saving the transformed gaze points
gaze_rim_df[
["gaze position transf x [px]", "gaze position transf y [px]"]
] = pd.DataFrame(xy_transf[0]).set_index(gaze_rim_df.index)
gaze_rim_df[["gaze position transf x [px]", "gaze position transf y [px]"]] = (
pd.DataFrame(xy_transf[0]).set_index(gaze_rim_df.index)
)
# Get the patch of the screen
mask = np.zeros(np.asarray(ref_img.shape)[0:2], dtype=np.uint8)
cv2.fillPoly(
Expand Down
8 changes: 6 additions & 2 deletions src/pupil_labs/dynamic_content_on_rim/video/read.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,12 @@ def read_video_ts(video_path, audio=False, auto_thread_type=True):
for frame in packet.decode():
if frame is not None and frame.pts is not None:
pts.append(frame.pts)
dts.append(frame.dts) if frame.dts is not None else logging.info(
f"Decoding timestamp is missing at frame {len(pts)}"
(
dts.append(frame.dts)
if frame.dts is not None
else logging.info(
f"Decoding timestamp is missing at frame {len(pts)}"
)
)
ts.append(
(
Expand Down

0 comments on commit ed1f3a1

Please sign in to comment.