Changeset 5266
- Timestamp:
- Apr 19, 2022 5:25:59 PM (11 months ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIstrIO.py
r5264 r5266 2871 2871 pFile.write('\n Phase: %s in histogram: %s\n'%(phase,histogram)) 2872 2872 pFile.write(135*'='+'\n') 2873 if hapDict [pfx+'LeBail']:2873 if hapDict.get(pfx+'LeBail'): 2874 2874 pFile.write(' Perform LeBail extraction\n') 2875 2875 elif 'E' not in inst['Type'][0]: … … 2892 2892 if hapData['Babinet']['BabA'][0]: 2893 2893 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))): 2895 2895 Scale = Histogram['Sample Parameters']['Scale'][0] #for initializing reflection structure factors. 2896 2896 StartI = hapData['Scale'][0]*Scale … … 3258 3258 for item in ['Scale','Extinction']: 3259 3259 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'): 3261 3261 PhFrExtPOSig.update({pfx+item:sigDict[pfx+item],}) 3262 3262 if hapData['Pref.Ori.'][0] == 'MD': 3263 3263 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'): 3265 3265 PhFrExtPOSig.update({pfx+'MD':sigDict[pfx+'MD'],}) 3266 3266 else: #'SH' spherical harmonics 3267 3267 for item in hapData['Pref.Ori.'][5]: 3268 3268 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'): 3270 3270 PhFrExtPOSig.update({pfx+item:sigDict[pfx+item],}) 3271 3271 SizeMuStrSig.update({pfx+'Mustrain':[[0,0,0],[0 for i in range(len(hapData['Mustrain'][4]))]], … … 3309 3309 for name in ['BabA','BabU']: 3310 3310 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'): 3312 3312 BabSig[pfx+name] = sigDict[pfx+name] 3313 3313 … … 3382 3382 pFile.write(' Bragg intensity sum = %.3g\n'%(Histogram['Residuals'][pfx+'sumInt'])) 3383 3383 3384 if parmDict [pfx+'LeBail']or 'E' in Inst['Type'][0]:3384 if parmDict.get(pfx+'LeBail') or 'E' in Inst['Type'][0]: 3385 3385 pFile.write(' Performed LeBail extraction for phase %s in histogram %s\n'%(phase,histogram)) 3386 3386 elif 'E' not in Inst['Type'][0]: … … 3404 3404 if pfx+'LayerDisp' in SizeMuStrSig: 3405 3405 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]: 3407 3407 if len(BabSig): 3408 3408 PrintBabinetAndSig(pfx,hapData['Babinet'],BabSig) -
trunk/GSASIIstrMain.py
r5235 r5266 732 732 parmDict[parm] = NewparmDict[parm] 733 733 for phase in Phases: 734 if Phases[phase]['Histograms'][histogram] ['LeBail']and lasthist:734 if Phases[phase]['Histograms'][histogram].get('LeBail',False) and lasthist: 735 735 oldFsqs = Histograms[lasthist]['Reflection Lists'][phase]['RefList'].T[8:10] #assume no superlattice! 736 736 newRefs = Histograms[histogram]['Reflection Lists'][phase]['RefList'] -
trunk/GSASIIstrMath.py
r5260 r5266 3101 3101 refl[8+im] = icod[0] 3102 3102 sumInt += icod[1] 3103 if parmDict [phfx+'LeBail']:3103 if parmDict.get(phfx+'LeBail'): 3104 3104 refl[9+im] = refl[8+im] 3105 3105 elif icod == -1: … … 3117 3117 else: 3118 3118 refDict['RefList'][irefl][8+im] = refl8im 3119 if parmDict [phfx+'LeBail']:3119 if parmDict.get(phfx+'LeBail'): 3120 3120 refDict['RefList'][irefl][9+im] = refDict['RefList'][irefl][8+im] 3121 3121 elif 'T' in calcControls[hfx+'histType']: … … 3128 3128 refl[8+im] = icod[0] 3129 3129 sumInt += icod[1] 3130 if parmDict [phfx+'LeBail']:3130 if parmDict.get(phfx+'LeBail'): 3131 3131 refl[9+im] = refl[8+im] 3132 3132 elif icod == -1: … … 3144 3144 else: 3145 3145 refDict['RefList'][irefl][8+im] = refl8im 3146 if parmDict [phfx+'LeBail']:3146 if parmDict.get(phfx+'LeBail'): 3147 3147 refDict['RefList'][irefl][9+im] = refDict['RefList'][irefl][8+im] 3148 3148 elif 'E' in calcControls[hfx+'histType']: … … 3155 3155 refl[8+im] = icod[0] 3156 3156 sumInt += icod[1] 3157 if parmDict [phfx+'LeBail']:3157 if parmDict.get(phfx+'LeBail'): 3158 3158 refl[9+im] = refl[8+im] 3159 3159 elif icod == -1: … … 3171 3171 else: 3172 3172 refDict['RefList'][irefl][8+im] = refl8im 3173 if parmDict [phfx+'LeBail']:3173 if parmDict.get(phfx+'LeBail'): 3174 3174 refDict['RefList'][irefl][9+im] = refDict['RefList'][irefl][8+im] 3175 3175 elif 'B' in calcControls[hfx+'histType']: … … 3182 3182 refl[8+im] = icod[0] 3183 3183 sumInt += icod[1] 3184 if parmDict [phfx+'LeBail']:3184 if parmDict.get(phfx+'LeBail'): 3185 3185 refl[9+im] = refl[8+im] 3186 3186 elif icod == -1: … … 3198 3198 else: 3199 3199 refDict['RefList'][irefl][8+im] = refl8im 3200 if parmDict [phfx+'LeBail']:3200 if parmDict.get(phfx+'LeBail'): 3201 3201 refDict['RefList'][irefl][9+im] = refDict['RefList'][irefl][8+im] 3202 3202 if useMP: MPpool.terminate() … … 3331 3331 GA,GB = G2lat.Gmat2AB(G) #Orthogonalization matrices 3332 3332 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'): 3334 3334 if 'E' in calcControls[hfx+'histType']: 3335 3335 print('\n\n**** Error: EDX data not suitable for Rietveld refinement ****\n\n') … … 3648 3648 G,g = G2lat.A2Gmat(A) #recip & real metric tensors 3649 3649 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']: 3651 3651 if im: 3652 3652 dFdvDict = SStructureFactorDerv(refDict,im,G,hfx,pfx,SGData,SSGData,calcControls,parmDict) … … 3911 3911 if Ka2 and iFin2-iBeg2: 3912 3912 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']: 3914 3914 #do atom derivatives - for RB,F,X & U so far - how do I scale mixed phase constraints? 3915 3915 corr = 0.
Note: See TracChangeset
for help on using the changeset viewer.