Plotting#
- lasy.utils.plotting.show_laser(grid, dim, envelope_type='field', t_shift=0, show_lineout=True, show_max=False, omega0=None, udict={}, **kw)[source]#
Show a 2D image of the laser represented on the grid.
- Parameters:
- gridGrid
The Grid object to be plotted
- dimstring
Dimensionality of the array. Options are:
'xyt': The laser pulse is represented on a 3D grid:Cartesian (x,y) transversely, and temporal (t) longitudinally.
'rt'The laser pulse is represented on a 2D grid:Cylindrical (r) transversely, and temporal (t) longitudinally.
- envelope_typestring, default: “field”
Options are: -
'field': Show the envelope of the laser field. -'intensity': Show the intensity of the laser field. -'vector_potential': Show the vector potential of the laser field.- t_shiftfloat, default: 0
Shift the temporal axis by t_shift seconds. It also can be a string with “left”, “right” or “center”, to shift the temporal axis such that the t=0 lies at the left, right or center of the x-axis.
- show_lineoutbool, default: True
Show the lineout of the laser field.
- show_maxbool, default: False
Print the maximum intensity of the laser field.
- omega0scalar
Angular frequency at which the envelope is defined. Needed if envelope_type == “vector_potential”.
- udictdict, default: {}
Dictionary with the information of the unit scales of the axes, e.g.
{'t': {'value': 1e-15, 'label': 'fs'}, 'x': {'value': 1e-6, 'label': r'\mu m'}}Override the default unit scales.- **kwadditional arguments to be passed to matplotlib’s imshow command