-
Notifications
You must be signed in to change notification settings - Fork 3
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
Quantify wind speed shift #42
base: main
Are you sure you want to change the base?
Conversation
- Moves Operational Curve shift calculations into their own module - Refactor into separate curve specific functions (with underlying more generic private functions) This change improves readability and ease of adding further curve shift calculations.
In similar way that power curve, rpm and pitch shifts are already calculated, this change adds wind speed shift to the ops curve shift module
Display the sign (+/-) of the curve shift value in the log warning message for clarity of the actual shift rather than just displaying the abs() value that is used when determining whether to raise a log warning
a56d21c
to
4fac54c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am seeing some differences in integration tests, will email you with further detail. I might have found the reasons (see comments) but not totally sure. Apologies there were not unit tests for the original check_for_ops_curve_shift
function you are replacing
if abs(results_dict[descr]) > warn_thresh: | ||
if warning_msg is None: | ||
warning_msg = f"{wtg_name} check_for_ops_curve_shift warnings:" | ||
warning_msg += f" abs({descr}) > {warn_thresh}: {abs(results_dict[descr]):.3f}" | ||
if warning_msg is not None: | ||
result_manager.warning(warning_msg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this logic is valuable to keep so that ops curve shifts result in a single consolidated warning, please port it to ops_curve_shift.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed by storing warning messages and compiling them
pre_dropna_df = pre_df.dropna(subset=[scada_ws_col, pw_col, pt_col, rpm_col]).copy() | ||
post_dropna_df = post_df.dropna(subset=[scada_ws_col, pw_col, pt_col, rpm_col]).copy() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not completely sure but I think this dropna logic is missing in the new ops_curve_shift.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not completely sure but I think this dropna logic is missing in the new
ops_curve_shift.py
This logic is here now
wind-up/wind_up/ops_curve_shift.py
Line 71 in 173f074
self.pre_df = self.pre_df.dropna(subset=list(required_cols)).copy() |
I've added NaN handling to the tests too...
No description provided.