Changeset 2847 for trunk/GSASIImath.py


Ignore:
Timestamp:
May 31, 2017 11:13:41 AM (5 years ago)
Author:
vondreele
Message:

turn off debug in TIF reader
provide better(?) trap for LinAlgErrors? from SVD

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIImath.py

    r2846 r2847  
    184184            try:
    185185                Ainv = pinv(Amatlam,xtol)[0]    #do Moore-Penrose inversion (via SVD)
    186                 Xvec = np.inner(Ainv,Yvec)      #solve
    187186            except nl.LinAlgError:
    188                 print 'ouch #1'
     187                print 'ouch #1 bad SVD inversion; change parameterization'
    189188                psing = list(np.where(np.diag(nl.qr(Amatlam)[1]) < 1.e-14)[0])
    190189                return [x0,None,{'num cyc':icycle,'fvec':M,'nfev':nfev,'lamMax':lamMax,'psing':psing}]
     190            Xvec = np.inner(Ainv,Yvec)      #solve
    191191            Xvec /= Adiag
    192192            M2 = func(x0+Xvec,*args)
Note: See TracChangeset for help on using the changeset viewer.