Changeset 5266


Ignore:
Timestamp:
Apr 19, 2022 5:25:59 PM (11 months ago)
Author:
toby
Message:

error w/LeBail flag not set

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIstrIO.py

    r5264 r5266  
    28712871                    pFile.write('\n Phase: %s in histogram: %s\n'%(phase,histogram))
    28722872                    pFile.write(135*'='+'\n')
    2873                     if hapDict[pfx+'LeBail']:
     2873                    if hapDict.get(pfx+'LeBail'):
    28742874                        pFile.write(' Perform LeBail extraction\n')                     
    28752875                    elif 'E' not in inst['Type'][0]:
     
    28922892                        if hapData['Babinet']['BabA'][0]:
    28932893                            PrintBabinet(hapData['Babinet'])
    2894                 if resetRefList and (not hapDict[pfx+'LeBail'] or (hapData.get('LeBail',False) and Controls.get('newLeBail',False))):
     2894                if resetRefList and (not hapDict.get(phx+'LeBail') or (hapData.get('LeBail',False) and Controls.get('newLeBail',False))):
    28952895                    Scale = Histogram['Sample Parameters']['Scale'][0]      #for initializing reflection structure factors.
    28962896                    StartI = hapData['Scale'][0]*Scale
     
    32583258                    for item in ['Scale','Extinction']:
    32593259                        hapData[item][0] = parmDict[pfx+item]
    3260                         if pfx+item in sigDict and not parmDict[pfx+'LeBail']:
     3260                        if pfx+item in sigDict and not parmDict.get(pfx+'LeBail'):
    32613261                            PhFrExtPOSig.update({pfx+item:sigDict[pfx+item],})
    32623262                    if hapData['Pref.Ori.'][0] == 'MD':
    32633263                        hapData['Pref.Ori.'][1] = parmDict[pfx+'MD']
    3264                         if pfx+'MD' in sigDict and not parmDict[pfx+'LeBail']:
     3264                        if pfx+'MD' in sigDict and not parmDict.get(pfx+'LeBail'):
    32653265                            PhFrExtPOSig.update({pfx+'MD':sigDict[pfx+'MD'],})
    32663266                    else:                           #'SH' spherical harmonics
    32673267                        for item in hapData['Pref.Ori.'][5]:
    32683268                            hapData['Pref.Ori.'][5][item] = parmDict[pfx+item]
    3269                             if pfx+item in sigDict and not parmDict[pfx+'LeBail']:
     3269                            if pfx+item in sigDict and not parmDict.get(pfx+'LeBail'):
    32703270                                PhFrExtPOSig.update({pfx+item:sigDict[pfx+item],})
    32713271                    SizeMuStrSig.update({pfx+'Mustrain':[[0,0,0],[0 for i in range(len(hapData['Mustrain'][4]))]],
     
    33093309                    for name in ['BabA','BabU']:
    33103310                        hapData['Babinet'][name][0] = parmDict[pfx+name]
    3311                         if pfx+name in sigDict and not parmDict[pfx+'LeBail']:
     3311                        if pfx+name in sigDict and not parmDict.get(pfx+'LeBail'):
    33123312                            BabSig[pfx+name] = sigDict[pfx+name]               
    33133313               
     
    33823382                    pFile.write(' Bragg intensity sum = %.3g\n'%(Histogram['Residuals'][pfx+'sumInt']))
    33833383                   
    3384                     if parmDict[pfx+'LeBail'] or 'E' in Inst['Type'][0]:
     3384                    if parmDict.get(pfx+'LeBail') or 'E' in Inst['Type'][0]:
    33853385                        pFile.write(' Performed LeBail extraction for phase %s in histogram %s\n'%(phase,histogram))
    33863386                    elif 'E' not in Inst['Type'][0]:
     
    34043404                    if pfx+'LayerDisp' in SizeMuStrSig:
    34053405                        pFile.write(' Layer displacement : %10.3f, sig %10.3f\n'%(hapData['Layer Disp'][0],SizeMuStrSig[pfx+'LayerDisp']))           
    3406                     if Phases[phase]['General']['Type'] != 'magnetic' and not parmDict[pfx+'LeBail'] and 'E' not in Inst['Type'][0]:
     3406                    if Phases[phase]['General']['Type'] != 'magnetic' and not parmDict.get(pfx+'LeBail') and 'E' not in Inst['Type'][0]:
    34073407                        if len(BabSig):
    34083408                            PrintBabinetAndSig(pfx,hapData['Babinet'],BabSig)
  • trunk/GSASIIstrMain.py

    r5235 r5266  
    732732                    parmDict[parm] = NewparmDict[parm]
    733733            for phase in Phases:
    734                 if Phases[phase]['Histograms'][histogram]['LeBail'] and lasthist:
     734                if Phases[phase]['Histograms'][histogram].get('LeBail',False) and lasthist:
    735735                    oldFsqs = Histograms[lasthist]['Reflection Lists'][phase]['RefList'].T[8:10]    #assume no superlattice!
    736736                    newRefs = Histograms[histogram]['Reflection Lists'][phase]['RefList']
  • trunk/GSASIIstrMath.py

    r5260 r5266  
    31013101                                refl[8+im] = icod[0]
    31023102                                sumInt += icod[1]
    3103                                 if parmDict[phfx+'LeBail']:
     3103                                if parmDict.get(phfx+'LeBail'):
    31043104                                    refl[9+im] = refl[8+im]
    31053105                            elif icod == -1:
     
    31173117                                else:
    31183118                                    refDict['RefList'][irefl][8+im] = refl8im
    3119                                     if parmDict[phfx+'LeBail']:
     3119                                    if parmDict.get(phfx+'LeBail'):
    31203120                                        refDict['RefList'][irefl][9+im] = refDict['RefList'][irefl][8+im]
    31213121                elif 'T' in calcControls[hfx+'histType']:
     
    31283128                                refl[8+im] = icod[0]
    31293129                                sumInt += icod[1]
    3130                                 if parmDict[phfx+'LeBail']:
     3130                                if parmDict.get(phfx+'LeBail'):
    31313131                                    refl[9+im] = refl[8+im]
    31323132                            elif icod == -1:
     
    31443144                                else:
    31453145                                    refDict['RefList'][irefl][8+im] = refl8im
    3146                                     if parmDict[phfx+'LeBail']:
     3146                                    if parmDict.get(phfx+'LeBail'):
    31473147                                        refDict['RefList'][irefl][9+im] = refDict['RefList'][irefl][8+im]
    31483148                elif 'E' in calcControls[hfx+'histType']:
     
    31553155                                refl[8+im] = icod[0]
    31563156                                sumInt += icod[1]
    3157                                 if parmDict[phfx+'LeBail']:
     3157                                if parmDict.get(phfx+'LeBail'):
    31583158                                    refl[9+im] = refl[8+im]
    31593159                            elif icod == -1:
     
    31713171                                else:
    31723172                                    refDict['RefList'][irefl][8+im] = refl8im
    3173                                     if parmDict[phfx+'LeBail']:
     3173                                    if parmDict.get(phfx+'LeBail'):
    31743174                                        refDict['RefList'][irefl][9+im] = refDict['RefList'][irefl][8+im]
    31753175                elif 'B' in calcControls[hfx+'histType']:
     
    31823182                                refl[8+im] = icod[0]
    31833183                                sumInt += icod[1]
    3184                                 if parmDict[phfx+'LeBail']:
     3184                                if parmDict.get(phfx+'LeBail'):
    31853185                                    refl[9+im] = refl[8+im]
    31863186                            elif icod == -1:
     
    31983198                                else:
    31993199                                    refDict['RefList'][irefl][8+im] = refl8im
    3200                                     if parmDict[phfx+'LeBail']:
     3200                                    if parmDict.get(phfx+'LeBail'):
    32013201                                        refDict['RefList'][irefl][9+im] = refDict['RefList'][irefl][8+im]
    32023202                if useMP: MPpool.terminate()
     
    33313331        GA,GB = G2lat.Gmat2AB(G)    #Orthogonalization matrices
    33323332        Vst = np.sqrt(nl.det(G))    #V*
    3333         if not Phase['General'].get('doPawley') and not parmDict[phfx+'LeBail']:
     3333        if not Phase['General'].get('doPawley') and not parmDict.get(phfx+'LeBail'):
    33343334            if 'E' in calcControls[hfx+'histType']:
    33353335                print('\n\n**** Error: EDX data not suitable for Rietveld refinement ****\n\n')
     
    36483648        G,g = G2lat.A2Gmat(A)       #recip & real metric tensors
    36493649        GA,GB = G2lat.Gmat2AB(G)    #Orthogonalization matricies
    3650         if not Phase['General'].get('doPawley') and not parmDict[phfx+'LeBail'] and 'E' not in calcControls[hfx+'histType']:
     3650        if not Phase['General'].get('doPawley') and not parmDict.get(phfx+'LeBail') and 'E' not in calcControls[hfx+'histType']:
    36513651            if im:
    36523652                dFdvDict = SStructureFactorDerv(refDict,im,G,hfx,pfx,SGData,SSGData,calcControls,parmDict)
     
    39113911                        if Ka2 and iFin2-iBeg2:
    39123912                            depDerivDict[phfx+name][iBeg2:iFin2] += parmDict[phfx+'Scale']*dFdvDict[phfx+name][iref]*dervDict2['int']/refl[9+im]                 
    3913             if not Phase['General'].get('doPawley') and not parmDict[phfx+'LeBail'] and 'E' not in calcControls[hfx+'histType']:
     3913            if not Phase['General'].get('doPawley') and not parmDict.get(phfx+'LeBail') and 'E' not in calcControls[hfx+'histType']:
    39143914                #do atom derivatives -  for RB,F,X & U so far - how do I scale mixed phase constraints?
    39153915                corr = 0.
Note: See TracChangeset for help on using the changeset viewer.