diff --git a/source/advanced/resampling.rst b/source/advanced/resampling.rst index 4d460d4bb..fd495f42a 100644 --- a/source/advanced/resampling.rst +++ b/source/advanced/resampling.rst @@ -4,7 +4,7 @@ Profile Resampling ('microslicing') =================================== -The Nevot-Croce roughness approximation only strictly holds for cases where the interface roughness is much less than the layer thickness. The usual way +The `Nevot-Croce roughness approximation `_ only strictly holds for cases where the interface roughness is much less than the layer thickness. The usual way of handling cases where this approximation does not hold is to split the interfaces into a large number of layers of zero roughness, so that the roughness problem is circumvented: diff --git a/source/conf.py b/source/conf.py index 5907b5b88..5e001041d 100644 --- a/source/conf.py +++ b/source/conf.py @@ -110,6 +110,9 @@ html_theme = 'pydata_sphinx_theme' bgcolor = 'white' +# Add switch which numerates figures and allows numeric references to them +numfig = True + # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". diff --git a/source/images/tutorial/LipidMonolayerAndParameters.png b/source/images/tutorial/LipidMonolayerAndParameters.png new file mode 100644 index 000000000..812dfc361 Binary files /dev/null and b/source/images/tutorial/LipidMonolayerAndParameters.png differ diff --git a/source/images/tutorial/lipidMonolayer.png b/source/images/tutorial/LipidMonolayerAndProperties.pptx similarity index 86% rename from source/images/tutorial/lipidMonolayer.png rename to source/images/tutorial/LipidMonolayerAndProperties.pptx index 7e47d6e29..12868a949 100644 Binary files a/source/images/tutorial/lipidMonolayer.png and b/source/images/tutorial/LipidMonolayerAndProperties.pptx differ diff --git a/source/tutorial/customModels.rst b/source/tutorial/customModels.rst index 3ea42ccde..156a97776 100644 --- a/source/tutorial/customModels.rst +++ b/source/tutorial/customModels.rst @@ -144,7 +144,7 @@ First, we add our seven parameters (remember that Substrate Roughness is always .. code-block:: Python - parameters = [['Oxide thick', 5.0, 20.0, 60.0, True], + pGroup = [['Oxide thick', 5.0, 20.0, 60.0, True], ['Oxide Hydration', 0, 0.2, 0.5, True], ['Lipid APM', 45.0, 55.0, 65.0, True], ['Head Hydration', 0, 0.2, 0.5, True], @@ -541,7 +541,7 @@ In other words, the entire purpose of our custom layer file is to take our param (e.g. Area per Lipid in our case), and to translate these into a list of :math:`[d, \rho, \sigma]` layers for the whole interface. You have complete freedom in how you do this, which means that you can make any kind of layer model you can think of using a custom layers file, including layers that are mixtures of adjoining layers and so on. As long as you can describe your -system as layers with an error function (i.e. Nevot-Croce) roughness you can describe them using custom layer modelling. +system as layers with an error function (i.e. `Nevot-Croce `_) roughness you can describe them using custom layer modelling. The rest of the custom model is defined similar to the standard layers model shown in :ref:`project`. So, since we want to analyse three contrasts simultaneously, we need the following: @@ -741,7 +741,7 @@ In these cases, a second type of custom model can be used, where instead of the it builds a continuous SLD profile, which is then automatically microsliced by RAT to calculate the reflectivity. This gives a high degree of flexibility for the type of model that can be generated. -As before, the custom model can be defined in MATLAB, Python, or C++; for the purpose of this tutorial we will just use MATLAB. +As before, the custom model can be defined in MATLAB, Python, or C++; for the purpose of this tutorial we will just use MATLAB and Python. The inputs into custom XY are the same as for Custom Layers, but the output is now always an [n x 2] array defining a continuous SLD: diff --git a/source/tutorial/introduction.rst b/source/tutorial/introduction.rst index 1d4552ce6..a380e72b3 100644 --- a/source/tutorial/introduction.rst +++ b/source/tutorial/introduction.rst @@ -86,14 +86,15 @@ heads which are adjacent (or embedded) in the bulk aqueous phase. In our example, the layers can be either deuterated or hydrogenated, and the bulk water can either be D2O or ACMW. -.. image:: ../images/tutorial/lipidMonolayer.png - :width: 300 - :alt: The lipid monolayer example - -We are going to analyze our monolayer data using a standard `slab model `_. -In this model, we approximate our experimental model as a series of layers with a known thickness, roughness, SLD and hydration. -The way that this is represented in the RAT model definition is by a list of **Parameter** objects which represent a given quantity (such as a thickness or SLD), -and then a list of **Layer** objects which group together these parameters to describe each layer. Layers are then grouped together in a **Contrast** object which +.. _LipidMonolayerWithPar: +.. figure:: ../images/tutorial/LipidMonolayerAndParameters.png + + Lipid Monolayer alongside with slab model parameters used in reflectivity calculations. Air/substrate case. + +We are going to analyse our monolayer data using a standard `slab model `_. +In this model, we approximate our experimental model as a series of layers with a known thickness, roughness, SLD and hydration which modifies SLD. +The way that this is represented in the RAT model definition is by a list of **Parameter** objects which represent a given quantity (such as a thickness or hydration or SLD directly), +and then a list of **Layer** objects which group together these parameters to describe each layer. (See :numref:`LipidMonolayerWithPar` above) Layers are then grouped together in a **Contrast** object which describes the slab model and matches it up to the experimental data to which the model will be compared. In this project we have two contrasts representing two slab models (one for our deuterated experiment, one for our hydrogenated experiment). diff --git a/source/tutorial/project.rst b/source/tutorial/project.rst index f19e1df6e..922b2c9b5 100644 --- a/source/tutorial/project.rst +++ b/source/tutorial/project.rst @@ -61,6 +61,7 @@ then for the ``"substrate/liquid"`` geometry the substrate roughness is placed a and the layer roughness values refer to the interface after the particular layer. But in the ``"air/substrate"`` case, the opposite is true, and the substrate roughness is the last roughness in the stack, with the layer roughness referring to the interface before each layer. +This is the case, represented on the :numref:`LipidMonolayerWithPar`. * **Model Type**: There are three ways of defining models in RAT: