pysrw.lib.srwlib.SRWLOptC#

class pysrw.lib.srwlib.SRWLOptC(_arOpt=None, _arProp=None)[source]#

Bases: SRWLOpt

Optical Element: Container

__init__(_arOpt=None, _arProp=None)[source]#
Parameters:
  • _arOpt – optical element structures list (or array)

  • _arProp – list of lists of propagation parameters to be used for each individual optical element Each element _arProp[i] is a list in which elements mean: [0]: Auto-Resize (1) or not (0) Before propagation [1]: Auto-Resize (1) or not (0) After propagation [2]: Relative Precision for propagation with Auto-Resizing (1. is nominal) [3]: Allow (1) or not (0) for semi-analytical treatment of the quadratic (leading) phase terms at the propagation [4]: Do any Resizing on Fourier side, using FFT, (1) or not (0) [5]: Horizontal Range modification factor at Resizing (1. means no modification) [6]: Horizontal Resolution modification factor at Resizing (1. means no modification) [7]: Vertical Range modification factor at Resizing (1. means no modification) [8]: Vertical Resolution modification factor at Resizing (1. means no modification) [9]: Optional: Type of wavefront Shift before Resizing (vs which coordinates; to be implemented) [10]: Optional: New Horizontal wavefront Center position after Shift (to be implemented) [11]: Optional: New Vertical wavefront Center position after Shift (to be implemented) [12]: Optional: Orientation of the Output Optical Axis vector in the Incident Beam Frame: Horizontal Coordinate [13]: Optional: Orientation of the Output Optical Axis vector in the Incident Beam Frame: Vertical Coordinate [14]: Optional: Orientation of the Output Optical Axis vector in the Incident Beam Frame: Longitudinal Coordinate [15]: Optional: Orientation of the Horizontal Base vector of the Output Frame in the Incident Beam Frame: Horizontal Coordinate [16]: Optional: Orientation of the Horizontal Base vector of the Output Frame in the Incident Beam Frame: Vertical Coordinate

Methods

__init__([_arOpt, _arProp])

param _arOpt:

optical element structures list (or array)

allocate(_nElem)

append_drift(_len)

Appends drift space to the end of the Container :param _len: length [m]

get_orient([_e])

get_orient_lab_fr([_e, _r, _v_op_ax])

Returns Cartesian coordinates of all optical elements' center positions and base vectors (t, s, n) :param _e: photon energy [eV] optical scheme shoule be represented for (required for crystals and gratings) :param _r: distance to first optical element (along beam axis) [m] or list of Cartesian coordinates of the center of the first optical element :param _v_op_ax: Cartesian coordinates of the initial beam axis vector in the lab frame [m]

randomize()

Overrides SRWLOpt.randomize(); randomizes parameters of optical elements in the container

set_rand_par(_rand_par)

Sets list of params to be eventually randomized in some types of calculations :param _rand_par: list of params to be randomized; each element of this list should be: ['param_name', val_avg, val_range, meth]

append_drift(_len)[source]#

Appends drift space to the end of the Container :param _len: length [m]

get_orient_lab_fr(_e=0, _r=0, _v_op_ax=[0, 0, 1])[source]#

Returns Cartesian coordinates of all optical elements’ center positions and base vectors (t, s, n) :param _e: photon energy [eV] optical scheme shoule be represented for (required for crystals and gratings) :param _r: distance to first optical element (along beam axis) [m] or list of Cartesian coordinates of the center of the first optical element :param _v_op_ax: Cartesian coordinates of the initial beam axis vector in the lab frame [m]

randomize()[source]#

Overrides SRWLOpt.randomize(); randomizes parameters of optical elements in the container