decode.plot package#

Submodules#

decode.plot.fancy_plot module#

decode.plot.fancy_plot.plot_crosshair(x, y, ax=None, color='r')[source]#

Plot Crosshair and deduce limits automatically from axis

Parameters:
  • x (float) – x coordinate

  • y (float) – y coordinate

  • ax – axis where to put crosshair

  • color – colour as specified by matplotlib

Returns:

None

decode.plot.frame_coord module#

class decode.plot.frame_coord.PlotCoordinates(pos_tar=None, phot_tar=None, pos_out=None, phot_out=None, pos_ini=None, phot_ini=None, extent_limit=None, match_lines=False, labels=None, axes_order=None)[source]#

Bases: object

Plots points in 2D projection.

Parameters:
  • pos_tar

  • phot_tar

  • pos_out

  • phot_out

  • pos_ini

  • phot_ini

  • extent_limit

  • match_lines – plots

  • axes_order (Optional[str]) – order of axis. Either default order (None) or ‘future’ (i.e. future version of decode in which we will swap axes). This is only a visual effect and does not change the storage scheme of the EmitterSet

plot()[source]#
class decode.plot.frame_coord.PlotCoordinates3D(pos_tar=None, pos_out=None, phot_out=None, match_lines=False, labels=None)[source]#

Bases: object

plot()[source]#
class decode.plot.frame_coord.PlotFrame(frame, extent=None, clim=None, plot_colorbar=False, axes_order=None)[source]#

Bases: object

Plots a frame.

Parameters:
  • frame (Tensor) – frame to be plotted

  • extent (Optional[tuple]) – specify frame extent, tuple ((x0, x1), (y0, y1))

  • clim – clim values

  • plot_colorbar (bool) – plot the colorbar

  • axes_order (Optional[str]) – order of axis. Either default order (None) or ‘future’ (i.e. future version of decode in which we will swap axes). This is only a visual effect and does not change the storage scheme of the EmitterSet

plot()[source]#

Plot the frame. Note that according to convention we need to transpose the last two axis.

Return type:

axis

class decode.plot.frame_coord.PlotFrameCoord(frame, pos_tar=None, phot_tar=None, pos_out=None, phot_out=None, pos_ini=None, phot_ini=None, extent=None, coord_limit=None, norm=None, clim=None, match_lines=False, labels=None, plot_colorbar_frame=False, axes_order=None)[source]#

Bases: PlotCoordinates, PlotFrame

Plots points in 2D projection.

Parameters:
  • pos_tar

  • phot_tar

  • pos_out

  • phot_out

  • pos_ini

  • phot_ini

  • extent_limit

  • match_lines – plots

  • axes_order (Optional[str]) – order of axis. Either default order (None) or ‘future’ (i.e. future version of decode in which we will swap axes). This is only a visual effect and does not change the storage scheme of the EmitterSet

plot()[source]#

Plot the frame. Note that according to convention we need to transpose the last two axis.

decode.plot.frame_coord.connect_point_set(set0, set1, threeD=False, ax=None)[source]#

Plots the connecting lines between the set0 and set1 in 2D.

Parameters:
  • set0 – torch.Tensor / np.array of dim N x 2

  • set1 – torch.Tensor / np.array of dim N x 2

  • threeD (bool) – plot / connect in 3D

  • ax – axis where to plot

Returns:

Module contents#