pybop.plot.nyquist#

Functions#

nyquist(problem[, inputs, show])

Generates Nyquist plots for the given problem by evaluating the model's output and target values.

Module Contents#

pybop.plot.nyquist.nyquist(problem, inputs: pybop.parameters.parameter.Inputs = None, show=True, **layout_kwargs)[source]#

Generates Nyquist plots for the given problem by evaluating the model’s output and target values.

Parameters:
  • problem (pybop.Problem) – An instance of a problem class that contains the parameters and methods for evaluation and target retrieval.

  • inputs (Inputs, optional) – Input parameters for the problem. If not provided, the default parameters from the problem instance will be used. These parameters are verified before use (default is None).

  • show (bool, optional) – If True, the plots will be displayed.

  • **layout_kwargs (dict, optional) – Additional keyword arguments for customising the plot layout. These arguments are passed to fig.update_layout().

Returns:

A list of plotly Figure objects, each representing a Nyquist plot for the model’s output and target values.

Return type:

list

Notes

  • The function extracts the real part of the impedance from the model’s output and the real and imaginary parts of the impedance from the target output.

  • For each signal in the problem, a Nyquist plot is created with the model’s impedance plotted as a scatter plot.

  • An additional trace for the reference (target output) is added to the plot.

  • The plot layout can be customised using layout_kwargs.

Example

>>> problem = pybop.EISProblem()
>>> nyquist_figures = nyquist(problem, show=True, title="Nyquist Plot", xaxis_title="Real(Z)", yaxis_title="Imag(Z)")
>>> # The plots will be displayed and nyquist_figures will contain the list of figure objects.