Changeset 2739


Ignore:
Timestamp:
Mar 4, 2017 9:56:49 AM (6 years ago)
Author:
vondreele
Message:

comment out "other self-updating plots" - caused failures in GSASII.py
newLeBail interfered with ordinary Rietveld refinement - set False by default (was true)
add generation of delt-G(R) calc - not complete

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r2736 r2739  
    39833983            self.PatternTree.SelectItem(Id)
    39843984        # update other self-updating plots
    3985         for lbl,frame in zip(self.G2plotNB.plotList,self.G2plotNB.panelList):
    3986             if frame.plotInvalid and frame.replotFunction:
    3987                 frame.replotFunction(*frame.replotArgs,**frame.replotKWargs)
     3985#        for lbl,frame in zip(self.G2plotNB.plotList,self.G2plotNB.panelList):
     3986#            if frame.plotInvalid and frame.replotFunction:
     3987#                frame.replotFunction(*frame.replotArgs,**frame.replotKWargs)
    39883988        # delete any remaining plots that are still invalid and need a refresh
    39893989        for lbl,frame in zip(self.G2plotNB.plotList,self.G2plotNB.panelList):
  • trunk/GSASIIddataGUI.py

    r2732 r2739  
    864864            UseList[G2frame.hist]['LeBail'] = False
    865865        if 'newLeBail' not in UseList[G2frame.hist]:
    866             UseList[G2frame.hist]['newLeBail'] = True
     866            UseList[G2frame.hist]['newLeBail'] = False
    867867        if 'Babinet' not in UseList[G2frame.hist]:
    868868            UseList[G2frame.hist]['Babinet'] = {'BabA':[0.0,False],'BabU':[0.0,False]}
  • trunk/GSASIIplot.py

    r2723 r2739  
    23592359    if not plotType:
    23602360        plotType = G2frame.G2plotNB.plotList[G2frame.G2plotNB.nb.GetSelection()]
    2361     if plotType not in ['I(Q)','S(Q)','F(Q)','G(R)']:
     2361    if plotType not in ['I(Q)','S(Q)','F(Q)','G(R)','delt-G(R)']:
    23622362        return
    23632363   
  • trunk/GSASIIpwdGUI.py

    r2735 r2739  
    50775077        sfgSizer.Add(sqBox,0)
    50785078        return sfgSizer
     5079       
     5080    def DiffSizer():
     5081       
     5082        def OnSelectGR(event):
     5083            data['diffGRname'] = grName.GetValue()
     5084            if data['diffGRname']:
     5085                id = G2gd.GetPatternTreeItemId(G2frame,G2frame.root,data['diffGRname'])
     5086                pId = G2gd.GetPatternTreeItemId(G2frame,id,'PDF Controls')
     5087                subData = G2frame.PatternTree.GetItemPyData(pId)['G(R)'][1]
     5088                if subData[0].shape != data['G(R)'][1][0].shape:
     5089                    print 'Error - G(R) not same length'
     5090                data['delt-G(R)'] = [subData[0],data['G(R)'][1][0]-subData[1]]
     5091                G2plt.PlotISFG(G2frame,data,newPlot=True,plotType='delt-G(R)')
     5092       
     5093        diffSizer = wx.BoxSizer(wx.HORIZONTAL)
     5094        fileList = [''] + GetFileList(G2frame,'PDF')
     5095        diffSizer.Add(wx.StaticText(G2frame.dataDisplay,label=' Subtract G(R) for: '),0,WACV)
     5096        grName = wx.ComboBox(G2frame.dataDisplay,value=data['diffGRname'],choices=fileList,
     5097            style=wx.CB_READONLY|wx.CB_DROPDOWN)
     5098        grName.Bind(wx.EVT_COMBOBOX,OnSelectGR)       
     5099        diffSizer.Add(grName,0,)
     5100        return diffSizer
    50795101           
    50805102    def SumElementVolumes():
     
    53185340    if 'Refine' not in data['Sample Bkg.']:
    53195341        data['Sample Bkg.']['Refine'] = False
     5342    if 'diffGRname' not in data:
     5343        data['diffGRname'] = ''
    53205344    if G2frame.dataDisplay:
    53215345        G2frame.dataFrame.Clear()
     
    53395363    G2G.HorizontalLine(mainSizer,G2frame.dataDisplay)
    53405364    mainSizer.Add(SFGctrlSizer(),0,WACV)
     5365    G2G.HorizontalLine(mainSizer,G2frame.dataDisplay)
     5366    mainSizer.Add(DiffSizer(),0,WACV)
    53415367    mainSizer.Layout()   
    53425368    G2frame.dataDisplay.SetSizer(mainSizer)
  • trunk/GSASIIstrIO.py

    r2735 r2739  
    22362236                if Phases[phase]['General']['doPawley']:
    22372237                    hapDict[pfx+'LeBail'] = False           #Pawley supercedes LeBail
    2238                     hapDict[pfx+'newLeBail'] = True
     2238                    hapDict[pfx+'newLeBail'] = False
    22392239                    Tmin = G2lat.Dsp2pos(inst,dmin)
    22402240                    if 'C' in inst['Type'][1]:
     
    22442244                else:
    22452245                    hapDict[pfx+'LeBail'] = hapData.get('LeBail',False)
    2246                     hapDict[pfx+'newLeBail'] = hapData.get('newLeBail',True)
     2246                    hapDict[pfx+'newLeBail'] = hapData.get('newLeBail',False)
    22472247                if Phases[phase]['General']['Type'] == 'magnetic':
    22482248                    dmin = max(dmin,Phases[phase]['General']['MagDmin'])
    22492249                for item in ['Scale','Extinction']:
    22502250                    hapDict[pfx+item] = hapData[item][0]
    2251                     if hapData[item][1] and not hapDict[pfx+'LeBail']:
     2251                    if hapData[item][1]:
    22522252                        hapVary.append(pfx+item)
    22532253                names = G2spc.HStrainNames(SGData)
     
    22622262                        hapDict[pfx+'MD'] = hapData['Pref.Ori.'][1]
    22632263                        controlDict[pfx+'MDAxis'] = hapData['Pref.Ori.'][3]
    2264                         if hapData['Pref.Ori.'][2] and not hapDict[pfx+'LeBail']:
     2264                        if hapData['Pref.Ori.'][2]:
    22652265                            hapVary.append(pfx+'MD')
    22662266                    else:                           #'SH' spherical harmonics
     
    22782278                        for item in hapData['Pref.Ori.'][5]:
    22792279                            hapDict[pfx+item] = hapData['Pref.Ori.'][5][item]
    2280                             if hapData['Pref.Ori.'][2] and not hapDict[pfx+'LeBail']:
     2280                            if hapData['Pref.Ori.'][2]:
    22812281                                hapVary.append(pfx+item)
    22822282                for item in ['Mustrain','Size']:
    22832283                    controlDict[pfx+item+'Type'] = hapData[item][0]
    22842284                    hapDict[pfx+item+';mx'] = hapData[item][1][2]
    2285                     if hapData[item][2][2] and not hapDict[pfx+'newLeBail']:
     2285                    if hapData[item][2][2]:
    22862286                        hapVary.append(pfx+item+';mx')
    22872287                    if hapData[item][0] in ['isotropic','uniaxial']:
    22882288                        hapDict[pfx+item+';i'] = hapData[item][1][0]
    2289                         if hapData[item][2][0] and not hapDict[pfx+'newLeBail']:
     2289                        if hapData[item][2][0]:
    22902290                            hapVary.append(pfx+item+';i')
    22912291                        if hapData[item][0] == 'uniaxial':
    22922292                            controlDict[pfx+item+'Axis'] = hapData[item][3]
    22932293                            hapDict[pfx+item+';a'] = hapData[item][1][1]
    2294                             if hapData[item][2][1] and not hapDict[pfx+'newLeBail']:
     2294                            if hapData[item][2][1]:
    22952295                                hapVary.append(pfx+item+';a')
    22962296                    else:       #generalized for mustrain or ellipsoidal for size
     
    23062306                            sfx = ';'+str(i)
    23072307                            hapDict[pfx+item+sfx] = hapData[item][4][i]
    2308                             if hapData[item][5][i] and not hapDict[pfx+'newLeBail']:
     2308                            if hapData[item][5][i]:
    23092309                                hapVary.append(pfx+item+sfx)
    23102310                if Phases[phase]['General']['Type'] != 'magnetic':
    23112311                    for bab in ['BabA','BabU']:
    23122312                        hapDict[pfx+bab] = hapData['Babinet'][bab][0]
    2313                         if hapData['Babinet'][bab][1] and not hapDict[pfx+'LeBail']:
     2313                        if hapData['Babinet'][bab][1]:
    23142314                            hapVary.append(pfx+bab)
    23152315                               
     
    23322332                    PrintMuStrain(hapData['Mustrain'],SGData)
    23332333                    PrintHStrain(hapData['HStrain'],SGData)
    2334                     if Phases[phase]['General']['Type'] != 'magnetic' and not hapDict[pfx+'LeBail']:
     2334                    if Phases[phase]['General']['Type'] != 'magnetic':
    23352335                        if hapData['Babinet']['BabA'][0]:
    23362336                            PrintBabinet(hapData['Babinet'])                       
Note: See TracChangeset for help on using the changeset viewer.