Changeset 2732


Ignore:
Timestamp:
Mar 1, 2017 4:02:01 PM (5 years ago)
Author:
vondreele
Message:

finish up LeBail? extraction option

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIddataGUI.py

    r2727 r2732  
    819819        def OnLeBail(event):
    820820            Obj = event.GetEventObject()
     821            if not UseList[G2frame.hist]['LeBail']:
     822                UseList[G2frame.hist]['newLeBail'] = True
     823            else:
     824                UseList[G2frame.hist]['newLeBail'] = False
    821825            UseList[G2frame.hist]['LeBail'] = Obj.GetValue()
    822826
     
    859863        if 'LeBail' not in UseList[G2frame.hist]:
    860864            UseList[G2frame.hist]['LeBail'] = False
     865        if 'newLeBail' not in UseList[G2frame.hist]:
     866            UseList[G2frame.hist]['newLeBail'] = True
    861867        if 'Babinet' not in UseList[G2frame.hist]:
    862868            UseList[G2frame.hist]['Babinet'] = {'BabA':[0.0,False],'BabU':[0.0,False]}
     
    872878            lebail.SetValue(UseList[G2frame.hist]['LeBail'])
    873879            useBox.Add(lebail,0,WACV)
     880            if UseList[G2frame.hist]['LeBail']:
     881                G2frame.dataFrame.SetStatusText('To reset LeBail, cycle LeBail check box.')
    874882        bottomSizer.Add(useBox,0,WACV|wx.TOP|wx.BOTTOM|wx.LEFT,5)
    875883       
     
    980988        if name in UseList:
    981989            useList.append(name)
     990    if not G2frame.dataFrame.GetStatusBar():
     991        G2frame.dataFrame.CreateStatusBar()
    982992    mainSizer = wx.BoxSizer(wx.VERTICAL)
    983993    mainSizer.Add(wx.StaticText(DData,wx.ID_ANY,' Histogram data for '+PhaseName+':'),0,WACV|wx.LEFT,5)
  • trunk/GSASIIstrIO.py

    r2728 r2732  
    22362236                if Phases[phase]['General']['doPawley']:
    22372237                    hapDict[pfx+'LeBail'] = False           #Pawley supercedes LeBail
     2238                    hapDict[pfx+'newLeBail'] = True
    22382239                    Tmin = G2lat.Dsp2pos(inst,dmin)
    22392240                    if 'C' in inst['Type'][1]:
     
    22432244                else:
    22442245                    hapDict[pfx+'LeBail'] = hapData.get('LeBail',False)
     2246                    hapDict[pfx+'newLeBail'] = hapData.get('newLeBail',True)
    22452247                if Phases[phase]['General']['Type'] == 'magnetic':
    22462248                    dmin = max(dmin,Phases[phase]['General']['MagDmin'])
     
    23332335                        if hapData['Babinet']['BabA'][0]:
    23342336                            PrintBabinet(hapData['Babinet'])                       
    2335                 if resetRefList and not hapDict[pfx+'LeBail']:
     2337                if resetRefList and hapDict[pfx+'newLeBail']:
     2338                    if hapData.get('LeBail',False):
     2339                        hapData['newLeBail'] = False
    23362340                    refList = []
    23372341                    Uniq = []
  • trunk/GSASIIstrMath.py

    r2728 r2732  
    30793079        GA,GB = G2lat.Gmat2AB(G)    #Orthogonalization matricies
    30803080        Vst = np.sqrt(nl.det(G))    #V*
    3081         if not Phase['General'].get('doPawley'):    # and not parmDict[phfx+'LeBail'] and len(refDict['FF']):
     3081        if not Phase['General'].get('doPawley') and not parmDict[phfx+'LeBail']:
    30823082            if im:
    30833083                SStructureFactor(refDict,G,hfx,pfx,SGData,SSGData,calcControls,parmDict)
     
    32543254        G,g = G2lat.A2Gmat(A)       #recip & real metric tensors
    32553255        GA,GB = G2lat.Gmat2AB(G)    #Orthogonalization matricies
    3256         if not Phase['General'].get('doPawley'):    #  and not parmDict[phfx+'LeBail'] and len(refDict['FF']):
     3256        if not Phase['General'].get('doPawley') and not parmDict[phfx+'LeBail']:
    32573257            if im:
    32583258                dFdvDict = SStructureFactorDerv(refDict,im,G,hfx,pfx,SGData,SSGData,calcControls,parmDict)
     
    34493449                        if Ka2 and iFin2-iBeg2:
    34503450                            depDerivDict[phfx+name][iBeg2:iFin2] += parmDict[phfx+'Scale']*dFdvDict[phfx+name][iref]*dervDict2['int']/refl[9+im]                 
    3451             if not Phase['General'].get('doPawley')  and not parmDict[phfx+'LeBail'] and len(refDict['FF']):
     3451            if not Phase['General'].get('doPawley') and not parmDict[phfx+'LeBail']:
    34523452                #do atom derivatives -  for RB,F,X & U so far - how do I scale mixed phase constraints?
    34533453                corr = 0.
     
    36373637            dMdv = np.sqrt(wtFactor)*dMdvh
    36383638           
     3639    GetFobsSq(Histograms,Phases,parmDict,calcControls)
    36393640    pNames,pVals,pWt,pWsum = penaltyFxn(HistoPhases,calcControls,parmDict,varylist)
    36403641    if np.any(pVals):
     
    37133714        else:
    37143715            continue        #skip non-histogram entries
     3716    GetFobsSq(Histograms,Phases,parmDict,calcControls)
    37153717    pNames,pVals,pWt,pWsum = penaltyFxn(HistoPhases,calcControls,parmDict,varylist)
    37163718    if np.any(pVals):
     
    39263928            M = np.concatenate((M,wtFactor*df))
    39273929# end of HKLF processing
     3930    GetFobsSq(Histograms,Phases,parmDict,calcControls)
    39283931    Histograms['sumwYo'] = SumwYo
    39293932    Histograms['Nobs'] = Nobs
Note: See TracChangeset for help on using the changeset viewer.