lamberthub.plotting.time

Holds plotting utilities related with required number of iterations

Module Contents

Classes

TPIPlotter

Time per iteration

TTCPlotter

Total time computation

class lamberthub.plotting.time.TPIPlotter(ax=None, fig=None)

Bases: lamberthub.plotting._base.TauThetaPlotter

Time per iteration

_get_tpi(self, solver, theta_span, tau_span)

Computes the time per iteration for the whole meshgrid

plot_performance(self, solver, N_samples=10, maxtpi=200, step=20, cmap=sunshine_9lev)

Returns a graphical representation on the time per iteration performance for a particular solver.

Parameters
  • solver (function) – The solver who’s performance is to be assessed.

  • N_samples (int) – Number of samples to be computed. The higher, the less spurious values in the result.

  • maxtpi (float) – The maximum value for the time per iterations (in microseconds).

  • step (float) – Step for drawing the colorbar ticks.

  • cmap (matplotlib.colors.Colormap) – The map for colouring the grid.

Notes

The method does not accept neither a transfer angle nor time of flight span vectors. This is to force a common basis when addressing the performance from the number of iterations point of view. Only figure customization options are valid as input parameters.

class lamberthub.plotting.time.TTCPlotter(ax=None, fig=None)

Bases: lamberthub.plotting._base.TauThetaPlotter

Total time computation

_get_ttc(self, solver, theta_span, tau_span)

Computes the total time of computation for the whole meshgrid

plot_performance(self, solver, N_samples=10, maxttc=1000, step=100, cmap=sunshine_9lev)

Returns a graphical representation on the time per iteration performance for a particular solver.

Parameters
  • solver (function) – The solver who’s performance is to be assessed.

  • N_samples (int) – Number of samples to be computed. The higher, the less spurious values in the result.

  • maxttc (float) – The maximum value for the total time of computation (in microseconds).

  • step (float) – Step for drawing the colorbar ticks.

  • cmap (matplotlib.colors.Colormap) – The map for colouring the grid.

Notes

The method does not accept neither a transfer angle nor time of flight span vectors. This is to force a common basis when addressing the performance from the number of iterations point of view. Only figure customization options are valid as input parameters.