Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix: properly assign reference turbine location in calculating closest subset of turbines #99

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion flasc/dataframe_operations/dataframe_manipulations.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def _set_col_by_n_closest_upstream_turbines(col_out, col_prefix, df, N,
# Calculate distances and get closest N upstream turbines
upstr_turbs = [ti for ti in upstr_turbs if ti not in exclude_turbs]
x0 = x_turbs[turb_no]
y0 = x_turbs[turb_no]
y0 = y_turbs[turb_no]
x_upstr = np.array(x_turbs, dtype=float)[upstr_turbs]
y_upstr = np.array(y_turbs, dtype=float)[upstr_turbs]
ds = np.sqrt((x_upstr - x0) ** 2.0 + (y_upstr - y0) ** 2.0)
Expand Down