Skip to content

Commit 8ffb236

Browse files
committed
fixed docstrings for doc build
1 parent 15d134a commit 8ffb236

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

RATapi/examples/non_polarised/DSPC_custom_XY.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77

88
def DSPC_custom_XY():
9-
"""Custom XY Example for Supported DSPC layer.
9+
r"""Custom XY Example for Supported DSPC layer.
1010
1111
In this example, we model the same data (DSPC supported bilayer) as the Custom Layers example, but this time we will
1212
use continuous distributions of the volume fractions of each component to build up the SLD profiles (as described in
@@ -19,15 +19,15 @@ def DSPC_custom_XY():
1919
We can define our lipid in terms of an Area per Molecule, almost in its entirety, if we recognise that where the
2020
volume is known, the thickness of the layer is simply given by the layer volume / APM:
2121
22-
$d_{\textrm{layer}} =\frac{V_{\textrm{layer}} }{{\textrm{APM}}_{\textrm{layer}}}$.
22+
.. math:: d_{\textrm{layer}} =\frac{V_{\textrm{layer}} }{{\textrm{APM}}_{\textrm{layer}}}.
2323
2424
We can then define the Volume Fraction of this layer with a roughened Heaviside of length dlayer and a height of 1.
2525
Then, the total volume occupied will be given by the sum of the volume fractions across the interface. Of course,
2626
this does not permit any hydration, so to deal with this, we can simply scale the (full occupation) Heaviside
2727
functions by relevant coverage parameters. When this is correctly done, we can obtain the remaining water
2828
distribution as:
2929
30-
$${\textrm{VF}}_{\textrm{wat}} =1-\\sum_n {\textrm{VF}}_n$$
30+
.. math:: {\textrm{VF}}_{\textrm{wat}} =1-\\sum_n {\textrm{VF}}_n
3131
3232
where VFn is the Volume Fraction of the n'th layer.
3333
"""

RATapi/models.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,14 @@ class Background(Signal):
9494
The type of background (constant, function or data)
9595
source : str
9696
The source of the background;
97+
9798
- if type is 'constant', this should be the name of a background parameter.
9899
- if type is 'data', this should be the name of a dataset defined in `Project.data`.
99100
- if type is 'function', this should be the name of a custom function defined in `Project.custom_files`.
100-
value_1, value_2, ..., value_5 : str
101+
102+
value_1, value_2, value_3, value_4, value_5 : str
101103
Values required by the background.
104+
102105
- if type is 'constant', all values will be ignored.
103106
- if type is 'data', value_1 may be the parameter name for an optional offset. Other values are ignored.
104107
- if type is 'function', these values may be the names of up to 5 parameters which are passed to the function.
@@ -318,6 +321,8 @@ def set_matlab_function_name(self):
318321
class Data(RATModel, arbitrary_types_allowed=True):
319322
"""A dataset required for a contrast.
320323
324+
Parameters
325+
----------
321326
name : str
322327
The name of this dataset.
323328
data : np.ndarray[np.float64]
@@ -584,12 +589,15 @@ class Resolution(Signal):
584589
The type of resolution: 'constant', 'data', or (NOT YET IMPLEMENTED) 'function'.
585590
source : str
586591
The source data for the resolution;
592+
587593
- if type is 'constant', this should be the name of a background parameter.
588594
- if type is 'data', this should be empty (resolution data is in the contrast data).
589595
- if type is 'function' (NOT YET IMPLEMENTED),
590596
this should be the name of a custom function defined in `Project.custom_files`.
591-
value_1, value_2, ..., value_5 : str
597+
598+
value_1, value_2, value_3, value_4, value_5 : str
592599
Values required by the background.
600+
593601
- if type is 'constant' or 'data', all values will be ignored.
594602
- if type is 'function' (NOT YET IMPLEMENTED),
595603
these values may be the names of up to 5 parameters which are passed to the function.

0 commit comments

Comments
 (0)