Changeset 2847


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

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

Location:
trunk
Files:
3 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)
  • trunk/GSASIIstrMain.py

    r2846 r2847  
    100100            covMatrix = result[1]*Rvals['GOF']**2
    101101            sig = np.sqrt(np.diag(covMatrix))
    102             if np.any(np.isnan(sig)):
     102            if np.any(np.isnan(sig)) or not sig.shape:
    103103                print '*** Least squares aborted - some invalid esds possible ***'
    104104#            table = dict(zip(varyList,zip(values,result[0],(result[0]-values)/sig)))
  • trunk/imports/G2img_1TIF.py

    r2835 r2847  
    2424import numpy as np
    2525import time
    26 DEBUG = True
     26DEBUG = False
    2727GSASIIpath.SetVersionNumber("$Revision$")
    2828class TIF_ReaderClass(G2obj.ImportImage):
Note: See TracChangeset for help on using the changeset viewer.