Changeset 4513 for trunk/GSASIIphsGUI.py


Ignore:
Timestamp:
Jul 3, 2020 10:18:43 AM (17 months ago)
Author:
vondreele
Message:

fix problem after setting 1-->2 transformation. A block of code neededto be tabbed in once more.
better mag. str. fctr stuff - closer but not right.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIphsGUI.py

    r4508 r4513  
    19601960               
    19611961            def OnCellChange(invalid,value,tc):
    1962 #                event.Skip()
    19631962                SGData = generalData['SGData']
    19641963                laue = SGData['SGLaue']
     
    19671966                cell = generalData['Cell']
    19681967                Obj = tc
    1969 #                Obj = event.GetEventObject()
    19701968                ObjId = cellList.index(Obj.GetId())
    19711969                try:
     
    29602958                    break
    29612959                               
    2962         NShkl = len(G2spc.MustrainNames(SGData))
    2963         NDij = len(G2spc.HStrainNames(SGData))
    2964         UseList = newPhase['Histograms']
    2965         for hist in UseList:
    2966             UseList[hist]['Scale'] /= detTrans      #scale by 1/volume ratio
    2967             UseList[hist]['Mustrain'][4:6] = [NShkl*[0.01,],NShkl*[False,]]
    2968             UseList[hist]['HStrain'] = [NDij*[0.0,],NDij*[False,]]
    2969         newPhase['General']['Map'] = mapDefault.copy()
    2970         sub = G2frame.GPXtree.AppendItem(parent=
    2971             G2gd.GetGPXtreeItemId(G2frame,G2frame.root,'Phases'),text=phaseName)
    2972         G2frame.GPXtree.SetItemPyData(sub,newPhase)
    2973         newPhase['Drawing'] = []
    2974         if ifConstr:
    2975             G2cnstG.TransConstraints(G2frame,data,newPhase,Trans,Vvec,atCodes)     #data is old phase
    2976         G2frame.GPXtree.SelectItem(sub)
     2960            NShkl = len(G2spc.MustrainNames(SGData))
     2961            NDij = len(G2spc.HStrainNames(SGData))
     2962            UseList = newPhase['Histograms']
     2963            for hist in UseList:
     2964                UseList[hist]['Scale'] /= detTrans      #scale by 1/volume ratio
     2965                UseList[hist]['Mustrain'][4:6] = [NShkl*[0.01,],NShkl*[False,]]
     2966                UseList[hist]['HStrain'] = [NDij*[0.0,],NDij*[False,]]
     2967            newPhase['General']['Map'] = mapDefault.copy()
     2968            sub = G2frame.GPXtree.AppendItem(parent=
     2969                G2gd.GetGPXtreeItemId(G2frame,G2frame.root,'Phases'),text=phaseName)
     2970            G2frame.GPXtree.SetItemPyData(sub,newPhase)
     2971            newPhase['Drawing'] = []
     2972            if ifConstr:
     2973                G2cnstG.TransConstraints(G2frame,data,newPhase,Trans,Vvec,atCodes)     #data is old phase
     2974            G2frame.GPXtree.SelectItem(sub)
    29772975               
    29782976    def OnCompare(event):
Note: See TracChangeset for help on using the changeset viewer.