Multilayer gratings
How a study finds the best incidence angle for every design, and what the plots it produces show. The figures come from a Ru/C study with order 2.
For each grating design the study needs the incidence angle that gives the highest diffraction efficiency in the chosen order. The rigorous solver is too expensive to test every angle at full accuracy, so the search narrows in three steps. Each step is more accurate than the one before and covers a smaller angle range.
The same search is used in both stages of a study:
Each survey cell contributes its best efficiency, and the study page summarizes the grid in three plots.
{{ shot('multilayer-heatmap.png', 'Heatmap of peak efficiency over d-spacing and blaze angle', 'Peak efficiency over the (d-spacing, blaze angle) grid. The white line follows the best blaze angle at each d-spacing; click a cell on the study page to add that design to the energy scan.') }}Every scanned design gets one search per energy. The left panel below shows the final efficiency of each energy; the right panel shows the rough scan, fine scan and selected peak of the first energy as a worked example of the search.
{{ shot('multilayer-workflow.png', 'Final results versus energy next to the first-energy theta scan', 'Final theta-search results (left) and the diagnostics of the first energy (right).') }} {{ shot('multilayer-energy-scan.png', 'Efficiency versus energy for one design', 'Selected-order efficiency of a single design versus photon energy.') }}Once the survey or the energy scan has finished, the study page has a Diagnostics button. It opens a folder browser over the stored results where Plot all theta searches in this folder overlays every scan behind each reported point. You can show precise scans, rough scans or both; step through the scans one by one; and switch off a scan and its selected peak together from the legend. If a fit was chosen instead of the maximum, check here how well it follows the curve.
If efficiency curves show small jumps that no physical edge explains, the likely cause is the peak selection rather than the physics. By default the peak after the fine scan is the plain maximum. That is the most robust method and essentially never fails, but the result depends on how fine and how precise the computation is: the x/z resolution and the number of Fourier orders. The defaults are deliberately modest so that studies run on any machine, which gives reasonable results on a grid that is not very fine.
For smoother curves, raise the resolution and the number of Fourier orders in the study's advanced scan settings, and consider a fit instead of the maximum.
Fits are experimental. The Gaussian and Voigt options do not yet work reliably on every curve, so they may give poor positions or fail. Use them with Diagnostics open to check the result.