Changeset 1453 for trunk/GSASIImath.py


Ignore:
Timestamp:
Aug 1, 2014 3:19:48 PM (9 years ago)
Author:
vondreele
Message:

get HKLF data type into RefDict?
create a SetDefaultDData routine in GSASII.py
fix copyflags for sc extinction coeff
fix neutron resonant ff for TOF
fix error in making Hessian v-cov matrix - now matches the Jabobian one
put names in the Es, Ep & Eg sc extinction coeff
fix errors in SCExtinction - still problem with derivatives

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIImath.py

    r1418 r1453  
    152152            break
    153153        icycle += 1
    154     else:       #after last cycle or if zero cycles
    155         M = func(x0,*args)
    156         nfev += 1
    157         Yvec,Amat = Hess(x0,*args)
    158         Adiag = np.sqrt(np.diag(Amat))
    159         Anorm = np.outer(Adiag,Adiag)
    160         Amatlam = Amat*(One+Lam)/Anorm              #scale Amat to Marquardt array       
     154    M = func(x0,*args)
     155    nfev += 1
     156    Yvec,Amat = Hess(x0,*args)
     157    Adiag = np.sqrt(np.diag(Amat))
     158    Anorm = np.outer(Adiag,Adiag)
     159    Lam = np.eye(Amat.shape[0])*lam
     160    Amatlam = Amat/Anorm  #*(One+Lam)              #don't scale Amat to Marquardt array       
    161161    try:
    162         Bmat = nl.inv(Amatlam)*(One+Lam)/Anorm      #rescale Bmat to Marquardt array
     162        Bmat = nl.inv(Amatlam)/Anorm  #*(One+Lam)      #don't rescale Bmat to Marquardt array
    163163        return [x0,Bmat,{'num cyc':icycle,'fvec':M,'nfev':nfev,'lamMax':lamMax,'psing':[], 'Converged': ifConverged, 'DelChi2':deltaChi2}]
    164164    except nl.LinAlgError:
    165         print 'ouch #2 linear algebra error in LS'
     165        print 'ouch #2 linear algebra error in making v-cov matrix'
    166166        psing = []
    167167        if maxcyc:
Note: See TracChangeset for help on using the changeset viewer.