Changeset 5110
- Timestamp:
- Dec 6, 2021 4:56:47 PM (2 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIImapvars.py
r5104 r5110 373 373 374 374 The output from :func:`ProcessConstraints` will have the form as below, 375 where the first entry is a "Const" , the second is a "New Var" and the final is a "Hold".375 where the first entry is a "Const" and the second is a "New Var". 376 376 377 377 .. code-block:: python … … 379 379 constrDict = [ 380 380 {'0:12:Scale': 2.0, '0:14:Scale': 4.0, '0:13:Scale': 3.0, '0:0:Scale': 0.5}, 381 {'2::C(10,6,1)': 1.0, '1::C(10,6,1)': 1.0, '_vary':True}, 382 {'0::A0': 0.0}] 383 fixedList = ['5.0', None, '0'] 381 {'2::C(10,6,1)': 1.0, '1::C(10,6,1)': 1.0, '_vary':True}] 382 fixedList = ['5.0', None] 384 383 385 384 .. _GenerateConstraints: … … 1729 1728 1730 1729 def SubfromParmDict(s,prmDict): 1730 '''Process a string as a multiplier and convert it to a float value. This 1731 is done by subsituting any GSAS-II parameter names that appear in the 1732 string that have associated values in the parameter dict with the value 1733 for that parameter. 1734 1735 :param str s: a string to be converted to a value 1736 :param dict prmDict: a dictionary with keys as GSAS-II parameter names 1737 and values the corresponding parameter value. 1738 :returns: the evaluated expression as a float. 1739 ''' 1740 # TODO: perhaps SubfromParmDict should be called to convert the 1741 # fixed-val in constraint equations from strings to values. 1731 1742 for key in prmDict: 1732 1743 if key in s: -
trunk/GSASIIobj.py
r5104 r5110 76 76 77 77 * <mult> is a multiplier for the constraint (float) 78 * <var> a :class:`G2VarObj` object (previously a str variable name of form 79 'p:h:name[:at]') 78 * <var> a :class:`G2VarObj` object. (Note that in very old .gpx files this might be a str with a variable name of form 'p:h:name[:at]') 80 79 81 80 Note that the last three items in the list play a special role:
Note: See TracChangeset
for help on using the changeset viewer.