Changeset 2853


Ignore:
Timestamp:
Jun 2, 2017 8:44:14 PM (4 years ago)
Author:
vondreele
Message:

remove a 'exposed' test print statement
add a print of SVD zeros found for each change in lambda in LS
change orientation for rigid body display to inv(quaternion)

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIctrls.py

    r2842 r2853  
    232232            if self.IsExpanded(item): self.ExposedItems.append(name)
    233233            item, cookie = self.GetNextChild(self.root, cookie)
    234         print 'exposed:',self.ExposedItems
     234#        print 'exposed:',self.ExposedItems
    235235
    236236    def RestoreExposedItems(self):
  • trunk/GSASIImath.py

    r2847 r2853  
    170170        chisq0 = np.sum(M**2)
    171171        Yvec,Amat = Hess(x0,*args)
     172#        print 'unscaled SVD zeros',pinv(Amat)[1]
    172173        Adiag = np.sqrt(np.diag(Amat))
    173174        psing = np.where(np.abs(Adiag) < 1.e-14,True,False)
     
    183184            Amatlam = Amat*(One+Lam)
    184185            try:
    185                 Ainv = pinv(Amatlam,xtol)[0]    #do Moore-Penrose inversion (via SVD)
     186                Ainv,Nzeros = pinv(Amatlam,xtol)    #do Moore-Penrose inversion (via SVD)
     187#                Ainv = nl.inv(Amatlam); Nzeros = 0
    186188            except nl.LinAlgError:
    187189                print 'ouch #1 bad SVD inversion; change parameterization'
     
    196198                lam *= 10.
    197199                if Print:
    198                     print 'new chi^2 %.5g; matrix modification needed; lambda now %.1e'%(chisq1,lam)
     200                    print 'new chi^2 %.5g, %d SVD zeros ; matrix modification needed; lambda now %.1e'%(chisq1,Nzeros,lam)
    199201            else:
    200202                x0 += Xvec
     
    224226        Bmat,Nzero = pinv(Amatlam,xtol)    #Moore-Penrose inversion (via SVD) & count of zeros
    225227        print 'Found %d SVD zeros'%(Nzero)
     228#        Bmat = nl.inv(Amatlam); Nzeros = 0
    226229        Bmat = Bmat/Anorm
    227230        return [x0,Bmat,{'num cyc':icycle,'fvec':M,'nfev':nfev,'lamMax':lamMax,'psing':[], 'Converged': ifConverged, 'DelChi2':deltaChi2}]
  • trunk/GSASIIphsGUI.py

    r2843 r2853  
    61436143            rbObj = data['RBModels']['Residue'][rbId]
    61446144            data['Drawing']['viewPoint'][0] = rbObj['Orig'][0]
    6145             data['Drawing']['Quaternion'] = rbObj['Orient'][0]
     6145            Quad = rbObj['Orient'][0]
     6146            data['Drawing']['Quaternion'] = G2mth.invQ(Quad)
    61466147            G2frame.bottomSizer =  ResrbSizer(rbObj)
    61476148            mainSizer.Add(G2frame.bottomSizer)
Note: See TracChangeset for help on using the changeset viewer.