Summary Results#
This page documents the classes and functions in the summary_results module of the HydroGenerate package.
- flow_efficiency_power_plot(x)#
Plot turbine efficiency and power as a function of turbine flow.
This function expects time-series outputs stored on
x.dataframe_output. It deduplicates by turbine flow, sorts, and then creates a dual-axis plot: efficiency on the left axis and power on the right axis.- Parameters:
x (object) – HydroGenerate results object. Expected attributes include
pandas_dataframe(bool)dataframe_output(pandas.DataFrame) with columns:'turbine_flow_cfs','efficiency','power_kW'- Returns:
Matplotlib figure containing the dual-axis plot.
- Return type:
matplotlib.figure.Figure
Notes
If
x.pandas_dataframeis False, the function prints an informational message and returnsNone.
- flow_efficiency_plot(x)#
Plot turbine efficiency as a function of turbine flow.
- Parameters:
x (object) – HydroGenerate results object. Expected attributes include
pandas_dataframe(bool),dataframe_output(pandas.DataFrame) with columns:'turbine_flow_cfs','efficiency','power_kW'- Returns:
Matplotlib figure containing the efficiency plot.
- Return type:
matplotlib.figure.Figure
Notes
If
x.pandas_dataframeis False, the function prints an informational message and returnsNone.
- flow_duration_curve_plot(x)#
Plot the flow duration curve (FDC).
The function reads
x.flowduration_curveand plots flow versus percent exceedance. It also overlays the design-flow marker usingx.design_flowandx.pctime_runfullwhen available.- Parameters:
x (object) – HydroGenerate results object expected to include
flowduration_curve(pandas.DataFrame) with columns'Percent_Exceedance'and'Flow'(in m³/s),units(‘US’ or ‘SI’),design_flow(float),pctime_runfull(float)- Returns:
Matplotlib figure containing the flow duration curve.
- Return type:
matplotlib.figure.Figure
Notes
If the required
flowduration_curveattribute is missing, the function prints an informational message and returnsNone.
- turbine_type_plot(x)#
Plot turbine selection regions and mark site characteristics.
The plot uses polygon “regions of influence” in head-flow space for common turbine types (Pelton, Turgo, Francis, Crossflow, Kaplan) and marks the site’s (flow, head) point.
- Parameters:
x (object) – HydroGenerate results object expected to include:
net_head(float): head (m in SI; ft in US, then converted),design_flow(float or None): m³/s in SI; cfs in US, then converted,flow(float): used ifdesign_flowis not available,units(‘US’ or ‘SI’)- Returns:
Matplotlib figure containing the turbine selection plot.
- Return type:
matplotlib.figure.Figure
Notes
The turbine region polygons are defined in SI units. If
x.units == 'US', head and flow are converted to SI before plotting.
- monthly_figure_plot(df, var_fig)#
Generate a monthly summary figure for a specified variable.
The function computes monthly mean and median, and plots the interquartile range (IQR) as a shaded band.
- Parameters:
df (pandas.DataFrame) – Time-indexed DataFrame (DatetimeIndex) containing the target column.
var_fig (str) – Column name to plot. Common values in HydroGenerate outputs include:
'turbine_flow_cfs','energy_kWh','capacity_factor'
- Returns:
Matplotlib figure containing the monthly plot.
- Return type:
matplotlib.figure.Figure
Notes
Axis labels are set based on
var_figto match the original plotting behavior.
- plant_capfactor_plot(x)#
Plot monthly capacity factor statistics.
- Parameters:
x (object) – HydroGenerate results object expected to include:
pandas_dataframe(bool),dataframe_output(pandas.DataFrame) with column'power_kW',rated_power(float): kW- Returns:
Matplotlib figure of monthly capacity factor summary.
- Return type:
matplotlib.figure.Figure
Notes
If
x.pandas_dataframeis False, the function prints an informational message and returnsNone.
- plant_turbineflow_plot(x)#
Plot monthly turbine flow statistics.
- Parameters:
x (object) – HydroGenerate results object expected to include:
pandas_dataframe(bool),dataframe_output(pandas.DataFrame) with column'turbine_flow_cfs'- Returns:
Matplotlib figure of monthly turbine flow summary.
- Return type:
matplotlib.figure.Figure
Notes
If
x.pandas_dataframeis False, the function prints an informational message and returnsNone.
- plant_elecgeneration_plot(x)#
Plot monthly electricity generation statistics.
- Parameters:
x (object) – HydroGenerate results object expected to include:
pandas_dataframe(bool),dataframe_output(pandas.DataFrame) with column'energy_kWh'- Returns:
Matplotlib figure of monthly electricity generation summary.
- Return type:
matplotlib.figure.Figure
Notes
If
x.pandas_dataframeis False, the function prints an informational message and returnsNone.