Changeset 2314


Ignore:
Timestamp:
Jun 9, 2016 2:59:47 PM (5 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

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIgrid.py

    r2310 r2314  
    40274027            GetPatternTreeItemId(G2frame,G2frame.Image, 'Masks'))
    40284028        data = G2frame.PatternTree.GetItemPyData(item)
     4029        G2frame.ImageZ = G2imG.GetImageZ(G2frame,data)
    40294030        G2imG.UpdateImageControls(G2frame,data,masks)
    40304031        G2plt.PlotImage(G2frame,newPlot=True)
     
    40324033        G2frame.dataFrame.SetTitle('Masks')
    40334034        G2frame.Image = G2frame.PatternTree.GetItemParent(item)
    4034         data = G2frame.PatternTree.GetItemPyData(item)
    4035         G2imG.UpdateMasks(G2frame,data)
     4035        masks = G2frame.PatternTree.GetItemPyData(item)
     4036        data = G2frame.PatternTree.GetItemPyData(
     4037            GetPatternTreeItemId(G2frame,G2frame.Image, 'Image Controls'))
     4038        G2frame.ImageZ = G2imG.GetImageZ(G2frame,data)
     4039        G2imG.UpdateMasks(G2frame,masks)
    40364040        G2plt.PlotImage(G2frame,newPlot=True)
    40374041    elif G2frame.PatternTree.GetItemText(item) == 'Stress/Strain':
    40384042        G2frame.dataFrame.SetTitle('Stress/Strain')
    40394043        G2frame.Image = G2frame.PatternTree.GetItemParent(item)
    4040         data = G2frame.PatternTree.GetItemPyData(item)
     4044        data = G2frame.PatternTree.GetItemPyData(
     4045            GetPatternTreeItemId(G2frame,G2frame.Image, 'Image Controls'))
     4046        G2frame.ImageZ = G2imG.GetImageZ(G2frame,data)
     4047        strsta = G2frame.PatternTree.GetItemPyData(item)
    40414048        G2plt.PlotImage(G2frame,newPlot=True)
    4042         G2plt.PlotStrain(G2frame,data,newPlot=True)
    4043         G2imG.UpdateStressStrain(G2frame,data)
     4049        G2plt.PlotStrain(G2frame,strsta,newPlot=True)
     4050        G2imG.UpdateStressStrain(G2frame,strsta)
    40444051    elif G2frame.PatternTree.GetItemText(item) == 'PDF Controls':
    40454052        G2frame.PatternId = G2frame.PatternTree.GetItemParent(item)
  • 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.