tidy3dclient.viz.tprobe_2D

tidy3dclient.viz.tprobe_2D(sim, probe_ind, time_ind=- 1, normal=None, normal_ind=0, field='E', val='re', comp='z', ax=None, cbar=False, clim=None, eps=True)

Plot a 2D cross-section of the field stored in a TimeProbe object at a given time step.

Parameters
  • sim (Simulation) – A simulation object.

  • probe_ind (int) – Index of the time probe in sim.

  • time_ind (int, optional) – Index of the time step in the TimeProbe. Default is the last step.

  • normal (None, optional) – Axis normal to the 2D plane of plotting. If None, the shortest dimension is taken as the normal.

  • normal_ind (int, optional) – Spatial index along the normal dimension, for 3D probes.

  • field (str) – 'E' or 'H' field to plot.

  • val ({'re', 'abs', 'int'}, optional) – Plot the real part (default), or the absolute value of a field component, or the total field intensity.

  • comp ({'x', 'y', 'z'}, optional) – Component of the field to plot. If val is 'int', this parameter is irrelvant.

  • ax (Matplotlib axis object, optional) – If None, a new figure is created.

  • cbar (bool, optional) – Add a colorbar to the plot.

  • clim (List[float], optional) – Matplotlib color limit to use for plot.

  • eps (bool, optional) – If True, also plot a contour of the underlying permittivity.

Returns

Return type

Matplotlib image object