lamberthub.plotting._base

A collection of common routines for plotting ones

Module Contents

Classes

TauThetaPlotter

A class for modelling a discrete grid contour plotter.

Functions

_measure_performance(solver, theta, tau)

Computes the number of iterations from a particular value of theta and the

class lamberthub.plotting._base.TauThetaPlotter(ax=None, fig=None, Nres=50)

A class for modelling a discrete grid contour plotter.

_get_spans(self, p=0.999)

Returns a lineal span for transfer angle and non-dimensional time of flight.

Parameters

p (float) – Percentage of the final value. This is required due to singularities in some of the solvers at transfer angles of 2pi.

Returns

  • theta_span (np.array) – An array of linearly spaced transfer angles.

  • tau_span (np.array) – An array of linearly spaced non-dimensional transfer times.

_draw_colorbar(self, maxval, step, label, cmap, color_vmin)

Draws the colorbar for the figure.

Parameters
  • maxval (float) – The maximum value of the figure.

  • step (float) – The step for drawing each of the colorbar ticks.

  • label (str) – The title of the colorbar.

  • cmap (matplotlib.cmap) – The colormap used in the contour plot.

_draw_ticks(self)

Draws the ticks within the axes

_draw_labels(self)

Draws axes labels

lamberthub.plotting._base._measure_performance(solver, theta, tau)

Computes the number of iterations from a particular value of theta and the transfer angle.

Parameters
  • solver (function) – The Lambert’s problem solver function.

  • theta (float) – The transfer angle.

  • tau (float) – The non-dimensional time of flight.

Notes

The customization is null to prevent users from shooting themselves and creating performance comparisons under different boundary conditions.

lamberthub.plotting._base._vec_measure_performance