Changeset 1160 for trunk/GSASII.py


Ignore:
Timestamp:
Nov 28, 2013 9:16:02 PM (9 years ago)
Author:
toby
Message:

finish ISODISPLACE fixes; improve show var window; improve help window; add refine checkbox for newvars in constraints display

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r1147 r1160  
    26032603    def MakeLSParmDict(self):
    26042604        '''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.
    26062608
    26072609        :returns: (parmDict,varyList) where:
     
    26462648        '''
    26472649        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)
    26492671        dlg.ShowModal()
    26502672        dlg.Destroy()
Note: See TracChangeset for help on using the changeset viewer.