Karana.Models.DataPlotter#

This file contains the DataPlotter model.

A model that can be used to update DashApp plots.

Classes#

DataPlotterParams

Parameter class for DataPlotter model.

DataPlotter

DataPlotter model.

Module Contents#

class Karana.Models.DataPlotter.DataPlotterParams(/, **data: Any)[source]#

Bases: Karana.Models.KModelParams

Parameter class for DataPlotter model.

Parameters:
  • plot_first_step (bool) – If True, then update the plot on the first step. Otherwise, the first update will happen at the postModelStep.

  • dash_app (DashApp) – The DashApp to update.

plot_first_step: bool = True#
dash_app: Karana.KUtils.DataPlotter.DashApp = None#
isFinalized() bool[source]#

Ensure the DataPlotterParams are finalized.

Returns:

True if finalized, False otherwise.

Return type:

bool

class Karana.Models.DataPlotter.DataPlotter(name: str, sp: Karana.Dynamics.StatePropagator)[source]#

Bases: Karana.Models.KModel

DataPlotter model.

This model updates a DashApp at the specified interval.

params: DataPlotterParams#
postModelStep(t: float | numpy.timedelta64, x: Annotated[numpy.typing.ArrayLike, numpy.float64, [m, 1]])[source]#

Update the DashApp.

Parameters:
  • t (float | np.timedelta64) – Current time. Unused.

  • x (Annotated[ArrayLike, np.float64, '[m, 1]']) – Current state vector. Unused.