Profile read from an openPMD file#

class lasy.profiles.FromOpenPMDProfile(path, iteration, pol, field, coord=None, is_envelope=None, prefix=None, theta=None, phase_unwrap_nd=False, verbose=False)[source]#

Profile defined from an openPMD file.

Parameters:
pathstring

Path to the openPMD file containing the laser field or envelope. Passed directly OpenPMDTimeSeries.

iterationint

Iteration at which the argument is read. Passed directly OpenPMDTimeSeries.

pollist of 2 complex numbers (dimensionless)

Polarization vector. It corresponds to \(p_u\) in the above formula ; \(p_x\) is the first element of the list and \(p_y\) is the second element of the list. Using complex numbers enables elliptical polarizations.

fieldstring

Name of the field containing the laser pulse Passed directly OpenPMDTimeSeries.

coordstring

Name of the field containing the laser pulse Passed directly OpenPMDTimeSeries.

is_envelopeboolean

Whether the field to read represents a laser envelope. If not, the envelope is obtained from the electric field using a Hilbert transform. If not specified, lasy will try to guess whether the field is an envelope by checking whether it is a complex array.

prefixstring

Prefix of the openPMD file from which the envelope is read. Only used when envelope=True. The provided iteration is read from <path>/<prefix>_%T.h5.

thetafloat or None, optional

Only used if the openPMD input is in thetaMode geometry. Directly passed to openpmd_viewer.OpenPMDTimeSeries.get_field. The angle of the plane of observation, with respect to the x axis If theta is not None, then this function returns a 2D array corresponding to the plane of observation given by theta; otherwise it returns a full 3D Cartesian array.

phase_unwrap_ndboolean (optional)

If True, the phase unwrapping is n-dimensional (2- or 3-D depending on dim). If False, the phase unwrapping is done in t, treating each transverse cell separately. This should be less accurate but faster. If set to True, scikit-image must be installed.

verboseboolean (optional)

Whether to print extended information.