Plots
plot_dynamic_response
Plot dynamic response for specified variable(s) and design(s).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
Dictionary where keys are design names and values are dictionaries containing time series data for each design. |
required | |
variable_name
|
Either a string (single variable) or list of strings (multiple variables). If a list is provided, subplots will be created. |
'Voltage [V]'
|
Returns:
| Type | Description |
|---|---|
|
plotly.Figure: A Plotly figure with single plot or subplots. |
plot_kpis
Create a horizontal bar plot comparing KPI values of different designs to a baseline.
This function generates a plotly figure that visualizes the performance of various design alternatives compared to a baseline design for different Key Performance Indicators (KPIs).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
results
|
DataFrame
|
A DataFrame containing KPI values for different designs. It should have columns for 'KPI', 'Baseline', and other design alternatives. |
required |
plot_type
|
str
|
A string indicating the type of plot to generate. It can be either "relative" or "delta". |
required |
Returns:
| Type | Description |
|---|---|
Figure
|
A Plotly Figure object representing the horizontal bar chart of KPI values, which can be displayed or further modified. |
plot_ocv
Create a scatter plot of OCV data for a battery. This function generates a plotly figure that visualizes the OCV data for a battery.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
battery
|
DataFrame
|
A DataFrame containing OCV data for a battery. Expected columns: - "SoC": State of charge values - "SoC*SoH": State of charge times state of health values - "Charge Voltage [V]": Charge voltage values - "Discharge Voltage [V]": Discharge voltage values - "Anode Charge Voltage [V]": Anode charge voltage values - "Anode Discharge Voltage [V]": Anode discharge voltage values - "Cathode Charge Voltage [V]": Cathode charge voltage values - "Cathode Discharge Voltage [V]": Cathode discharge voltage values |
required |
Returns:
| Type | Description |
|---|---|
Figure
|
A Plotly Figure object representing the scatter plot of OCV data, which can be displayed or further modified. |
plot_sensitivities
Create a heatmap plot of sensitivities for different KPIs and parameters.
This function generates a heatmap visualization of the sensitivity values for various Key Performance Indicators (KPIs) with respect to different parameters. The heatmap is normalized for each KPI to enhance visual comparison.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
kpi_names
|
list
|
A list of strings representing the names of the KPIs. |
required |
sensitivities
|
dict
|
A dictionary where keys are parameter names and values are lists of sensitivity values corresponding to each KPI. |
required |
Returns:
| Type | Description |
|---|---|
Figure
|
A Plotly Figure object representing the sensitivity heatmap, which can be displayed or further modified. |
plot_voltage_response
Create a line plot of voltage response for multiple designs.
This function generates a Plotly figure that visualizes the voltage response of various designs over time, specifically focusing on voltage models.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict
|
A dictionary where keys are design names and values are dictionaries containing 'Time' and 'voltModel' data for each design. The structure should be: {design_name: {'Time': [...], 'voltModel': [...]}, ...} |
required |
Returns:
| Type | Description |
|---|---|
Figure
|
A Plotly Figure object representing the line plot of dynamic KPI performance, which can be displayed or further modified. |
radar_plot
Create a radar plot to visualize the performance of various designs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
results
|
DataFrame
|
A DataFrame containing the performance metrics of various designs. |
required |
Returns:
| Type | Description |
|---|---|
Figure
|
A radar plot representing the performance of various designs. |