Changeset 530 for trunk/GSASIImath.py


Ignore:
Timestamp:
Apr 6, 2012 1:30:45 PM (11 years ago)
Author:
vondreele
Message:

small fix to HessianLSQ about # of cycles
finish map peak search (no GUI/plot output yet)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIImath.py

    r486 r530  
    9191    lamMax = lam
    9292    nfev = 0
    93     while icycle <= maxcyc:
     93    while icycle < maxcyc:
    9494        lamMax = max(lamMax,lam)
    9595        M = func(x0,*args)
     
    131131        Bmat = nl.inv(Amat)
    132132        return [x0,Bmat,{'num cyc':icycle,'fvec':M,'nfev':nfev,'lamMax':lamMax,'psing':[]}]
    133     except LinAlgError:
    134         psing = list(np.where(np.diag(nl.gr(Amat)[1]) < 1.e-14)[0])
     133    except nl.LinAlgError:
     134        psing = []
     135        if maxcyc:
     136            psing = list(np.where(np.diag(nl.qr(Amat)[1]) < 1.e-14)[0])
    135137        return [x0,None,{'num cyc':icycle,'fvec':M,'nfev':nfev,'lamMax':lamMax,'psing':psing}]
    136 
    137 def calcFouriermap():
    138     print 'Calculate Fourier map'
    139 
    140    
     138   
    141139def getVCov(varyNames,varyList,covMatrix):
    142140    vcov = np.zeros((len(varyNames),len(varyNames)))
Note: See TracChangeset for help on using the changeset viewer.