foxes.output.rose_plot.RosePlotOutput¶
- class foxes.output.rose_plot.RosePlotOutput[source]¶
Bases:
Output
Class for rose plot creation
- Parameters:
results (xarray.Dataset) – The calculation results (farm or points)
- results¶
The calculation results (farm or points)
- Type:
pandas.DataFrame
Methods
__init__
(results)get_data
(sectors, var, var_bins[, wd_var, ...])Get pandas DataFrame with wind rose data.
get_data_info
(dname)Returns default description for a variable.
get_figure
(sectors, var, var_bins[, wd_var, ...])Creates px figure object
new
(model_type, **kwargs)Run-time output model factory.
Prints all model names.
write
(file_path, data[, format_col2var, ...])Writes data to file via pandas.
write_figure
(file_name, sectors, var, var_bins)Write rose plot to file
- get_data(sectors, var, var_bins, wd_var='AMB_WD', turbine=None, point=None, legend=None)[source]¶
Get pandas DataFrame with wind rose data.
- Parameters:
sectors (int) – The number of wind direction sectors
var (str) – The data variable name
var_bins (list of float) – The variable bin seperation values
wd_var (str, optional) – The wind direction variable name
turbine (int, optional) – Only relevant in case of farm results. If None, mean over all turbines. Else, data from a single turbine
point (int, optional) – Only relevant in case of point results. If None, mean over all points. Else, data from a single point
legend (str, optional) – The data legend string
- Returns:
The wind rose data
- Return type:
pd.DataFrame
- classmethod get_data_info(dname)[source]¶
Returns default description for a variable.
- Parameters:
dname (str) – The variable name
- Returns:
title (str) – The long name of the variable
legend (str) – The legend/axis text
- get_figure(sectors, var, var_bins, wd_var='AMB_WD', turbine=None, point=None, cmap='Turbo', title=None, legend=None, layout_dict={}, title_dict={})[source]¶
Creates px figure object
- Parameters:
sectors (int) – The number of wind direction sectors
var (str) – The data variable name
var_bins (list of float) – The variable bin seperation values
wd_var (str, optional) – The wind direction variable name
turbine (int, optional) – Only relevant in case of farm results. If None, mean over all turbines. Else, data from a single turbine
point (int, optional) – Only relevant in case of point results. If None, mean over all points. Else, data from a single point
legend (str, optional) – The data legend string
layout_dict (dict, optional) – Optional parameters for the px figure layout
title_dict (dict, optional) – Optional parameters for the px title layout
- Returns:
The rose plot figure
- Return type:
px.Figure
- classmethod new(model_type, **kwargs)¶
Run-time output model factory.
- Parameters:
model_type (string) – The selected derived class name
- classmethod print_models()¶
Prints all model names.
- classmethod write(file_path, data, format_col2var={}, format_dict={}, **kwargs)¶
Writes data to file via pandas.
The kwargs are forwarded to the underlying pandas writing function.
- Parameters:
- write_figure(file_name, sectors, var, var_bins, wd_var='AMB_WD', turbine=None, point=None, cmap='Turbo', title=None, legend=None, layout_dict={}, title_dict={})[source]¶
Write rose plot to file
- Parameters:
file_name (str) – Path to the output file
sectors (int) – The number of wind direction sectors
var (str) – The data variable name
var_bins (list of float) – The variable bin seperation values
wd_var (str, optional) – The wind direction variable name
turbine (int, optional) – Only relevant in case of farm results. If None, mean over all turbines. Else, data from a single turbine
point (int, optional) – Only relevant in case of point results. If None, mean over all points. Else, data from a single point
legend (str, optional) – The data legend string
layout_dict (dict, optional) – Optional parameters for the px figure layout
title_dict (dict, optional) – Optional parameters for the px title layout