Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev to v1.0.2 #166

Merged
merged 9 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/src/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
'sphinx.ext.imgmath',
'sphinx.ext.mathjax',
'sphinx_autodoc_typehints',
'sphinx_copybutton',
'nbsphinx',
'myst_parser'
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
"source": [
"# A multilayer fitting model\n",
"\n",
"One of the main tools in `easyreflectometry` is the [assemblies library](../sample/assemblies_library.rst). \n",
"One of the main tools in `easyreflectometry` is the [assemblies library](../../sample/assemblies_library.rst). \n",
"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",
"These assemblies will impose necessary constraints and computational efficiencies based on the assembly that is used. \n",
"\n",
"In this tutorial, we will look at one of these assemblies, that of a `RepeatingMultilayer` ([documented here](../sample/assemblies_library.rst#repeatingmultilayer)). \n",
"In this tutorial, we will look at one of these assemblies, that of a `RepeatingMultilayer` ([documented here](../../sample/assemblies_library.rst#repeatingmultilayer)). \n",
"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",
"Before performing analysis, we should import the packages that we need."
]
Expand Down Expand Up @@ -43,7 +43,7 @@
"from easyreflectometry.sample import Material\n",
"from easyreflectometry.sample import RepeatingMultilayer\n",
"from easyreflectometry.experiment import Model\n",
"from easyreflectometry.experiment import percentage_fhwm_resolution_function\n",
"from easyreflectometry.experiment import PercentageFhwm\n",
"from easyreflectometry.calculators import CalculatorFactory\n",
"from easyreflectometry.fitting import Fitter\n",
"from easyreflectometry.plot import plot"
Expand Down Expand Up @@ -77,7 +77,8 @@
"source": [
"## Reading in experimental data\n",
"\n",
"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). "
"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",
"Use link to [download](repeating_layers.ort) the ort data."
]
},
{
Expand All @@ -87,7 +88,7 @@
"metadata": {},
"outputs": [],
"source": [
"data = load('_static/repeating_layers.ort')\n",
"data = load('repeating_layers.ort')\n",
"data"
]
},
Expand Down Expand Up @@ -121,7 +122,7 @@
"We show the model that will be used graphically below. \n",
"\n",
"<center>\n",
" <img src='_static/repeating.png' alt='A slab model description of the repeating multilayer system.' width='300px'></img>\n",
" <img src='repeating.png' alt='A slab model description of the repeating multilayer system.' width='300px'></img>\n",
"</center>\n",
"<center>\n",
" 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",
Expand Down Expand Up @@ -161,7 +162,7 @@
"id": "f63ec440-089f-46cf-8ff5-be5012ad8dc8",
"metadata": {},
"source": [
"Then, to produce the repeating multilayer, we use the `RepeatingMultilayer` [assembly type](../sample/assemblies_library.rst#RepeatingMultilayer). \n",
"Then, to produce the repeating multilayer, we use the `RepeatingMultilayer` [assembly type](../../sample/assemblies_library.rst#RepeatingMultilayer). \n",
"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. "
]
},
Expand Down Expand Up @@ -191,7 +192,7 @@
"metadata": {},
"outputs": [],
"source": [
"resolution_function = percentage_fhwm_resolution_function(0)\n",
"resolution_function = PercentageFhwm(0)\n",
"sample = Sample(superphase, rep_multilayer, subphase, name='Multilayer Structure')\n",
"model = Model(\n",
" sample=sample,\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"from easyreflectometry.sample import Material\n",
"from easyreflectometry.sample import Multilayer\n",
"from easyreflectometry.experiment import Model\n",
"from easyreflectometry.experiment import percentage_fhwm_resolution_function\n",
"from easyreflectometry.experiment import PercentageFhwm\n",
"from easyreflectometry.calculators import CalculatorFactory\n",
"from easyreflectometry.fitting import Fitter\n",
"from easyreflectometry.plot import plot"
Expand Down Expand Up @@ -69,8 +69,9 @@
"source": [
"## Reading in experimental data\n",
"\n",
"`easyreflectometry` has support for the `.ort` file format, a [standard file format for reduced reflectivity data developed by the Open Reflectometry Standards Organisation](https://www.reflectometry.org/working_groups/file_formats/). \n",
"To load in a dataset, we use the `load` function. "
"`easyreflectometry` has support for the `.ort` file format, a [standard file format for reduced reflectivity data developed by the Open Reflectometry Standards Organisation](https://www.reflectometry.org/working_groups/file_formats/).\n",
"To load in a dataset, we use the `load` function.\n",
"Use link to [download](example.ort) the ort data."
]
},
{
Expand All @@ -80,7 +81,7 @@
"metadata": {},
"outputs": [],
"source": [
"data = load('_static/example.ort')"
"data = load('example.ort')"
]
},
{
Expand Down Expand Up @@ -136,7 +137,7 @@
"This is shown pictorially below, as a slab model. \n",
"\n",
"<center>\n",
" <img src='_static/polymer_film.png' alt='A slab model description of the polymer film system.' width='300px'></img>\n",
" <img src='polymer_film.png' alt='A slab model description of the polymer film system.' width='300px'></img>\n",
"</center>\n",
"<center>\n",
" A slab model description of the polymer film system (note that the layers are <b>not</b> to scale), showing the four layers of silicon, silicon dioxide, the polymer film and the heavy water subphase.\n",
Expand Down Expand Up @@ -221,7 +222,7 @@
"id": "7247fc52-6874-47eb-a234-c7bb7db229fd",
"metadata": {},
"source": [
"Given that the silicon and silicon dioxide layer both compose the solid subphase, it can be helpful to combine these as a `Multilayer` [assembly type](../sample/assemblies_library.rst#multilayer) in our code. "
"Given that the silicon and silicon dioxide layer both compose the solid subphase, it can be helpful to combine these as a `Multilayer` [assembly type](../../sample/assemblies_library.rst#multilayer) in our code. "
]
},
{
Expand All @@ -239,7 +240,7 @@
"id": "a3a2df9b-8ddb-4b3e-a5c3-55b72280b651",
"metadata": {},
"source": [
"These objects are then combined as a `Sample`, where the constructor takes a series of layers (or some more complex `easyreflectometry` [assemblies](../sample/assemblies_library.rst)) and, optionally, some name for the sample."
"These objects are then combined as a `Sample`, where the constructor takes a series of layers (or some more complex `easyreflectometry` [assemblies](../../sample/assemblies_library.rst)) and, optionally, some name for the sample."
]
},
{
Expand Down Expand Up @@ -297,7 +298,7 @@
"metadata": {},
"outputs": [],
"source": [
"resolution_function = percentage_fhwm_resolution_function(0.02)\n",
"resolution_function = PercentageFhwm(0.02)\n",
"model = Model(\n",
" sample=sample,\n",
" scale=1,\n",
Expand Down
Loading
Loading