Changeset 953 for trunk/GSASIImath.py


Ignore:
Timestamp:
Jun 18, 2013 1:59:47 PM (9 years ago)
Author:
vondreele
Message:

fixes to RB refinement & MC/SA

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIImath.py

    r952 r953  
    23162316        if dlg:
    23172317            GoOn = dlg.Update(best_state.cost*100,
    2318                 newmsg='%s%8.3f\n%s%8.3f%s'%('Temperature =',schedule.T,'MC/SA Residual =',best_state.cost*100,'%'))[0]
     2318                newmsg='%s%8.5f\n%s%8.4f%s'%('Temperature =',schedule.T,'MC/SA Residual =',best_state.cost*100,'%'))[0]
    23192319            if not GoOn:
    23202320                break
     
    24802480                if parmDict[pfx+'MolCent'][1]:
    24812481                    Cart -= parmDict[pfx+'MolCent'][0]
    2482                 Qori = np.array([parmDict[pfx+'Qa'],parmDict[pfx+'Qi'],parmDict[pfx+'Qj'],parmDict[pfx+'Qk']])
     2482                Qori = normQ(np.array([parmDict[pfx+'Qa'],parmDict[pfx+'Qi'],parmDict[pfx+'Qj'],parmDict[pfx+'Qk']]))
    24832483                Pos = np.array([parmDict[pfx+'Px'],parmDict[pfx+'Py'],parmDict[pfx+'Pz']])
    24842484                for i,x in enumerate(Cart):
     
    26912691    D[2] = QA[0]*QB[2]-QA[1]*QB[3]+QA[2]*QB[0]+QA[3]*QB[1]
    26922692    D[3] = QA[0]*QB[3]+QA[1]*QB[2]-QA[2]*QB[1]+QA[3]*QB[0]
     2693   
     2694#    D[0] = QA[0]*QB[0]-np.dot(QA[1:],QB[1:])
     2695#    D[1:] = QA[0]*QB[1:]+QB[0]*QA[1:]+np.cross(QA[1:],QB[1:])
     2696   
    26932697    return D
    26942698   
Note: See TracChangeset for help on using the changeset viewer.