Skip to content

Commit

Permalink
fix: correct the if in
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelwnaylor committed Dec 5, 2024
1 parent 308361f commit eff9dfd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 31 deletions.
36 changes: 6 additions & 30 deletions examples/smarteole_example.ipynb

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions tests/test_ops_curve_shift.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import logging
from pathlib import Path
from unittest.mock import Mock, patch

import numpy as np
Expand Down
2 changes: 1 addition & 1 deletion wind_up/ops_curve_shift.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def calculate_curve_shift(curve_shift_input: CurveShiftInput) -> CurveShiftOutpu
post_df["expected_y"] = np.interp(post_df[conf.x_col], mean_curve["x_mean"], mean_curve["y_mean"])
mean_df = post_df.mean()

if conf.y_col == CurveTypes.PITCH.value:
if conf.name in [CurveTypes.PITCH.value, CurveTypes.PITCH]:
result = mean_df[conf.y_col] - mean_df["expected_y"]
else:
result = (mean_df[conf.y_col] / mean_df["expected_y"] - 1).clip(-1, 1)
Expand Down

0 comments on commit eff9dfd

Please sign in to comment.