{% extends "base.html" %} {% block title %}How the multilayer search works · Web docs{% endblock %} {% macro shot(file, alt, caption) %}
{{ alt }}
{{ caption }}
{% endmacro %} {% block body %}
← Multilayer gratings guide

Multilayer gratings

How it works

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.

New multilayer grating

The question: which angle is best?

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 three steps

  1. Rough scan. The search starts from the angle predicted by the multilayer's Bragg condition. For a grating this estimate is usually a little off, so a wide window around it is scanned (about ±1.5°). The numerics are coarse, with few Fourier orders and a coarse mesh. This step only has to locate roughly where the efficiency peaks.
  2. Fine scan. The best angle of the rough scan becomes the centre of a much narrower window (about ±0.2°) with more points. The numerics are more accurate, with more Fourier orders and a finer mesh. The peak position is taken either as the plain maximum of the curve, or from a Gaussian or Voigt fit to it.
  3. Final calculation. One simulation is run at the angle chosen by the fine scan, with the most accurate settings: the highest Fourier order and the finest mesh. Its result is the efficiency reported for that design.
{{ shot('multilayer-theta-scan.png', 'Rough and precise theta scans with the selected peak', 'The scans for one design at 9158 eV. The rough scan (blue circles) covers a wide window; the precise scan (orange squares) samples the peak densely; the red star is the selected peak, which the final calculation then evaluates.') }}

Where the search runs

The same search is used in both stages of a study:

What the survey produces

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.') }}
{{ shot('multilayer-optimal-blaze.png', 'Optimal blaze angle versus d-spacing', 'The optimal blaze angle at each d-spacing.') }} {{ shot('multilayer-max-efficiency.png', 'Maximum efficiency versus d-spacing', 'The efficiency reached at that optimum, with its blaze angle as label.') }}

What the energy scan produces

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.') }}
{{ shot('multilayer-profile.png', 'Grating profile and material map over three periods', 'The grating profile and material map of the design.') }} {{ shot('multilayer-stack.png', 'Multilayer stack schematic', 'The multilayer stack on the substrate.') }}

Inspecting every scan: the Diagnostics button

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.

Why results can look noisy

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.

{% endblock %}