Changeset 3579


Ignore:
Timestamp:
Aug 31, 2018 12:18:07 PM (5 years ago)
Author:
vondreele
Message:

fix transformation error for mag cells
disable formation of magnetic constraints - really needed?
fix SVD bug when a linAlg error occurs

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIlattice.py

    r3568 r3579  
    334334        newPhase['Draw Atoms'] = []
    335335    for atom in newAtoms:
    336         atom[cx:cx+3] = TransformXYZ(atom[cx:cx+3]-Uvec,invTrans.T,Vvec)%1.
     336        atom[cx:cx+3] = TransformXYZ(atom[cx:cx+3]-Uvec,invTrans,Vvec)%1.
    337337        if atom[cia] == 'A':
    338338            atom[cia+2:cia+8] = TransformU6(atom[cia+2:cia+8],Trans)
  • trunk/GSASIIphsGUI.py

    r3578 r3579  
    24952495        G2frame.GPXtree.SetItemPyData(sub,newPhase)
    24962496        newPhase['Drawing'] = []
    2497         G2cnstG.TransConstraints(G2frame,data,newPhase,magchoice['Trans'],vvec,atCodes)     #data is old phase
     2497#        G2cnstG.TransConstraints(G2frame,data,newPhase,magchoice['Trans'],vvec,atCodes)     #data is old phase
    24982498        G2frame.newGPXfile = phaseName+'.gpx'
    24992499        G2frame.OnFileSaveas(event)
  • trunk/GSASIIpwdGUI.py

    r3577 r3579  
    30693069        Cell = Phase['General']['Cell']
    30703070        SGData = Phase['General']['SGData']
     3071        SpGrp = SGData['SpGrp']
    30713072        if 'mono' in SGData['SGSys']:
    3072             SpGrp = G2spc.fixMono(SGData['SpGrp'])
     3073            SpGrp = G2spc.fixMono(SpGrp)
    30733074            if SpGrp == None:
    30743075                wx.MessageBox('Unusable space group',caption='Monoclinic '+SGData['SpGrp']+' not usable here',style=wx.ICON_EXCLAMATION)
     
    34453446                phase['Name'] = result[0].strip()
    34463447                phase['Uvec'] = np.array(numbs[3::4])
    3447                 phase['Trans'] = np.array([numbs[:3],numbs[4:7],numbs[8:11]])
    3448                 phase['Cell'] = G2lat.TransformCell(controls[6:12],phase['Trans'].T)   
     3448                phase['Trans'] = np.array([numbs[:3],numbs[4:7],numbs[8:11]]).T         #Bilbao gives transpose
     3449                phase['Cell'] = G2lat.TransformCell(controls[6:12],phase['Trans'])   
    34493450                phase['Keep'] = False
    34503451                phase['Use'] = False
  • trunk/GSASIIstrMain.py

    r3471 r3579  
    9292            result = G2mth.HessianSVD(G2stMth.errRefine,values,Hess=G2stMth.HessRefine,ftol=Ftol,xtol=Xtol,maxcyc=maxCyc,Print=ifPrint,
    9393                args=([Histograms,Phases,restraintDict,rigidbodyDict],parmDict,varyList,calcControls,pawleyLookup,dlg))
     94            if result[1] is None:
     95                IfOK = False
     96                covMatrix = []
     97                sig = len(varyList)*[None,]
     98                break
    9499            ncyc = result[2]['num cyc']+1
    95100        else:           #'numeric'
     
    147152            print ('**** Refinement failed - singular matrix ****')
    148153            if 'Hessian' in Controls['deriv type']:
     154                if result[1] is None:
     155                    IfOK = False
     156                    covMatrix = []
     157                    sig = len(varyList)*[None,]
     158                    break
    149159                num = len(varyList)-1
    150160                for i,val in enumerate(np.flipud(result[2]['psing'])):
Note: See TracChangeset for help on using the changeset viewer.