Changeset 2314 for trunk/GSASIImath.py


Ignore:
Timestamp:
Jun 9, 2016 2:59:47 PM (6 years ago)
Author:
vondreele
Message:

change Levenberg/Marquardt? lambda max to 103 from 105 (it was excessive)
fix image loading on tree selection; now any pick of IMG child will reload image

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIImath.py

    r2313 r2314  
    149149                lam /= 10.
    150150                break
    151             if lam > 10.e5:
     151            if lam > 10.e3:
    152152                print 'ouch #3 chisq1 ',chisq1,' stuck > chisq0 ',chisq0
    153153                break
     
    461461                        Ids.append(Atoms[iA][cia+8])
    462462    return Neigh,[OId,Ids]
     463   
     464def calcBond(A,Ax,Bx,MTCU):
     465    cell = G2lat.A2cell(A)
     466    Amat,Bmat = G2lat.cell2AB(cell)
     467    M,T,C,U = MTCU
     468    Btx = np.inner(M,Bx)+T+C+U
     469    Dx = Btx-Ax
     470    dist = np.sqrt(np.inner(Amat,Dx))
     471    return dist
    463472   
    464473def AddHydrogens(AtLookUp,General,Atoms,AddHydId):
Note: See TracChangeset for help on using the changeset viewer.