@@ -22,7 +22,7 @@ a structure. For example, the ``DiffpyStructureParSet`` structure adapter in
2222``diffpy.srfit.structure.diffpyparset`` contains ``DiffpyLatticeParSet``, which
2323encapsulates the lattice data and one ``DiffpyAtomParSet`` per atom. These
2424each contain parameters for what they encapsulate, such as lattice parameters
25- or atom positions.
25+ or atom positions.
2626
2727Fundamentally, it is the adjustable parameters of a structure container,
2828forward calculator or other object that needs to be adapted so that SrFit can
@@ -46,7 +46,7 @@ to another object when setting or retrieving its value.
4646
4747
4848Here is a simple example of using ``ParameterAdapter`` to adapt a hypothetical
49- atom object called ``SimpleAtom`` that has attributes ``x``, ``y`` and ``z``.
49+ atom object called ``SimpleAtom`` that has attributes ``x``, ``y`` and ``z``.
5050::
5151
5252 class SimpleAtom(object):
@@ -61,7 +61,7 @@ atom object called ``SimpleAtom`` that has attributes ``x``, ``y`` and ``z``.
6161 # End class SimpleAtom
6262
6363 class SimpleAtomParSet(ParameterSet):
64- """Class adapting the x, y and z attributes of SimpleAtom as Parameters."""
64+ """Class adapting the x, y and z attributes of SimpleAtom as Parameters."""
6565
6666 def __init__(self, atom, name):
6767 ParameterSet.__init__(self, name)
@@ -86,25 +86,25 @@ The ``x``, ``y`` and ``z`` attributes (specified by the ``attr`` keyword
8686argument of ``ParameterAdapter``) of a ``SimpleAtom`` are wrapped as
8787``ParameterAdapter`` objects named `x`, `y`, and `z`. They are then added to
8888the ``SimpleAtomParSet`` using the ``addParameter`` method, which makes them
89- accessible as attributes.
89+ accessible as attributes.
9090
9191If SimpleAtom did not have an attribute named ``x``, but rather accessor
9292methods named ``getX`` and ``setX``, then the ``ParameterAdapter`` would be
9393used as::
9494
95- xpar = ParameterAdapter("x", atom, getter = SimpleAtom.getX,
95+ xpar = ParameterAdapter("x", atom, getter = SimpleAtom.getX,
9696 setter = SimpleAtom.setX)
9797
9898Note that the *unbound* methods are used. The names ``getter`` and ``setter``
9999describe how the accessor attributes are used to access the value of the
100100parameter. When ``xpar.getValue()`` is called, it redirects to
101- ``SimpleAtom.getX(atom)``.
101+ ``SimpleAtom.getX(atom)``.
102102
103103If instead ``SimpleAtom`` had methods called ``get`` and ``set`` that take as
104104the second argument the name of the attribute to retrieve or modify, then this
105105can be adapted as::
106106
107- xpar = ParameterAdapter("x", atom, getter = SimpleAtom.get,
107+ xpar = ParameterAdapter("x", atom, getter = SimpleAtom.get,
108108 setter = SimpleAtom.set, attr = "x")
109109
110110Thus, when ``xpar.getValue()`` is called, it in turn calls
@@ -190,7 +190,7 @@ arrays when their corresponding attributes are modified. This keeps the arrays
190190in sync.
191191
192192
193- Custom Restraints
193+ Custom Restraints
194194----------------------------------------
195195
196196Restraints in SrFit are one way to include known information about a system
@@ -223,7 +223,7 @@ and calculated BVS of a structure.
223223
224224Note that the penalty scaling is optional (selected by the `scaled` flag) and
225225uncertainty on the result (`sig`) may be applied. These two options are
226- recommended with any custom ``Restraint``.
226+ recommended with any custom ``Restraint``.
227227
228228The second part of a custom restraint is to allow it to be created from a
229229restrainable object. A ``BVSRestraint`` is used to restrain a ``SrRealParSet``,
0 commit comments