55< head >
66 < meta charset ="utf-8 " />
77 < meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
8- < title > diffpy.pdffit2.pdffit — diffpy.pdffit2 1.5.2rc1 documentation</ title >
8+ < title > diffpy.pdffit2.pdffit — diffpy.pdffit2 1.6.0rc0 documentation</ title >
99 < link rel ="stylesheet " type ="text/css " href ="../../../_static/pygments.css?v=03e43079 " />
10- < link rel ="stylesheet " type ="text/css " href ="../../../_static/css/theme.css?v=e59714d7 " />
10+ < link rel ="stylesheet " type ="text/css " href ="../../../_static/css/theme.css?v=9edc463e " />
1111 < link rel ="stylesheet " type ="text/css " href ="../../../_static/copybutton.css?v=76b2166b " />
1212
1313
1414 < script src ="../../../_static/jquery.js?v=5d32c60e "> </ script >
1515 < script src ="../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c "> </ script >
16- < script src ="../../../_static/documentation_options.js?v=8b88ec56 "> </ script >
17- < script src ="../../../_static/doctools.js?v=9bcbadda "> </ script >
18- < script src ="../../../_static/sphinx_highlight.js?v=dc90522c "> </ script >
16+ < script src ="../../../_static/documentation_options.js?v=1d834b09 "> </ script >
17+ < script src ="../../../_static/doctools.js?v=fd6eb6e6 "> </ script >
18+ < script src ="../../../_static/sphinx_highlight.js?v=6ffebe34 "> </ script >
1919 < script src ="../../../_static/clipboard.min.js?v=a7894cd8 "> </ script >
2020 < script src ="../../../_static/copybutton.js?v=cca77546 "> </ script >
2121 < script src ="../../../_static/js/theme.js "> </ script >
@@ -306,8 +306,7 @@ <h1>Source code for diffpy.pdffit2.pdffit</h1><div class="highlight"><pre>
306306
307307< span class ="sd "> data -- name of file from which to read data</ span >
308308< span class ="sd "> stype -- 'X' (xray) or 'N' (neutron)</ span >
309- < span class ="sd "> qmax -- Q-value cutoff used in PDF calculation.</ span >
310- < span class ="sd "> Use qmax=0 to neglect termination ripples.</ span >
309+ < span class ="sd "> qmax -- Q-value cutoff used in PDF calculation. Use qmax=0 to neglect termination ripples.</ span >
311310< span class ="sd "> qdamp -- instrumental Q-resolution factor</ span >
312311
313312< span class ="sd "> Raises: IOError when the file cannot be read from disk</ span >
@@ -325,8 +324,7 @@ <h1>Source code for diffpy.pdffit2.pdffit</h1><div class="highlight"><pre>
325324
326325< span class ="sd "> data -- string containing the contents of the data file</ span >
327326< span class ="sd "> stype -- 'X' (xray) or 'N' (neutron)</ span >
328- < span class ="sd "> qmax -- Q-value cutoff used in PDF calculation.</ span >
329- < span class ="sd "> Use qmax=0 to neglect termination ripples.</ span >
327+ < span class ="sd "> qmax -- Q-value cutoff used in PDF calculation. Use qmax=0 to neglect termination ripples.</ span >
330328< span class ="sd "> qdamp -- instrumental Q-resolution factor</ span >
331329< span class ="sd "> name -- tag with which to label data</ span >
332330< span class ="sd "> """</ span >
@@ -348,8 +346,7 @@ <h1>Source code for diffpy.pdffit2.pdffit</h1><div class="highlight"><pre>
348346
349347< span class ="sd "> All lists must be of the same length.</ span >
350348< span class ="sd "> stype -- 'X' (xray) or 'N' (neutron)</ span >
351- < span class ="sd "> qmax -- Q-value cutoff used in PDF calculation.</ span >
352- < span class ="sd "> Use qmax=0 to neglect termination ripples.</ span >
349+ < span class ="sd "> qmax -- Q-value cutoff used in PDF calculation. Use qmax=0 to neglect termination ripples.</ span >
353350< span class ="sd "> qdamp -- instrumental Q-resolution factor</ span >
354351< span class ="sd "> r_data -- list of r-values</ span >
355352< span class ="sd "> Gr_data -- list of G(r) values</ span >
@@ -405,9 +402,9 @@ <h1>Source code for diffpy.pdffit2.pdffit</h1><div class="highlight"><pre>
405402
406403< span class ="sd "> The structure from which to calculate the PDF must first be imported</ span >
407404< span class ="sd "> with the read_struct() or read_struct_string() method.</ span >
405+
408406< span class ="sd "> stype -- 'X' (xray) or 'N' (neutron)</ span >
409- < span class ="sd "> qmax -- Q-value cutoff used in PDF calculation.</ span >
410- < span class ="sd "> Use qmax=0 to neglect termination ripples.</ span >
407+ < span class ="sd "> qmax -- Q-value cutoff used in PDF calculation. Use qmax=0 to neglect termination ripples.</ span >
411408< span class ="sd "> qdamp -- instrumental Q-resolution factor</ span >
412409< span class ="sd "> rmin -- minimum r-value of calculation</ span >
413410< span class ="sd "> rmax -- maximum r-value of calculation</ span >
@@ -643,24 +640,29 @@ <h1>Source code for diffpy.pdffit2.pdffit</h1><div class="highlight"><pre>
643640< span class ="w "> </ span > < span class ="sd "> """Constrain(var, par[, fcon]) --> Constrain a variable to a parameter.</ span >
644641
645642< span class ="sd "> A variable can be constrained to a number or equation string.</ span >
646- < span class ="sd "> var -- variable to constrain, such as x(1)</ span >
647- < span class ="sd "> par -- parameter which to constrain the variable. This can be</ span >
648- < span class ="sd "> an integer or an equation string containing a reference</ span >
649- < span class ="sd "> to another parameter. Equation strings use standard c++</ span >
650- < span class ="sd "> syntax. The value of a constrained parameter is accessed</ span >
651- < span class ="sd "> as @p in an equation string, where p is the parameter.</ span >
652- < span class ="sd "> e.g.</ span >
653- < span class ="sd "> >>> constrain(x(1), 1)</ span >
654- < span class ="sd "> >>> constrain(x(2), "0.5+@1")</ span >
655- < span class ="sd "> fcon -- 'USER', 'IDENT', 'FCOMP', or 'FSQR'</ span >
656- < span class ="sd "> this is an optional parameter, and I don't know how it is</ span >
657- < span class ="sd "> used!</ span >
658643
659- < span class ="sd "> Raises:</ span >
660- < span class ="sd "> pdffit2.constraintError if a constraint is bad</ span >
661- < span class ="sd "> pdffit2.unassignedError if variable does not yet exist</ span >
662- < span class ="sd "> ValueError if variable index does not exist (e.g. lat(7))</ span >
644+ < span class ="sd "> :param var: variable to constrain, such as x(1)</ span >
645+ < span class ="sd "> :param par: parameter which to constrain the variable. This can be an</ span >
646+ < span class ="sd "> integer or an equation string containing a reference to</ span >
647+ < span class ="sd "> another parameter. Equation strings use standard C++</ span >
648+ < span class ="sd "> syntax. The value of a constrained parameter is accessed</ span >
649+ < span class ="sd "> as ``@p`` in an equation string, where ``p`` is the</ span >
650+ < span class ="sd "> parameter.</ span >
651+ < span class ="sd "> :type par: int or str</ span >
652+ < span class ="sd "> :param fcon: 'USER', 'IDENT', 'FCOMP', or 'FSQR'. This is an optional</ span >
653+ < span class ="sd "> parameter; usage is currently unclear.</ span >
654+ < span class ="sd "> :type fcon: str</ span >
655+
656+ < span class ="sd "> Example::</ span >
657+
658+ < span class ="sd "> >>> constrain(x(1), 1)</ span >
659+ < span class ="sd "> >>> constrain(x(2), "0.5+@1")</ span >
660+
661+ < span class ="sd "> :raises pdffit2.constraintError: if a constraint is bad</ span >
662+ < span class ="sd "> :raises pdffit2.unassignedError: if variable does not yet exist</ span >
663+ < span class ="sd "> :raises ValueError: if variable index does not exist (e.g. lat(7))</ span >
663664< span class ="sd "> """</ span >
665+
664666 < span class ="n "> var_ref</ span > < span class ="o "> =</ span > < span class ="bp "> self</ span > < span class ="o "> .</ span > < span class ="n "> __getRef</ span > < span class ="p "> (</ span > < span class ="n "> var</ span > < span class ="p "> )</ span >
665667 < span class ="n "> varnc</ span > < span class ="o "> =</ span > < span class ="n "> _convertCallable</ span > < span class ="p "> (</ span > < span class ="n "> var</ span > < span class ="p "> )</ span >
666668 < span class ="k "> if</ span > < span class ="n "> fcon</ span > < span class ="p "> :</ span >
@@ -1666,7 +1668,7 @@ <h1>Source code for diffpy.pdffit2.pdffit</h1><div class="highlight"><pre>
16661668 < hr />
16671669
16681670 < div role ="contentinfo ">
1669- < p > © Copyright 2025 , The Trustees of Columbia University in the City of New York.</ p >
1671+ < p > © Copyright 2026 , The Trustees of Columbia University in the City of New York.</ p >
16701672 </ div >
16711673
16721674 Built with < a href ="https://www.sphinx-doc.org/ "> Sphinx</ a > using a
0 commit comments