Skip to content
Draft
Show file tree
Hide file tree
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 pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ max-complexity = 12 # try to bring this down to 10

[tool.ruff.lint.pylint]
max-branches = 14 # try to bring this down to 12
max-statements = 66 # try to bring this down to 50
max-statements = 68 # try to bring this down to 50
max-args = 17 # try to bring this down to 5

[tool.ruff.lint.per-file-ignores]
Expand Down
10 changes: 9 additions & 1 deletion wind_up/main_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import numpy as np
import pandas as pd
from matplotlib import pyplot as plt

import wind_up
from wind_up.circular_math import circ_diff
Expand Down Expand Up @@ -727,6 +728,12 @@ def _calc_test_ref_results(
site_mean_pc_df=scada_pc if cfg.gapfill_uplift_curve_using_site_mean_power_curve else None,
)

if cfg.write_pp_df_parquets:
(cfg.out_dir / "pp_df").mkdir(exist_ok=True)
pre_df.to_parquet(cfg.out_dir / "pp_df" / f"{test_wtg.name}_{ref_name}_pre_df.parquet")
post_df.to_parquet(cfg.out_dir / "pp_df" / f"{test_wtg.name}_{ref_name}_post_df.parquet")
_pp_df.to_parquet(cfg.out_dir / "pp_df" / f"{test_wtg.name}_{ref_name}_pp_df.parquet")

other_results = ref_info | {
"ref_ws_col": ref_ws_col,
"distance_m": distance_m,
Expand Down Expand Up @@ -797,11 +804,12 @@ def run_wind_up_analysis(
preprocess_warning_counts = len(result_manager.stored_warnings)
result_manager.stored_warnings = []

plot_input_data_timeline(
_fig = plot_input_data_timeline(
assessment_inputs=inputs,
save_to_folder=inputs.plot_cfg.plots_dir if inputs.plot_cfg.save_plots else None,
show_plots=inputs.plot_cfg.show_plots,
)
plt.close(_fig)

wf_df = inputs.wf_df
pc_per_ttype = inputs.pc_per_ttype
Expand Down
4 changes: 4 additions & 0 deletions wind_up/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ class WindUpConfig(BaseModel):
default=DEFAULT_TIMEBASE_S,
description="Timebase in seconds for SCADA data, other data is converted to this timebase",
)
write_pp_df_parquets: bool = Field(
default=False,
description="If true the power performance parquet files are written along with other results and plots.",
)
ignore_turbine_anemometer_data: bool = Field(
default=False,
description="If true do not use turbine anemometer data for anything",
Expand Down
Loading