[1]:
import numpy as np
%matplotlib notebook
import matplotlib.pyplot as plt
import matplotlib as mpl
mpl.rcParams['savefig.dpi'] = 300
mpl.rcParams['figure.dpi'] = 150
mpl.rcParams['figure.constrained_layout.use'] = True
Introduction¶
Using geometric optic, the beam path from the horizontal (intermediate horizontal focus) and vertical (exit slit) source to the corners of the zone plate aperture are calculated and then propagated up to the sample and detector plane to determine the beam sizes and position at each plane which are displyed by the calculator both at the same time. The calculation is done for the low energy bound and the high energy bound. The zone plate zero order beam which are unfocused are shown as gray rectangle. The zone plate first order beams which are the one that are focused near the sample position and then expand towards the detector are shown as red rectangles for the low energy bound and blue rectangles for the high energy bound. The zero order of the grating is shown as a darker color than the positive first and negative first order.
Sample plane¶
On the sample plane, the continuous black line correspond to the membrane window while the dashed line correspond to the etching facets. If the thickness of the substrate is too thin, these etching facets will cross each others.
Detector plane¶
The black rectangle corresponds to a single module of the DSSC detector with surface continuously covered with pixels and no gaps present. The 3 beams should be kept within this area. The green rectangles and diamond shape correspond to the masked area by the DSSC filter mount and is used to block the zone plate unfocused zero oder beam which should impinge on it.
Parameters section¶
After the plot comes the parameters section where parameters for the calculation cna be changed and the result seen on the plot after clicking on the Update button.
Source and KBS¶
The horizontal and vertical source size can be defined as well as the focusing condition of the KBS system. Clicking on the Reset button puts back the default values.
Beam splitting Off axis Zone plate¶
The beam splitting off axis zone plate contains many parameters. Chosing an optic listed in the Type will overide most of the parameters by selecting the parameters for an existing zone plate optics. To design a non existing optic, use Custom. The one can chose the design energy of the optics at which we give the horizontal and vertical focal length as well as the off axis component of the zone plate part and the pitch of the grating part. The maximum size of the zone plate can also be defined. In experiment we can reduce the zone plate with the guard stage in the FFT end station. Finally, the energy range on which we want to perform the calculation is given. This will be for example the edges of a XAS spectra we might want to record were we want to make sure the none of the beam willbe clipped by the sample apertures as we change the photon energy.
Sample¶
The sample can be either an array of etched membrane or a liquid jet placed at a certain sample Z distance from the nominal interaction point. The sample can be moved in the plane using offset and also turned. If the sample is turned and the zone plate focus is within the sample the calculated beam shape will not be correct.
Detector¶
The detector can be placed at various distance from the nominal interaction point and displaced laterally.
Spot sizes and spot centers¶
Two table give the spot size at the sample position for the low and high energy bound of the calculation, for zone plate zero order F0 which is unfocused by the zone plate but still focused by the KBS and the zone plate first order F1. In each case, the positive first G1, zero G0 and negative first G-1 grating order are also given. In addition, two additional tables provides the beam centers such that the distances between beam can be quickly calculated.
[2]:
from BOZcalc.BOZcalc import BOZcalc
c = BOZcalc()
Beam transport¶
In the cell below we show how the zone plate first order, grating zeroth order propagates from the source to the KBS to the zone plate optics, past the sample position indicated by the gray dashed line and finally to the detector. The EuXFEL coordinates are used with z the beam propagation direction, y the vertical direction and x the horizontal direction.
After changing parameters in the widget above and clicking on the Update button, one can reprocess the cell below again to update the plots.
The inset plots show the zoomed region around the sample.
[4]:
f = c.geo_beams.plot(c.confL, c.confH)
[6]:
f.savefig('geo_beams.png', dpi=300)
[ ]: