Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
7c3d0f8
Re #50 Updated readme with modern guidelines on how to build docs
abuts Aug 6, 2025
5fd3bf7
Re #50 minor comment on what RAT-python builds process does
abuts Aug 7, 2025
710c56b
Re #50 minor -- thought about build reformulated
abuts Aug 7, 2025
7dfdddb
Re #50 Minor typo and syntax in README.md
abuts Aug 7, 2025
8e706fe
Re #50 changes from review.
abuts Aug 12, 2025
bb032af
Re #50 change python-RAT to RAT-doc
abuts Aug 12, 2025
0d650ac
Re #50 small typo with e.g. not noticed before
abuts Aug 12, 2025
bdae542
Re #50 typo in code blocks
abuts Aug 12, 2025
c66c257
Re #50 minor typos
abuts Aug 12, 2025
e1d933f
Re #50 minor changes from review and typos
abuts Aug 13, 2025
58f1213
Re #50 minor typo
abuts Aug 13, 2025
bc08182
Re #50 Modified LipidMonolayers image containing input parameters
abuts Aug 22, 2025
f1e0996
Re #50 Trying to add capture to image. Does not work yet
abuts Aug 22, 2025
826371f
Re #50 Add image source PowerPoint file for possible simple future mo…
abuts Aug 22, 2025
505c2a6
Re #50 minor changes and improvements to the picture
abuts Aug 22, 2025
91eccc1
Re #50 better picture definition and couple of references to it
abuts Aug 27, 2025
bd68628
Re #50 Typo in parameters code?
abuts Aug 27, 2025
3e9328a
Re #50 cross-referring Nevot-Croce term
abuts Aug 27, 2025
32c10d1
Re #50 Better reference to Nevot-Croche
abuts Sep 3, 2025
6de641d
Re #50 minor comments
abuts Sep 4, 2025
d40eec8
Merge branch 'main' into 50_beginners_changes
abuts Sep 4, 2025
be38bfd
Re #50 correct comment about resampling
abuts Sep 8, 2025
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
2 changes: 1 addition & 1 deletion source/advanced/resampling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://www.reflectometry.org/learn/3_reflectometry_slab_models/roughness_and_microslicing.html>`_ 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:

Expand Down
3 changes: 3 additions & 0 deletions source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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".
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
6 changes: 3 additions & 3 deletions source/tutorial/customModels.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down Expand Up @@ -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 <https://www.reflectometry.org/learn/3_reflectometry_slab_models/roughness_and_microslicing.html>`_) 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:
Expand Down Expand Up @@ -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:

Expand Down
17 changes: 9 additions & 8 deletions source/tutorial/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://www.reflectometry.org/learn/3_reflectometry_slab_models/the_slab_model.html>`_.
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 <https://www.reflectometry.org/learn/3_reflectometry_slab_models/the_slab_model.html>`_.
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).

Expand Down
1 change: 1 addition & 0 deletions source/tutorial/project.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down