Changeset 4559


Ignore:
Timestamp:
Sep 3, 2020 10:27:26 AM (3 years ago)
Author:
vondreele
Message:

fix OnTransform? - the ending block of code needed to be tabbed out one step so it executes & makes the new phase.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIphsGUI.py

    r4558 r4559  
    29772977                        SGData['SGSpin'] = G2spc.GetSGSpin(SGData,SGData['MagSpGrp'])
    29782978                else:
     2979                    dlg.Destroy()
    29792980                    return
    29802981            finally:
     
    30233024                    break
    30243025                               
    3025             NShkl = len(G2spc.MustrainNames(SGData))
    3026             NDij = len(G2spc.HStrainNames(SGData))
    3027             UseList = newPhase['Histograms']
    3028             for hist in UseList:
    3029                 UseList[hist]['Scale'] /= detTrans      #scale by 1/volume ratio
    3030                 UseList[hist]['Mustrain'][4:6] = [NShkl*[0.01,],NShkl*[False,]]
    3031                 UseList[hist]['HStrain'] = [NDij*[0.0,],NDij*[False,]]
    3032             newPhase['General']['Map'] = mapDefault.copy()
    3033             sub = G2frame.GPXtree.AppendItem(parent=
    3034                 G2gd.GetGPXtreeItemId(G2frame,G2frame.root,'Phases'),text=phaseName)
    3035             G2frame.GPXtree.SetItemPyData(sub,newPhase)
    3036             newPhase['Drawing'] = []
    3037             if ifConstr:
    3038                 G2cnstG.TransConstraints(G2frame,data,newPhase,Trans,Vvec,atCodes)     #data is old phase
    3039             G2frame.GPXtree.SelectItem(sub)
     3026        NShkl = len(G2spc.MustrainNames(SGData))
     3027        NDij = len(G2spc.HStrainNames(SGData))
     3028        UseList = newPhase['Histograms']
     3029        for hist in UseList:
     3030            UseList[hist]['Scale'] /= detTrans      #scale by 1/volume ratio
     3031            UseList[hist]['Mustrain'][4:6] = [NShkl*[0.01,],NShkl*[False,]]
     3032            UseList[hist]['HStrain'] = [NDij*[0.0,],NDij*[False,]]
     3033        newPhase['General']['Map'] = mapDefault.copy()
     3034        sub = G2frame.GPXtree.AppendItem(parent=
     3035            G2gd.GetGPXtreeItemId(G2frame,G2frame.root,'Phases'),text=phaseName)
     3036        G2frame.GPXtree.SetItemPyData(sub,newPhase)
     3037        newPhase['Drawing'] = []
     3038        if ifConstr:
     3039            G2cnstG.TransConstraints(G2frame,data,newPhase,Trans,Vvec,atCodes)     #data is old phase
     3040        G2frame.GPXtree.SelectItem(sub)
    30403041               
    30413042    def OnCompare(event):
     
    1217812179            pgbar.SetPosition(wx.Point(screenSize[2]-Size[0]-305,screenSize[1]+5))
    1217912180        try:
    12180             newMap,new4Dmap = G2mth.SSChargeFlip(data,ReflData,pgbar)
     12181            result = G2mth.SSChargeFlip(data,ReflData,pgbar)
    1218112182        finally:
    1218212183            pgbar.Destroy()
    1218312184        G2frame.AddToNotebook('4D Charge flip: '+result[2])
    1218412185        G2frame.AddToNotebook('4D Charge flip: '+result[3])
    12185         mapData.update(newMap)
    12186         map4DData.update(new4Dmap)
     12186        mapData.update(result[0])
     12187        map4DData.update(result[1])
    1218712188        mapData['Flip'] = True       
    1218812189        mapSig = np.std(mapData['rho'])
Note: See TracChangeset for help on using the changeset viewer.