pysrw.lib.srwlib.srwl_wfr_emit_prop_multi_e#
- pysrw.lib.srwlib.srwl_wfr_emit_prop_multi_e(_e_beam, _mag, _mesh, _sr_meth, _sr_rel_prec, _n_part_tot, _n_part_avg_proc=1, _n_save_per=100, _file_path=None, _sr_samp_fact=-1, _opt_bl=None, _pres_ang=0, _char=0, _x0=0, _y0=0, _e_ph_integ=0, _rand_meth=1, _tryToUseMPI=True, _wr=0.0, _wre=0.0, _det=None, _me_approx=0, _file_bkp=False, _rand_opt=False, _file_form='ascii', _n_mpi=1, _n_cm=1000, _ms=0, _del_aux_files=False)[source]#
Calculate Stokes Parameters of Emitted (and Propagated, if beamline is defined) Partially-Coherent SR. :param _e_beam: Finite-Emittance e-beam (SRWLPartBeam type) :param _mag: Magnetic Field container (magFldCnt type) or Coherent Gaussian beam (SRWLGsnBm type) or Point Source (SRWLPtSrc type) or list of Coherent Modes (of SRWLWfr type each) :param _mesh: mesh vs photon energy, horizontal and vertical positions (SRWLRadMesh type) on which initial SR should be calculated :param _sr_meth: SR Electric Field calculation method to be used: 0- “manual”, 1- “auto-undulator”, 2- “auto-wiggler” :param _sr_rel_prec: relative precision for SR Electric Field calculation (usually 0.01 is OK, the smaller the more accurate) :param _n_part_tot: total number of “macro-electrons” to be used in the calculation :param _n_part_avg_proc: number of “macro-electrons” to be used in calculation at each “slave” before sending Stokes data to “master” (effective if the calculation is run via MPI) :param _n_save_per: periodicity of saving intermediate average Stokes data to file by master process :param _file_path: path to file for saving intermediate average Stokes data by master process :param _sr_samp_fact: oversampling factor for calculating of initial wavefront for subsequent propagation (effective if >0) :param _opt_bl: optical beamline (container) to propagate the radiation through (SRWLOptC type) :param _pres_ang: switch specifying presentation of the resulting Stokes parameters: coordinate (0) or angular (1) or both (2, to implement !!!) :param _char: radiation characteristic to calculate:
0- Total Intensity, i.e. Flux per Unit Surface Area (s0); 1- Four Stokes components of Flux per Unit Surface Area; 2- Mutual Intensity Cut (2D) vs X; 3- Mutual Intensity Cut (2D) vs Y; 4- Mutual Intensity and Degree of Coherence Cuts (2D) vs X & Y; 5- Degree of Coherence Cuts (2D) vs X & Y; 6- Mutual Intensity / Cross-Spectral Density (4D) vs X & Y; 61- Coherent Modes (array of 2D distributions of Electric Field vs X & Y) and Mutual Intensity / Cross-Spectral Density (4D) vs X & Y it is based on; 7- Coherent Modes (array of 2D distributions of Electric Field vs X & Y); 10- Flux 11- Four Stokes components of Flux (?) 20- Electric Field (sum of fields from all macro-electrons, assuming CSR) 40- Total Intensity, i.e. Flux per Unit Surface Area (s0), Mutual Intensity and Degree of Coherence Cuts vs X & Y; 41- Total Intensity, i.e. Flux per Unit Surface Area (s0) and Degree of Coherence Cuts vs X & Y;
- Parameters:
_x0 – horizontal center position for mutual intensity calculation
_y0 – vertical center position for mutual intensity calculation
_e_ph_integ – integration over photon energy is required (1) or not (0); if the integration is required, the limits are taken from _mesh
_rand_meth – method for generation of pseudo-random numbers for e-beam phase-space integration: 1- standard pseudo-random number generator 2- Halton sequences 3- LPtau sequences (to be implemented)
_tryToUseMPI – switch specifying whether MPI should be attempted to be used
_wr – initial wavefront radius [m] to assume at wavefront propagation (is taken into account if != 0)
_wre – initial wavefront radius error [m] to assume at wavefront propagation (is taken into account if != 0)
_det – detector object for post-processing of final intensity (instance of SRWLDet)
_me_approx – approximation to be used at multi-electron integration: 0- none (i.e. do standard M-C integration over 5D phase space volume of e-beam), 1- integrate numerically only over e-beam energy spread and use convolution to treat transverse emittance
_file_bkp – create or not backup files with resulting multi-electron radiation characteristics
_rand_opt – randomize parameters of optical elements at each fully-coherent wavefront propagation (e.g. to simulate impact of vibrations) or not
_file_form – format of output files (‘ascii’ / ‘asc’ and ‘hdf5’ supported)
_n_mpi – number of independent “groups” of MPI processes (for 4D CSD calculation)
_n_cm – number of coherent modes to calculate (is taken into account if _char==61 or _char==7)
_ms – index of the first wavefront / coherent mode to start computation
_del_aux_files – delete (or not) auxiliary files (applies to different types of calculations)