| 1 |
+++ |
| 2 |
title = "Beam Angular Spread" |
| 3 |
weight = 60 |
| 4 |
+++ |
| 5 |
|
| 6 |
### Beam Angular Spread in Specular Simulations |
| 7 |
|
| 8 |
This example demonstrates beam angular spread effects in reflectivity computations. |
| 9 |
It also offers a comparison with data generated using another well known code: GenX. |
| 10 |
Further information about reflectometry simulations can be found in the |
| 11 |
[Reflectometry Simulation Tutorial](/ref/sim/class/specular). |
| 12 |
|
| 13 |
The observed reflectometry signal can be affected either by a spread in the beam wavelength or in the incident angle. |
| 14 |
|
| 15 |
{{< galleryscg >}} |
| 16 |
{{< figscg src="/img/auto/specular/VsGenx.png" width="500px" caption="Scattering intensity">}} |
| 17 |
{{< /galleryscg >}} |
| 18 |
|
| 19 |
In this example, a Gaussian distribution is used to spread the incident angle, with a standard deviation of $\sigma_{\alpha} = 0.01^{\circ}$. |
| 20 |
|
| 21 |
#### Running the example |
| 22 |
|
| 23 |
This example requires the reference data file |
| 24 |
{{% ref-src "testdata/specular/genx_angular_divergence.dat.gz" %}} |
| 25 |
from the BornAgain repository. |
| 26 |
|
| 27 |
The environment variable `BA_DATA_DIR` must point to the `testdata/` directory. |
| 28 |
From the build directory, run: |
| 29 |
```bash |
| 30 |
BA_DATA_DIR=../testdata python3 ../auto/Examples/specular/VsGenx.py |
| 31 |
``` |
| 32 |
|
| 33 |
{{< show-ex file="specular/VsGenx.py" >}} |