pysrw.computations.propagateWfrMultiProcess

pysrw.computations.propagateWfrMultiProcess#

pysrw.computations.propagateWfrMultiProcess(numCores, wfr, opticalSystem, pol='TOT', groupSeq=['lens', 'drift'], saveWfrAt=[], saveIntAt=None, startPropAt=None, stopPropAt=None)[source]#

Propagate many wavefronts through an optical system or a single wavefront though many optical systems.

Parameters:
  • numCores – the number of processes to split the computation into. Maximum value limited to the CPU count of the machine.

  • wfr – wavefront instance of Wavefront: or list of many wavefront objects.

  • opticalSystem – dictionary defining the sequence of optical elements or list of many optical system dictionaries.

  • pol (optional) – one of the POL polarization states or an angle in degrees for any arbitrary linear polarization. Defaults to “TOT”.

  • groupSeq (optional) – list of elements to merge in the propagation. The propagation through a sequence is entirely performed at the SRW library level and the intermediate planes will not appear in the propData output. Use this option for faster and memory-efficient computation, as the same wavefront object is overridden at each propagation stage. Defaults to [“lens”, “drift”].

  • saveWfrAt (optional) – list of optical element keys where the wavefront should be stored in propData. If None, the wavefront is always stored. Defaults to [].

  • saveIntAt (optional) – list of optical element keys where the intensity should be stored in propData. If None, the intensity is always stored. Defaults to None.

  • startPropAt (optional) – start the propagation at a specific optical element key. If None, the propagaiton starts at the first element. Defaults to None.

  • stopPropAt (optional) – stop the propagation at a specific optical element key. If None, the propagaiton stops at the last element. Defaults to None.

Returns:

a list of dictionaries with the propagation data returned by

:py:func:~propagateWfr:.

Return type:

list