Functions | |
| def | PyPO.Plotter.plotBeam2D (reflGrid, field, gmode=GridModes.xy, contour=None, contour_comp=FieldComponents.Ex, levels=None, aperDict=None, norm=True, vmin=None, vmax=None, scale=Scales.dB, amp_only=False, unwrap_phase=False, correct_phase=False, k=None, project=Projections.xy, units=Units.MM, figax=None, figsize=None, title=None, titleA="Amplitude", titleP="Phase", **kwargs) |
| Generate a 2D plot of a field or current. More... | |
| def | PyPO.Plotter.plot3D (plotObject, ax, fine, cmap, norm, foc1, foc2, units=Units.MM, plotSystem_f=False) |
| Plot a 3D reflector. More... | |
| def | PyPO.Plotter.plotSystem (systemDict, ax, fine, cmap, norm, foc1, foc2, RTframes, RTcolor, units=Units.MM, title=None) |
| Plot the system. More... | |
| def | PyPO.Plotter.plotBeamCut (strip, cut, units=Units.DEG, vmin=None, vmax=None, scale=Scales.dB, norm=False, amp_only=True, figax=None, title=None, **kwargs) |
| Plot a beam cut. More... | |
| def | PyPO.Plotter.plotRTframe (frame, project, savePath, returns, aspect, units) |
| Plot a ray-trace frame spot diagram. More... | |
File containing functions for generating plots.
| def PyPO.Plotter.plot3D | ( | plotObject, | |
| ax, | |||
| fine, | |||
| cmap, | |||
| norm, | |||
| foc1, | |||
| foc2, | |||
units = Units.MM, |
|||
plotSystem_f = False |
|||
| ) |
Plot a 3D reflector.
| plotObject | A reflDict containing surface on which to plot beam. |
| ax | Axis to use for plotting. |
| fine | Spacing of normals for plotting. |
| cmap | Colormap of reflector. |
| norm | Plot reflector normals. |
| foc1 | Plot focus 1. |
| foc2 | Plot focus 2. |
| units | Units to plot in. |
| plotSystem_f | Whether or not plot3D is called from plotSystem. |
| def PyPO.Plotter.plotBeam2D | ( | reflGrid, | |
| field, | |||
gmode = GridModes.xy, |
|||
contour = None, |
|||
contour_comp = FieldComponents.Ex, |
|||
levels = None, |
|||
aperDict = None, |
|||
norm = True, |
|||
vmin = None, |
|||
vmax = None, |
|||
scale = Scales.dB, |
|||
amp_only = False, |
|||
unwrap_phase = False, |
|||
correct_phase = False, |
|||
k = None, |
|||
project = Projections.xy, |
|||
units = Units.MM, |
|||
figax = None, |
|||
figsize = None, |
|||
title = None, |
|||
titleA = "Amplitude", |
|||
titleP = "Phase", |
|||
| ** | kwargs | ||
| ) |
Generate a 2D plot of a field or current.
| reflGrid | A reflGrid containing the surface grid which to plot beam. |
| field | PyPO field or current component to plot. |
| contour | A fields or currents object to plot as contour. |
| contour_comp | The component of the contour fields or currents object to plot as contours |
| levels | Levels for contourplot. |
| aperDict | Plot an aperture defined in an aperDict object along with the field or current patterns. Default is None. |
| norm | Normalise field. |
| vmin | Minimum amplitude value to display. Default is -30. |
| vmax | Maximum amplitude value to display. Default is 0. |
| scale | Plot amplitude in decibels, logarithmic or linear scale. Instance of Scales enum object. |
| amp_only | Only plot amplitude pattern. Default is False. |
| unwrap_phase | Unwrap the phase pattern. Prevents annular structure in phase pattern. Default is False. |
| correct_phase | Boolean or 3 element numpy array. Applies a phase factor to the field equal to k*displacement of the grid along the Z-axis (True) or direction of the 3-vector. |
| k | Wavenumber to use for phase correction. Only used if correct_phase is not False. |
| project | Set abscissa and ordinate of plot. Should be given as an instance of the Projection enum. |
| units | The units of the axes. Instance of Units enum object. |
| figax | Tuple of Matplotlib Figure and Axes object or np.array of Axes objects to use for the plots. If none, create new figure. |
| figsize | Tuple with Matplotlib Figure size. Defaults to (10,5) or (5,5). Has no effect if figax is given. |
| title | An overall title for the plot. Defaults to the field name and component. |
| titleA | Title of the amplitude plot. Default is "Amp". |
| titleP | Title of the phase plot. Default is "Phase". |
| **kwargs | Additional keywords to pass to Axes.pcolormesh Matplotlib methods. |
| def PyPO.Plotter.plotBeamCut | ( | strip, | |
| cut, | |||
units = Units.DEG, |
|||
vmin = None, |
|||
vmax = None, |
|||
scale = Scales.dB, |
|||
norm = False, |
|||
amp_only = True, |
|||
figax = None, |
|||
title = None, |
|||
| ** | kwargs | ||
| ) |
Plot a beam cut.
| strip | Coordinates for plotting the cut. |
| cut | Field values to plot |
| units | Unit for x-axis. Instance of Units enum object. |
| vmin | Minimum for plot range. |
| vmax | Maximum for plot range. |
| scale | The units of the y axis. Instance of Scales Enum object. |
| norm | Normalise field. |
| amp_only | Only plot amplitude pattern. Default is True. |
| figax | Tuple of Matplotlib Figure and Axes object or np.array of Axes objects to use for the plots. If none, create new figure. |
| title | An overall title for the plot. Defaults to the field name and component. |
| **kwargs | Additional keyword arguments to pass to the Matplotlib Axes.plot method |
| def PyPO.Plotter.plotRTframe | ( | frame, | |
| project, | |||
| savePath, | |||
| returns, | |||
| aspect, | |||
| units | |||
| ) |
Plot a ray-trace frame spot diagram.
| frame | A PyPO frame object. |
| project | Set abscissa and ordinate of plot. Should be given as an instance of the Projection enum. |
| savePath | Path to save plot to. |
| returns | Whether to return figure object. |
| aspect | Aspect ratio of plot. |
| units | Units of the axes for the plot. Instance of Units enum object. |
| def PyPO.Plotter.plotSystem | ( | systemDict, | |
| ax, | |||
| fine, | |||
| cmap, | |||
| norm, | |||
| foc1, | |||
| foc2, | |||
| RTframes, | |||
| RTcolor, | |||
units = Units.MM, |
|||
title = None |
|||
| ) |
Plot the system.
| systemDict | Dictionary containing the reflectors to be plotted. |
| ax | Axis of plot. |
| fine | Spacing of normals for plotting. |
| cmap | Colormap of reflector. |
| norm | Plot reflector normals. |
| foc1 | Plot focus 1. |
| foc2 | Plot focus 2. |
| RTframes | List containing frames to be plotted. |
| units | Units to plot system in. |