Skip to content

Commit 4df7ac0

Browse files
committed
run ruff formatting
1 parent 0e0d101 commit 4df7ac0

3 files changed

Lines changed: 25 additions & 18 deletions

File tree

eyetrackvr_backend/calibration.py

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ def denormalize(self, norm_x, norm_y, target_pos=None):
152152
def fit_and_visualize(self):
153153
plt.figure(figsize=(10, 8))
154154

155-
plt.plot(self.xs, self.ys, 'k.', label='Samples', alpha=0.5)
156-
plt.axis('equal')
155+
plt.plot(self.xs, self.ys, "k.", label="Samples", alpha=0.5)
156+
plt.axis("equal")
157157
plt.grid(True, alpha=0.3)
158158

159159
# Invert plot Y axis to match screen coordinates
@@ -169,24 +169,31 @@ def fit_and_visualize(self):
169169
el_x = self.center[0] + scaled_axes[0] * np.cos(t)
170170
el_y = self.center[1] + scaled_axes[1] * np.sin(t)
171171

172-
plt.plot(el_x, el_y, 'b-', linewidth=2, label='Axis-Aligned Fit')
173-
plt.plot(self.center[0], self.center[1], 'r+', markersize=15, label='Center')
174-
175-
plt.hlines(self.center[1],
176-
self.center[0] - scaled_axes[0],
177-
self.center[0] + scaled_axes[0],
178-
colors='g', linestyles='-', label='Width (X)')
179-
180-
plt.vlines(self.center[0],
181-
self.center[1] - scaled_axes[1],
182-
self.center[1] + scaled_axes[1],
183-
colors='m', linestyles='-', label='Height (Y)')
184-
185-
plt.title(f'Axis-Aligned Calibration (FlipX={self.flip_x})')
172+
plt.plot(el_x, el_y, "b-", linewidth=2, label="Axis-Aligned Fit")
173+
plt.plot(self.center[0], self.center[1], "r+", markersize=15, label="Center")
174+
175+
plt.hlines(
176+
self.center[1],
177+
self.center[0] - scaled_axes[0],
178+
self.center[0] + scaled_axes[0],
179+
colors="g",
180+
linestyles="-",
181+
label="Width (X)",
182+
)
183+
184+
plt.vlines(
185+
self.center[0],
186+
self.center[1] - scaled_axes[1],
187+
self.center[1] + scaled_axes[1],
188+
colors="m",
189+
linestyles="-",
190+
label="Height (Y)",
191+
)
192+
193+
plt.title(f"Axis-Aligned Calibration (FlipX={self.flip_x})")
186194
else:
187195
plt.title("Fit FAILED")
188196

189197
plt.legend()
190198
plt.tight_layout()
191199
plt.show()
192-

eyetrackvr_backend/etvr.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
logger = get_logger()
1212

13+
1314
class ETVR:
1415
def __init__(self):
1516
self.running: bool = False

eyetrackvr_backend/processes/calibration.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,3 @@ def run(self) -> None:
7171

7272
def shutdown(self) -> None:
7373
pass
74-

0 commit comments

Comments
 (0)