Footprint correction

The footprint effect originates from the angle-dependent intersection of a finite beam with a finite sample. It should be considered for all scanning simulations.

When taking into account footprint correction, there are two possible options for the beam shape in BornAgain:

  • Square beam — the beam has sharp edges and square cross-section, its intensity is uniformly distributed.
  • Gaussian beam — the beam is infinite in space, while its intensity has Gaussian distribution along the radius of the beam.

The footprint correction for square beam is defined by FootprintSquare command, which has the signature

<footprint_object> = FootprintSquare(beam_to_sample_width_ratio)

Here <footprint_object> is an object later passed to the simulation, while beam_to_sample_width_ratio defines the ratio between the widths of beam and sample.

In the case of the Gaussian beam the footprint object is created with

<footprint_object> = FootprintGauss(beam_to_sample_width_ratio)

The command signature is exactly the same as in the case with the square beam, but the beam width required for beam_to_sample_width_ratio is now defined as the beam diameter associated with the intensity level equal to $I_0 \cdot e^{-\frac{1}{2}}$, where $I_0$ is the on-axis (maximal) intensity.

In this example a square beam is considered, with beam_to_sample_width_ratio being equal to $0.01$. The incident angle range was made rather small in this example (from $0.0$ to $0.6$ degrees) in order to emphasize the footprint impact at small incident angles. In other respects this example exactly matches the reflectometry simulation tutorial.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env python3
"""
Specular simulation with footprint correction for a square beam

"""
from matplotlib import pyplot as plt
import bornagain as ba
from bornagain import angstrom, ba_plot as bp, deg, std_samples

sample = std_samples.alternating_layers()


def simulate(footprint, title):
    n = 500
    scan = ba.AlphaScan(n, 0.6*deg/n, 0.6*deg)
    scan.setWavelength(1.54*angstrom)
    scan.setFootprint(footprint)
    simulation = ba.SpecularSimulation(scan, sample)

    result = simulation.simulate()
    result.setTitle(title)
    return result


if __name__ == '__main__':
    bp.parse_args(legendloc='lower left')

    beam_sample_ratio = 0.01  # beam-to-sample size ratio

    results = [
        simulate(ba.FootprintSquare(beam_sample_ratio), "With footprint"),
        simulate(None, "Without footprint"),
    ]

    bp.plot_multicurve_specular(results)
auto/Examples/specular/FootprintCorrection.py