Changeset 2750 for trunk/GSASIIphsGUI.py


Ignore:
Timestamp:
Mar 8, 2017 9:23:16 AM (6 years ago)
Author:
vondreele
Message:

fix issues with adding new phase, forgetting to add atoms to it,
and also having a phase unused in histogram
add 'newLeBail':True to add histogram to phase so reflections get generated
also to copy Data parms (but not selected parms)
fix issue with changing atom type - caused crash in LS refinement

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIphsGUI.py

    r2745 r2750  
    835835            pawleySizer.Add(wx.StaticText(General,label=' Pawley controls: '),0,WACV)
    836836            pawlRef = wx.CheckBox(General,-1,label=' Do Pawley refinement?')
    837             #ToDo: change parameter to ComboBox of blank, Pawley, LeBail
    838837            pawlRef.SetValue(generalData['doPawley'])
    839838            pawlRef.Bind(wx.EVT_CHECKBOX,OnPawleyRef)
     
    55575556            refDict,reflData = G2frame.PatternTree.GetItemPyData(Id)
    55585557            UseList[histoName] = {'Histogram':histoName,'Show':False,'Scale':[1.0,True],
    5559                 'Babinet':{'BabA':[0.0,False],'BabU':[0.0,False]},'LeBail':False,
     5558                'Babinet':{'BabA':[0.0,False],'BabU':[0.0,False]},'LeBail':False,'newLeBail':True,
    55605559                'Extinction':['Lorentzian','None',
    55615560                {'Tbar':0.1,'Cos2TM':0.955,'Eg':[1.e-7,False],'Es':[1.e-7,False],'Ep':[1.e-7,False]},],
     
    56145613            copyNames = ['Scale','Extinction','Babinet','Flack','Twins']
    56155614        else:  #PWDR 
    5616             copyNames = ['Scale','Pref.Ori.','Size','Mustrain','HStrain','Extinction','Babinet','LeBail']
     5615            copyNames = ['Scale','Pref.Ori.','Size','Mustrain','HStrain','Extinction','Babinet','LeBail','newLeBail',]
    56175616        copyDict = {}
    56185617        for name in copyNames:
     
    56815680                                    UseList[item]['Twins'][0][1][1] = copyDict['Twins']
    56825681                                else:
    5683                                     UseList[item][name][1] = copy.deepcopy(copyDict[name])
     5682                                    try:
     5683                                        UseList[item][name][1] = copy.deepcopy(copyDict[name])
     5684                                    except KeyError:
     5685                                        continue
    56845686                            elif name in ['Size','Mustrain']:
    56855687                                UseList[item][name][0] = copy.deepcopy(copyDict[name][0])
     
    57585760                    for histoName in newList:
    57595761                        Id = G2gd.GetPatternTreeItemId(G2frame,G2frame.root,histoName)
    5760                         UseList[histoName] = {'Histogram':histoName,'Show':False,'LeBail':False,
     5762                        UseList[histoName] = {'Histogram':histoName,'Show':False,'LeBail':False,'newLeBail':True,
    57615763                            'Scale':[1.0,False],'Pref.Ori.':['MD',1.0,False,[0,0,1],0,{},['',],0.1],
    57625764                            'Size':['isotropic',[1.,1.,1.],[False,False,False],[0,0,1],
     
    59935995                Obj = event.GetEventObject()
    59945996                RBId = Indx[Obj.GetId()]
    5995                 RBData['Residue'][RBId]['useCount'] -= 1
    59965997                RBObjs = data['RBModels']['Residue']
    59975998                for rbObj in RBObjs:
    59985999                    if RBId == rbObj['RBId']:
    5999                        data['RBModels']['Residue'].remove(rbObj)                 
     6000                        RBData['Residue'][RBId]['useCount'] -= 1
     6001                        data['RBModels']['Residue'].remove(rbObj)                 
    60006002                G2plt.PlotStructure(G2frame,data)
    60016003                wx.CallAfter(FillRigidBodyGrid,True)
Note: See TracChangeset for help on using the changeset viewer.