PhenomSourceCalculator
[2]:
from SimExLite.SourceCalculators import PhenomSourceCalculator
import h5py as h5
Construct Calculator
[3]:
psc = PhenomSourceCalculator("psc",)
print(psc.parameters)
- Parameters object -
range_x [-0.00025 0.00025] [meter] The spacial mesh range in x direction. [start, end]
num_x 500 Number of mesh points in x direction.
range_y [-0.00025 0.00025] [meter] The spacial mesh range in y direction. [start, end]
num_y 500 Number of mesh points in y direction.
range_t [-2.5e-14 2.5e-14] [second] The temporal range. [start, end]
num_t 250 Number of mesh points in t direction.
photon_energy 10000.0 [electron_volt] The photon energy of X-ray beam.
pulse_energy 0.0001 [joule] Total energy of the pulse
pulse_duration 1.5e-14 [second] The length of a pulse
spectral_bandwidth 0.001 The bandwith of the beam spectrum (\delta E/E)
sigma 5e-05 sigma value
div 0.0025 div value
[4]:
output = psc.backengine()
print(output)
Data collection:
key - mapping
Phenom_wavefront - <class 'SimExLite.WavefrontData.WPGFormat.WPGFormat'>: PhenomSourceCalculator/wavefront.h5
Plot output
[5]:
from wpg.wavefront import Wavefront
from wpg.wpg_uti_wf import plot_intensity_map,plot_t_wf
from wpg.srw import srwlpy
wfr = Wavefront()
wfr.load_hdf5(output["Phenom_wavefront"].filename)
srwlpy.SetRepresElecField(wfr._srwl_wf, 'time')
[5]:
<wpg.srw.srwlib.SRWLWfr at 0x2b9de32f3eb0>
[6]:
plot_t_wf(wfr)
number of meaningful slices: 229
Pulse energy 1.6e-10 J
R-space
(500,) (500,)
FWHM in x = 8.400e-05 m.
FWHM in y = 8.400e-05 m.