tidy3dclient.viz.fprobe_2D¶
-
tidy3dclient.viz.fprobe_2D(sim, probe_ind, freq_ind=0, 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 FreqProbe object at a given frequency.
- Parameters
sim (Simulation) – A simulation object.
probe_ind (int) – Index of the frequency probe in
sim.freq_ind (int, optional) – Index of the frequency in the
FreqProbe. Default is 0.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', 'im', 'abs', 'int'}, optional) – Plot the real part (default), or the imaginary or absolute value of a field component, or the total field intensity.
comp ({'x', 'y', 'z'}, optional) – Component of the field to plot. If
valis'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