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

Quantify wind speed shift #42

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 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
13 changes: 7 additions & 6 deletions examples/smarteole_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@
"import logging\n",
"import re\n",
"\n",
"from IPython.display import Markdown, display\n",
"from IPython.display import Markdown\n",
"from IPython.display import display as ipy_display\n",
"\n",
"logging.basicConfig(format=\"%(message)s\", level=logging.INFO)\n",
"\n",
Expand All @@ -72,7 +73,7 @@
" message = self.format(record)\n",
" # Replace newline characters with <br> tags\n",
" message = re.sub(r\"\\n\", \"<br>\", message)\n",
" display(Markdown(message))\n",
" ipy_display(Markdown(message))\n",
"\n",
"\n",
"logger = logging.getLogger()\n",
Expand Down Expand Up @@ -2786,7 +2787,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "a2457ea9318744fd80c413a42676fcd0",
"model_id": "3fbc8142f44a49bf8500c4e04e97b1ed",
"version_major": 2,
"version_minor": 0
},
Expand Down Expand Up @@ -2908,7 +2909,7 @@
{
"data": {
"text/markdown": [
"{'ref': 'SMV7', 'ref_ws_col': 'ref_ws_est_blend', 'distance_m': 314.4465998943834, 'bearing_deg': 173.69483366777283, 'ref_max_northing_error_v_reanalysis': np.float64(2.6590754551807976), 'ref_max_northing_error_v_wf': np.float64(2.842170943040401e-14), 'ref_max_ws_drift': np.float64(0.08697706942338845), 'ref_max_ws_drift_pp_period': np.float64(0.08697706942338845), 'ref_powercurve_shift': np.float64(0.003117456887993697), 'ref_rpm_shift': np.float64(0.0015313319638985412), 'ref_pitch_shift': np.float64(-0.05548555519736481), 'detrend_pre_r2_improvement': np.float64(0.004942384513915488), 'detrend_post_r2_improvement': np.float64(0.0011487228730558963), 'mean_power_pre': np.float64(1149.2323289820358), 'mean_power_post': np.float64(1148.4157066585956), 'mean_test_yaw_offset_pre': np.float64(-0.022511156888877885), 'mean_test_yaw_offset_post': np.float64(3.8213264238880478), 'mean_test_yaw_offset_command_pre': np.float64(0.0002638323353293413), 'mean_test_yaw_offset_command_post': np.float64(6.636967675544794), 'mean_ref_yaw_offset_command_pre': np.float64(0.0), 'test_ref_warning_counts': 0, 'time_calculated': Timestamp('2024-11-04 14:53:53.646317+0000', tz='UTC'), 'uplift_frc': np.float64(-0.010361770845398625), 'unc_one_sigma_frc': np.float64(0.0057851151530948705), 't_value_one_sigma': np.float64(1.000630119597717), 'missing_bins_unc_scale_factor': 1, 'pp_valid_hours_pre': np.float64(132.5), 'pp_valid_hours_post': np.float64(136.0), 'pp_valid_hours': np.float64(268.5), 'pp_data_coverage': np.float64(0.11496467565831728), 'pp_invalid_bin_count': np.int64(16), 'uplift_noadj_frc': np.float64(-0.011505660672016103), 'unc_one_sigma_noadj_frc': np.float64(0.0057851151530948705), 'poweronly_uplift_frc': np.float64(-0.012003308408347353), 'reversed_uplift_frc': np.float64(-0.009715528755112396), 'reversal_error': np.float64(0.0022877796532349576), 'unc_one_sigma_lowerbound_frc': np.float64(0.0011438898266174788), 'unc_one_sigma_bootstrap_frc': np.float64(0.0049406532714673), 'uplift_p5_frc': np.float64(-0.000846103203498606), 'uplift_p95_frc': np.float64(-0.019877438487298643), 'wind_up_version': '0.1.9', 'test_wtg': 'SMV6', 'test_pw_col': 'test_pw_clipped', 'lt_wtg_hours_raw': 0, 'lt_wtg_hours_filt': 0, 'test_max_ws_drift': np.float64(0.03653354205095605), 'test_max_ws_drift_pp_period': np.float64(0.03653354205095605), 'test_powercurve_shift': np.float64(0.0010615707256107498), 'test_rpm_shift': np.float64(0.0011316163321652972), 'test_pitch_shift': np.float64(-0.037158903030505286), 'preprocess_warning_counts': 0, 'test_warning_counts': 0}"
"{'ref': 'SMV7', 'ref_ws_col': 'ref_ws_est_blend', 'distance_m': 314.4465998943834, 'bearing_deg': 173.69483366777283, 'ref_max_northing_error_v_reanalysis': np.float64(2.6590754551807976), 'ref_max_northing_error_v_wf': np.float64(2.842170943040401e-14), 'ref_max_ws_drift': np.float64(0.08697706942338845), 'ref_max_ws_drift_pp_period': np.float64(0.08697706942338845), 'ref_powercurve_shift': np.float64(0.003117456887993697), 'ref_rpm_shift': np.float64(0.0015313319638985412), 'ref_pitch_shift': np.float64(-0.05548555519736481), 'ref_wind_speed_shift': np.float64(-0.0009373123752394186), 'detrend_pre_r2_improvement': np.float64(0.004942384513915488), 'detrend_post_r2_improvement': np.float64(0.0011487228730558963), 'mean_power_pre': np.float64(1149.2323289820358), 'mean_power_post': np.float64(1148.4157066585956), 'mean_test_yaw_offset_pre': np.float64(-0.022511156888877885), 'mean_test_yaw_offset_post': np.float64(3.8213264238880478), 'mean_test_yaw_offset_command_pre': np.float64(0.0002638323353293413), 'mean_test_yaw_offset_command_post': np.float64(6.636967675544794), 'mean_ref_yaw_offset_command_pre': np.float64(0.0), 'test_ref_warning_counts': 0, 'time_calculated': Timestamp('2024-12-05 12:46:03.895478+0000', tz='UTC'), 'uplift_frc': np.float64(-0.010361770845398625), 'unc_one_sigma_frc': np.float64(0.0057851151530948705), 't_value_one_sigma': np.float64(1.000630119597717), 'missing_bins_unc_scale_factor': 1, 'pp_valid_hours_pre': np.float64(132.5), 'pp_valid_hours_post': np.float64(136.0), 'pp_valid_hours': np.float64(268.5), 'pp_data_coverage': np.float64(0.11496467565831728), 'pp_invalid_bin_count': np.int64(16), 'uplift_noadj_frc': np.float64(-0.011505660672016103), 'unc_one_sigma_noadj_frc': np.float64(0.0057851151530948705), 'poweronly_uplift_frc': np.float64(-0.012003308408347353), 'reversed_uplift_frc': np.float64(-0.009715528755112396), 'reversal_error': np.float64(0.0022877796532349576), 'unc_one_sigma_lowerbound_frc': np.float64(0.0011438898266174788), 'unc_one_sigma_bootstrap_frc': np.float64(0.0049406532714673), 'uplift_p5_frc': np.float64(-0.000846103203498606), 'uplift_p95_frc': np.float64(-0.019877438487298643), 'wind_up_version': '0.1.10', 'test_wtg': 'SMV6', 'test_pw_col': 'test_pw_clipped', 'lt_wtg_hours_raw': 0, 'lt_wtg_hours_filt': 0, 'test_max_ws_drift': np.float64(0.03653354205095605), 'test_max_ws_drift_pp_period': np.float64(0.03653354205095605), 'test_powercurve_shift': np.float64(0.0010615707256107498), 'test_rpm_shift': np.float64(0.0011316163321652972), 'test_pitch_shift': np.float64(-0.037158903030505286), 'test_wind_speed_shift': np.float64(-0.0063495234304998815), 'preprocess_warning_counts': 0, 'test_warning_counts': 0}"
],
"text/plain": [
"<IPython.core.display.Markdown object>"
Expand Down Expand Up @@ -3748,7 +3749,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "df804baf4f2041b18c2dc67189a83f67",
"model_id": "45ef05430cb541a890aa60886e175144",
"version_major": 2,
"version_minor": 0
},
Expand Down Expand Up @@ -3870,7 +3871,7 @@
{
"data": {
"text/markdown": [
"{'ref': 'SMV7', 'ref_ws_col': 'ref_ws_est_blend', 'distance_m': 591.1178519927024, 'bearing_deg': 190.23567745705736, 'ref_max_northing_error_v_reanalysis': np.float64(2.6590754551807976), 'ref_max_northing_error_v_wf': np.float64(2.842170943040401e-14), 'ref_max_ws_drift': np.float64(0.08697706942338845), 'ref_max_ws_drift_pp_period': np.float64(0.08697706942338845), 'ref_powercurve_shift': np.float64(0.003117456887993697), 'ref_rpm_shift': np.float64(0.0015313319638985412), 'ref_pitch_shift': np.float64(-0.05548555519736481), 'detrend_pre_r2_improvement': np.float64(0.09621188863947527), 'detrend_post_r2_improvement': np.float64(0.11890364717818414), 'mean_power_pre': np.float64(955.493497245509), 'mean_power_post': np.float64(993.6911992736077), 'mean_test_yaw_offset_pre': np.float64(-2.2725466102034675), 'mean_test_yaw_offset_post': np.float64(-2.876981850327039), 'mean_test_yaw_offset_command_pre': np.float64(0.0), 'mean_test_yaw_offset_command_post': np.float64(0.0), 'mean_ref_yaw_offset_command_pre': np.float64(0.0), 'test_ref_warning_counts': 0, 'time_calculated': Timestamp('2024-11-04 14:55:21.795722+0000', tz='UTC'), 'uplift_frc': np.float64(0.030879346731271313), 'unc_one_sigma_frc': np.float64(0.01167847006525424), 't_value_one_sigma': np.float64(1.0006277462668354), 'missing_bins_unc_scale_factor': 1, 'pp_valid_hours_pre': np.float64(133.0), 'pp_valid_hours_post': np.float64(137.16666666666669), 'pp_valid_hours': np.float64(270.1666666666667), 'pp_data_coverage': np.float64(0.11567829872261472), 'pp_invalid_bin_count': np.int64(16), 'uplift_noadj_frc': np.float64(0.030509447623790466), 'unc_one_sigma_noadj_frc': np.float64(0.01004760180633488), 'poweronly_uplift_frc': np.float64(0.029990866525649328), 'reversed_uplift_frc': np.float64(0.03073066474061102), 'reversal_error': np.float64(0.0007397982149616941), 'unc_one_sigma_lowerbound_frc': np.float64(0.00036989910748084706), 'unc_one_sigma_bootstrap_frc': np.float64(0.01167847006525424), 'uplift_p5_frc': np.float64(0.050088720575348945), 'uplift_p95_frc': np.float64(0.01166997288719368), 'wind_up_version': '0.1.9', 'test_wtg': 'SMV5', 'test_pw_col': 'test_pw_clipped', 'lt_wtg_hours_raw': 0, 'lt_wtg_hours_filt': 0, 'test_max_ws_drift': np.float64(0.10726609831004863), 'test_max_ws_drift_pp_period': np.float64(0.10726609831004863), 'test_powercurve_shift': np.float64(-0.005678000921447213), 'test_rpm_shift': np.float64(0.0013951853610039144), 'test_pitch_shift': np.float64(-0.02783487184623068), 'preprocess_warning_counts': 0, 'test_warning_counts': 0}"
"{'ref': 'SMV7', 'ref_ws_col': 'ref_ws_est_blend', 'distance_m': 591.1178519927024, 'bearing_deg': 190.23567745705736, 'ref_max_northing_error_v_reanalysis': np.float64(2.6590754551807976), 'ref_max_northing_error_v_wf': np.float64(2.842170943040401e-14), 'ref_max_ws_drift': np.float64(0.08697706942338845), 'ref_max_ws_drift_pp_period': np.float64(0.08697706942338845), 'ref_powercurve_shift': np.float64(0.003117456887993697), 'ref_rpm_shift': np.float64(0.0015313319638985412), 'ref_pitch_shift': np.float64(-0.05548555519736481), 'ref_wind_speed_shift': np.float64(-0.0009373123752394186), 'detrend_pre_r2_improvement': np.float64(0.09621188863947527), 'detrend_post_r2_improvement': np.float64(0.11890364717818414), 'mean_power_pre': np.float64(955.493497245509), 'mean_power_post': np.float64(993.6911992736077), 'mean_test_yaw_offset_pre': np.float64(-2.2725466102034675), 'mean_test_yaw_offset_post': np.float64(-2.876981850327039), 'mean_test_yaw_offset_command_pre': np.float64(0.0), 'mean_test_yaw_offset_command_post': np.float64(0.0), 'mean_ref_yaw_offset_command_pre': np.float64(0.0), 'test_ref_warning_counts': 0, 'time_calculated': Timestamp('2024-12-05 12:47:18.340985+0000', tz='UTC'), 'uplift_frc': np.float64(0.030879346731271313), 'unc_one_sigma_frc': np.float64(0.01167847006525424), 't_value_one_sigma': np.float64(1.0006277462668354), 'missing_bins_unc_scale_factor': 1, 'pp_valid_hours_pre': np.float64(133.0), 'pp_valid_hours_post': np.float64(137.16666666666669), 'pp_valid_hours': np.float64(270.1666666666667), 'pp_data_coverage': np.float64(0.11567829872261472), 'pp_invalid_bin_count': np.int64(16), 'uplift_noadj_frc': np.float64(0.030509447623790466), 'unc_one_sigma_noadj_frc': np.float64(0.01004760180633488), 'poweronly_uplift_frc': np.float64(0.029990866525649328), 'reversed_uplift_frc': np.float64(0.03073066474061102), 'reversal_error': np.float64(0.0007397982149616941), 'unc_one_sigma_lowerbound_frc': np.float64(0.00036989910748084706), 'unc_one_sigma_bootstrap_frc': np.float64(0.01167847006525424), 'uplift_p5_frc': np.float64(0.050088720575348945), 'uplift_p95_frc': np.float64(0.01166997288719368), 'wind_up_version': '0.1.10', 'test_wtg': 'SMV5', 'test_pw_col': 'test_pw_clipped', 'lt_wtg_hours_raw': 0, 'lt_wtg_hours_filt': 0, 'test_max_ws_drift': np.float64(0.10726609831004863), 'test_max_ws_drift_pp_period': np.float64(0.10726609831004863), 'test_powercurve_shift': np.float64(-0.005678000921447213), 'test_rpm_shift': np.float64(0.0013951853610039144), 'test_pitch_shift': np.float64(-0.02783487184623068), 'test_wind_speed_shift': np.float64(-0.003742689588962622), 'preprocess_warning_counts': 0, 'test_warning_counts': 0}"
],
"text/plain": [
"<IPython.core.display.Markdown object>"
Expand Down
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@ filterwarnings = [
omit = [
"wind_up/plots/*.py",
]
exclude_lines = ["if __name__ == .__main__.:"]
exclude_lines = [
"if __name__ == .__main__.:",
"if TYPE_CHECKING:"
]

[tool.poe.tasks]
[tool.poe.tasks.lint]
Expand Down
Loading
Loading