| 1 |
+++ |
| 2 |
title = "Find background" |
| 3 |
weight = 30 |
| 4 |
+++ |
| 5 |
|
| 6 |
## Find background |
| 7 |
|
| 8 |
This example demonstrates how to introduce a background in the simulation and fit its value. |
| 9 |
Here we are simulating cylinders on top of a substrate without interference. |
| 10 |
The function `get_simulation` requires 4 parameters: |
| 11 |
|
| 12 |
+ the height of the cylinders |
| 13 |
+ the radius of the cylinders |
| 14 |
+ the value of the constant background |
| 15 |
+ a scale factor for the beam's intensity |
| 16 |
|
| 17 |
The radius and height of the cylinders are passed to the function constructing the multi layer |
| 18 |
while the scale and background values are used to initialize the instrument. |
| 19 |
|
| 20 |
{{< show-ex file="fit/scatter2d/find_background.py" >}} |