|  | 
| 7 | 7 |    "source": [ | 
| 8 | 8 |     "# A multilayer fitting model\n", | 
| 9 | 9 |     "\n", | 
| 10 |  | -    "One of the main tools in `easyreflectometry` is the [assemblies library](../sample/assemblies_library.rst). \n", | 
|  | 10 | +    "One of the main tools in `easyreflectometry` is the [assemblies library](../../sample/assemblies_library.rst). \n", | 
| 11 | 11 |     "This allows the user to define their model, using specific parameters for their system of interest (if it is included in the assemblies library). \n", | 
| 12 | 12 |     "These assemblies will impose necessary constraints and computational efficiencies based on the assembly that is used. \n", | 
| 13 | 13 |     "\n", | 
| 14 |  | -    "In this tutorial, we will look at one of these assemblies, that of a `RepeatingMultilayer` ([documented here](../sample/assemblies_library.rst#repeatingmultilayer)). \n", | 
|  | 14 | +    "In this tutorial, we will look at one of these assemblies, that of a `RepeatingMultilayer` ([documented here](../../sample/assemblies_library.rst#repeatingmultilayer)). \n", | 
| 15 | 15 |     "This tutorial is based on an example from the [BornAgain](https://www.bornagainproject.org) documentation looking at [specular reflectivity analysis](https://www.bornagainproject.org/m/py/fitting/extended/fit-specular-data/). \n", | 
| 16 | 16 |     "Before performing analysis, we should import the packages that we need." | 
| 17 | 17 |    ] | 
|  | 
| 43 | 43 |     "from easyreflectometry.sample import Material\n", | 
| 44 | 44 |     "from easyreflectometry.sample import RepeatingMultilayer\n", | 
| 45 | 45 |     "from easyreflectometry.experiment import Model\n", | 
| 46 |  | -    "from easyreflectometry.experiment import percentage_fhwm_resolution_function\n", | 
|  | 46 | +    "from easyreflectometry.experiment import PercentageFhwm\n", | 
| 47 | 47 |     "from easyreflectometry.calculators import CalculatorFactory\n", | 
| 48 | 48 |     "from easyreflectometry.fitting import Fitter\n", | 
| 49 | 49 |     "from easyreflectometry.plot import plot" | 
|  | 
| 77 | 77 |    "source": [ | 
| 78 | 78 |     "## Reading in experimental data\n", | 
| 79 | 79 |     "\n", | 
| 80 |  | -    "The data that we will investigate in this tutorial was generated with [GenX](https://aglavic.github.io/genx/) and is stored in an `.ort` [format file](https://github.com/reflectivity/file_format/blob/master/specification.md). " | 
|  | 80 | +    "The data that we will investigate in this tutorial was generated with [GenX](https://aglavic.github.io/genx/) and is stored in an `.ort` [format file](https://github.com/reflectivity/file_format/blob/master/specification.md).\n", | 
|  | 81 | +    "Use link to [download](repeating_layers.ort) the ort data." | 
| 81 | 82 |    ] | 
| 82 | 83 |   }, | 
| 83 | 84 |   { | 
|  | 
| 87 | 88 |    "metadata": {}, | 
| 88 | 89 |    "outputs": [], | 
| 89 | 90 |    "source": [ | 
| 90 |  | -    "data = load('_static/repeating_layers.ort')\n", | 
|  | 91 | +    "data = load('repeating_layers.ort')\n", | 
| 91 | 92 |     "data" | 
| 92 | 93 |    ] | 
| 93 | 94 |   }, | 
|  | 
| 121 | 122 |     "We show the model that will be used graphically below. \n", | 
| 122 | 123 |     "\n", | 
| 123 | 124 |     "<center>\n", | 
| 124 |  | -    "    <img src='_static/repeating.png' alt='A slab model description of the repeating multilayer system.' width='300px'></img>\n", | 
|  | 125 | +    "    <img src='repeating.png' alt='A slab model description of the repeating multilayer system.' width='300px'></img>\n", | 
| 125 | 126 |     "</center>\n", | 
| 126 | 127 |     "<center>\n", | 
| 127 | 128 |     "    A slab model description of the repeating multilayer, showing the four layers of vacuum, titanium, nickel and silicon, with the titanium/nickel layers being repeated 10 times.\n", | 
|  | 
| 161 | 162 |    "id": "f63ec440-089f-46cf-8ff5-be5012ad8dc8", | 
| 162 | 163 |    "metadata": {}, | 
| 163 | 164 |    "source": [ | 
| 164 |  | -    "Then, to produce the repeating multilayer, we use the `RepeatingMultilayer` [assembly type](../sample/assemblies_library.rst#RepeatingMultilayer). \n", | 
|  | 165 | +    "Then, to produce the repeating multilayer, we use the `RepeatingMultilayer` [assembly type](../../sample/assemblies_library.rst#RepeatingMultilayer). \n", | 
| 165 | 166 |     "This can be constructed in a range of different ways, however here we pass a list of `Layer` type objects and a number of repetitions. " | 
| 166 | 167 |    ] | 
| 167 | 168 |   }, | 
|  | 
| 191 | 192 |    "metadata": {}, | 
| 192 | 193 |    "outputs": [], | 
| 193 | 194 |    "source": [ | 
| 194 |  | -    "resolution_function = percentage_fhwm_resolution_function(0)\n", | 
|  | 195 | +    "resolution_function = PercentageFhwm(0)\n", | 
| 195 | 196 |     "sample = Sample(superphase, rep_multilayer, subphase, name='Multilayer Structure')\n", | 
| 196 | 197 |     "model = Model(\n", | 
| 197 | 198 |     "    sample=sample,\n", | 
|  | 
0 commit comments