Ignore:
Timestamp:
Aug 25, 2019 11:06:49 PM (4 years ago)
Author:
toby
Message:

move GetPhaseData? inside histogram loop so sym constraints are generated in SeqRef?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIstrMain.py

    r4021 r4111  
    209209    rbIds = rigidbodyDict.get('RBIds',{'Vector':[],'Residue':[]})
    210210    rbVary,rbDict = G2stIO.GetRigidBodyModels(rigidbodyDict,pFile=printFile)
    211     Natoms,atomIndx,phaseVary,phaseDict,pawleyLookup,FFtables,BLtables,MFtables,maxSSwave = \
    212         G2stIO.GetPhaseData(Phases,restraintDict,rbIds,pFile=printFile)
     211    (Natoms,atomIndx,phaseVary,phaseDict,pawleyLookup,FFtables,BLtables,MFtables,
     212         maxSSwave) = G2stIO.GetPhaseData(Phases,restraintDict,rbIds,pFile=printFile)
    213213    calcControls['atomIndx'] = atomIndx
    214214    calcControls['Natoms'] = Natoms
     
    237237    try:
    238238        G2mv.GenerateConstraints(varyList,constrDict,fixedList,parmDict)
    239         #print G2mv.VarRemapShow(varyList)
    240         #print 'DependentVars',G2mv.GetDependentVars()
    241         #print 'IndependentVars',G2mv.GetIndependentVars()
     239        #print(G2mv.VarRemapShow(varyList))
     240        #print('DependentVars',G2mv.GetDependentVars())
     241        #print('IndependentVars',G2mv.GetIndependentVars())
    242242    except G2mv.ConstraintException:
    243243        G2fil.G2Print (' *** ERROR - your constraints are internally inconsistent ***')
     
    349349    rbIds = rigidbodyDict.get('RBIds',{'Vector':[],'Residue':[]})
    350350    rbVary,rbDict = G2stIO.GetRigidBodyModels(rigidbodyDict,pFile=printFile)
    351     Natoms,atomIndx,phaseVary,phaseDict,pawleyLookup,FFtables,BLtables,MFtables,maxSSwave = \
    352         G2stIO.GetPhaseData(Phases,restraintDict,rbIds,False,printFile,seqRef=True)
     351    G2mv.InitVars()
     352    (Natoms,atomIndx,phaseVary,phaseDict,pawleyLookup,FFtables,BLtables,MFtables,
     353         maxSSwave) = G2stIO.GetPhaseData(Phases,restraintDict,rbIds,
     354                                    Print=False,pFile=printFile,seqRef=True)
    353355    for item in phaseVary:
    354356        if '::A0' in item:
     
    375377        if GSASIIpath.GetConfigValue('Show_timing'): t1 = time.time()
    376378        G2fil.G2Print('\nRefining with '+str(histogram))
     379        G2mv.InitVars()
     380        #print('before load',{i:phaseDict[i] for i in phaseDict if 'Ax:2' in i})
     381        (Natoms,atomIndx,phaseVary,phaseDict,pawleyLookup,
     382             FFtables,BLtables,MFtables,maxSSwave) = G2stIO.GetPhaseData(
     383                 Phases,restraintDict,rbIds,
     384                 Print=False,pFile=printFile,seqRef=True)
     385        #print('before fit ',{i:phaseDict[i] for i in phaseDict if 'Ax:2' in i})
    377386        ifPrint = False
    378387        if dlg:
     
    423432        # do constraint processing
    424433        #reload(G2mv) # debug
    425         G2mv.InitVars()
    426434        constrDict,fixedList = G2stIO.GetConstraints(GPXfile)
    427435        varyListStart = tuple(varyList) # save the original varyList before dependent vars are removed
     
    433441#            if GSASIIpath.GetConfigValue('debug'): print("DBG_"+
    434442#                G2mv.VarRemapShow(varyList,True))
     443#            print('DependentVars',G2mv.GetDependentVars())
     444#            print('IndependentVars',G2mv.GetIndependentVars())
    435445            constraintInfo = (groups,parmlist,constrDict,fixedList,ihst)
    436446        except G2mv.ConstraintException:
     
    534544#            G2fil.G2Print (' ***** Refinement aborted *****')
    535545#            return False,Msg.msg
     546        #print('after fit',{i:parmDict[i] for i in parmDict if 'Ax:2' in i})
    536547        if GSASIIpath.GetConfigValue('Show_timing'):
    537548            t2 = time.time()
Note: See TracChangeset for help on using the changeset viewer.