Changeset 1160 for trunk/GSASII.py
- Timestamp:
- Nov 28, 2013 9:16:02 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASII.py
r1147 r1160 2603 2603 def MakeLSParmDict(self): 2604 2604 '''Load all parameters used for computation from the tree into a 2605 dict 2605 dict of paired values [value, refine flag]. Note that this is 2606 different than the parmDict used in the refinement, which only has 2607 values. 2606 2608 2607 2609 :returns: (parmDict,varyList) where: … … 2646 2648 ''' 2647 2649 parmDict,varyList = self.MakeLSParmDict() 2648 dlg = G2gd.ShowLSParms(self,'Least Squares Parameters',parmDict,varyList) 2650 parmValDict = {} 2651 for i in parmDict: 2652 parmValDict[i] = parmDict[i][0] 2653 2654 reqVaryList = tuple(varyList) # save requested variables 2655 try: 2656 # process constraints 2657 sub = G2gd.GetPatternTreeItemId(self,self.root,'Constraints') 2658 Constraints = self.PatternTree.GetItemPyData(sub) 2659 constList = [] 2660 for item in Constraints: 2661 if item.startswith('_'): continue 2662 constList += Constraints[item] 2663 G2mv.InitVars() 2664 constrDict,fixedList,ignored = G2stIO.ProcessConstraints(constList) 2665 groups,parmlist = G2mv.GroupConstraints(constrDict) 2666 G2mv.GenerateConstraints(groups,parmlist,varyList,constrDict,fixedList) 2667 G2mv.Map2Dict(parmValDict,varyList) 2668 except: 2669 pass 2670 dlg = G2gd.ShowLSParms(self,'Least Squares Parameters',parmValDict,varyList,reqVaryList) 2649 2671 dlg.ShowModal() 2650 2672 dlg.Destroy()
Note: See TracChangeset
for help on using the changeset viewer.