| 1 |
+++ |
| 2 |
title = "TOF resolution" |
| 3 |
weight = 30 |
| 4 |
+++ |
| 5 |
|
| 6 |
## Resolution effects in TOF Reflectometry |
| 7 |
|
| 8 |
In the following reflectometry example, each scan point has a distribution of $q_z$ values. |
| 9 |
|
| 10 |
The constructor |
| 11 |
```python |
| 12 |
ba.DistributionGaussian(0., 1., 25, 2.) |
| 13 |
``` |
| 14 |
specifies a Gaussian distribution with mean 0, standard deviation 1, |
| 15 |
25 sampling points, and a cut-off at 2 sigma. For other distributions (besides Gaussian), |
| 16 |
see [distributions](/ref/other/distributions). |
| 17 |
|
| 18 |
The statements |
| 19 |
```python |
| 20 |
scan = ba.QzScan(qzs) |
| 21 |
scan.setVectorResolution(distr, dq) |
| 22 |
``` |
| 23 |
take arrays `qzs` and `dq` as arguments. These arrays must have the same length `n`. |
| 24 |
For each scan point (i=0,..,n-1), the $q_z$ values have a Gaussian distribution with |
| 25 |
mean `qzs[i]` and `dq[i]`. |
| 26 |
|
| 27 |
{{< galleryscg >}} |
| 28 |
{{< figscg src="/img/auto/specular/TimeOfFlightReflectometry.png" width="350px" caption="TOF simulation without resolution effects" >}} |
| 29 |
{{< figscg src="/img/auto/specular/TOFRWithResolution.png" width="350px" caption="TOF simulation with $dq = 0.03\,q$" >}} |
| 30 |
{{< /galleryscg >}} |
| 31 |
|
| 32 |
|
| 33 |
{{< show-ex file="specular/TOFRWithResolution.py" >}} |