Energy-Dependent XEFI#
XEFI also possesses the ability to calculate electric field intensity maps for a range of energies, which is particularly useful for understanding how the intensity changes near absorption edges. This is done by supplying a list of energies to the energies argument in the model generator method, and ensuring that the refractive indices supplied are either complex numbers or callables that can return complex refractive indices for each energy supplied.
In this example, we use energies rather than angles as the variable parameter. However, it is worth noting that XEFI has the capability to calculate the electric field intensity for any combination of variable parameters, such as angles and energies simultaneously, by supplying lists of values for both arguments.
Calculating a map#
Using the same geometry and setup as in Basic Model Tutorial, we setup the result to cover the Sulfur K-edge (~2474 eV):
beam_energies = np.linspace(2300, 2900, 1000) # in eV
angle = 0.55 # Single angle of incidence in degrees, past the critical for all layers.
r = [20, 40, 10] # Roughness values for each interface in Å
result = XEFI.XEF_Basic(
energies=beam_energies,
angles=angle,
z=z,
z_roughness=r,
refractive_indices=refractive_indices,
)
fig, ax = result.generate_graphic_XEFI_map(z_vals=np.linspace(0, -800, 1000))
(Source code, png, hires.png, pdf)