Profile read from an openPMD file#

class lasy.profiles.FromOpenPMDProfile(file_name, envelope_name=None, iteration=None, verbose=False)[source]#

Profile defined from an openPMD file.

Upon initialization, read from an openPMD profile, build interpolation objects on the array data and use them to create function evaluate.

Parameters:
file_namestring

Name of openPMD file, including path, to read the laser field or envelope from. When the openPMD series contains 1 file per iteration, either specify the exact file name (e.g. file_name="/path/data_00001.h5") or a file pattern + iteration (e.g. file_name="/path/data%T.h5", iteration=1). When the openPMD series contains 1 file with all iterations, specify file name + optionally the iteration (e.g. file_name="/path/data.h5", iteration=1).

envelope_namestring (optional)

The name of the envelope field (this is not prescribed by the openPMD standard for the envelope). If specified, an envelope field is expected from the openPMD file. Otherwise, a full electric field is assumed. In the case of a full field, The transverse electric field (Ex & Ey or Er and Etheta) is read, and the polarization is measured from this.

iterationint (optional)

The iteration to read from the openPMD file. If not specified, the last iteration is read.

verbosebool (optional)

If true, print some intermediate steps.