Skip to content

Commit 4cce16c

Browse files
committed
Synced with the source at 57386fd.
1 parent 89fa682 commit 4cce16c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+643
-791
lines changed

.buildinfo

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: 5a37574f6da4dfff2a38854b169a55e3
4-
tags: fbb0d17656682115ca4d033fb2f83ba1
3+
config: 7f5e562834d02689a6b10fd7ac918255
4+
tags: 645f666f9bcd5a90fca523b33c5a78b7

_sources/extending.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ a structure. For example, the ``DiffpyStructureParSet`` structure adapter in
2222
``diffpy.srfit.structure.diffpyparset`` contains ``DiffpyLatticeParSet``, which
2323
encapsulates the lattice data and one ``DiffpyAtomParSet`` per atom. These
2424
each contain parameters for what they encapsulate, such as lattice parameters
25-
or atom positions.
25+
or atom positions.
2626

2727
Fundamentally, it is the adjustable parameters of a structure container,
2828
forward 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

4848
Here 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
8686
argument of ``ParameterAdapter``) of a ``SimpleAtom`` are wrapped as
8787
``ParameterAdapter`` objects named `x`, `y`, and `z`. They are then added to
8888
the ``SimpleAtomParSet`` using the ``addParameter`` method, which makes them
89-
accessible as attributes.
89+
accessible as attributes.
9090

9191
If SimpleAtom did not have an attribute named ``x``, but rather accessor
9292
methods named ``getX`` and ``setX``, then the ``ParameterAdapter`` would be
9393
used as::
9494

95-
xpar = ParameterAdapter("x", atom, getter = SimpleAtom.getX,
95+
xpar = ParameterAdapter("x", atom, getter = SimpleAtom.getX,
9696
setter = SimpleAtom.setX)
9797

9898
Note that the *unbound* methods are used. The names ``getter`` and ``setter``
9999
describe how the accessor attributes are used to access the value of the
100100
parameter. When ``xpar.getValue()`` is called, it redirects to
101-
``SimpleAtom.getX(atom)``.
101+
``SimpleAtom.getX(atom)``.
102102

103103
If instead ``SimpleAtom`` had methods called ``get`` and ``set`` that take as
104104
the second argument the name of the attribute to retrieve or modify, then this
105105
can 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

110110
Thus, when ``xpar.getValue()`` is called, it in turn calls
@@ -190,7 +190,7 @@ arrays when their corresponding attributes are modified. This keeps the arrays
190190
in sync.
191191

192192

193-
Custom Restraints
193+
Custom Restraints
194194
----------------------------------------
195195

196196
Restraints in SrFit are one way to include known information about a system
@@ -223,7 +223,7 @@ and calculated BVS of a structure.
223223

224224
Note that the penalty scaling is optional (selected by the `scaled` flag) and
225225
uncertainty on the result (`sig`) may be applied. These two options are
226-
recommended with any custom ``Restraint``.
226+
recommended with any custom ``Restraint``.
227227

228228
The second part of a custom restraint is to allow it to be created from a
229229
restrainable object. A ``BVSRestraint`` is used to restrain a ``SrRealParSet``,

_sources/intro.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ database structure to aid post analysis. We will also support CIF input and
3838
output of structure models. SrFit will support user-specified analytic math
3939
functions and numerical algorithms for rapid prototyping of new ideas. A
4040
contingent item will be to support experimental feedback to the
41-
data-acquisition system.
41+
data-acquisition system.
4242

4343
Features
4444
-----------
@@ -71,7 +71,7 @@ Major changes since last release
7171
* Various interface changes.
7272

7373
* pdfnpgenerator module renamed debyepdfgenerator.
74-
* nanoformfactors module renamed characteristicfunctions.
74+
* nanoformfactors module renamed characteristicfunctions.
7575
* Form factors renamed from xyzFF to xyzCF.
7676
* Structure adapters renamed for clarification. The monikers "Structure" and
7777
"stru" are reserved for structure representations from outside of SrFit

_static/basic.css

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Sphinx stylesheet -- basic theme.
66
*
7-
* :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
7+
* :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS.
88
* :license: BSD, see LICENSE for details.
99
*
1010
*/
@@ -89,6 +89,7 @@ div.sphinxsidebar #searchbox input[type="submit"] {
8989

9090
img {
9191
border: 0;
92+
max-width: 100%;
9293
}
9394

9495
/* -- search page ----------------------------------------------------------- */
@@ -401,10 +402,6 @@ dl.glossary dt {
401402
margin: 0;
402403
}
403404

404-
.refcount {
405-
color: #060;
406-
}
407-
408405
.optional {
409406
font-size: 1.3em;
410407
}

_static/default.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Sphinx stylesheet -- default theme.
66
*
7-
* :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
7+
* :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS.
88
* :license: BSD, see LICENSE for details.
99
*
1010
*/

_static/doctools.js

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Sphinx JavaScript utilities for all documentation.
66
*
7-
* :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
7+
* :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS.
88
* :license: BSD, see LICENSE for details.
99
*
1010
*/
@@ -32,7 +32,7 @@ if (!window.console || !console.firebug) {
3232
*/
3333
jQuery.urldecode = function(x) {
3434
return decodeURIComponent(x).replace(/\+/g, ' ');
35-
}
35+
};
3636

3737
/**
3838
* small helper function to urlencode strings
@@ -61,18 +61,6 @@ jQuery.getQueryParameters = function(s) {
6161
return result;
6262
};
6363

64-
/**
65-
* small function to check if an array contains
66-
* a given item.
67-
*/
68-
jQuery.contains = function(arr, item) {
69-
for (var i = 0; i < arr.length; i++) {
70-
if (arr[i] == item)
71-
return true;
72-
}
73-
return false;
74-
};
75-
7664
/**
7765
* highlight a given string on a jquery object by wrapping it in
7866
* span elements with the given class name.
@@ -180,6 +168,9 @@ var Documentation = {
180168
var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
181169
if (terms.length) {
182170
var body = $('div.body');
171+
if (!body.length) {
172+
body = $('body');
173+
}
183174
window.setTimeout(function() {
184175
$.each(terms, function() {
185176
body.highlightText(this.toLowerCase(), 'highlighted');

0 commit comments

Comments
 (0)