Changeset 2741


Ignore:
Timestamp:
Mar 5, 2017 7:20:52 AM (6 years ago)
Author:
vondreele
Message:

fix issues with LeBail? flags & Rietveld refinement

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIddataGUI.py

    r2739 r2741  
    821821            if not UseList[G2frame.hist]['LeBail']:
    822822                UseList[G2frame.hist]['newLeBail'] = True
    823             else:
    824                 UseList[G2frame.hist]['newLeBail'] = False
    825823            UseList[G2frame.hist]['LeBail'] = Obj.GetValue()
    826824
  • trunk/GSASIIstrIO.py

    r2739 r2741  
    22362236                if Phases[phase]['General']['doPawley']:
    22372237                    hapDict[pfx+'LeBail'] = False           #Pawley supercedes LeBail
    2238                     hapDict[pfx+'newLeBail'] = False
     2238                    hapDict[pfx+'newLeBail'] = True
    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',False)
     2246                    hapDict[pfx+'newLeBail'] = hapData.get('newLeBail',True)
    22472247                if Phases[phase]['General']['Type'] == 'magnetic':
    22482248                    dmin = max(dmin,Phases[phase]['General']['MagDmin'])
     
    22562256                    hapDict[pfx+name] = hapData['HStrain'][0][i]
    22572257                    HSvals.append(hapDict[pfx+name])
    2258                     if hapData['HStrain'][1][i] and not hapDict[pfx+'newLeBail']:
     2258                    if hapData['HStrain'][1][i] and not hapDict[pfx+'LeBail']:
    22592259                        hapVary.append(pfx+name)
    22602260                    controlDict[pfx+'poType'] = hapData['Pref.Ori.'][0]
     
    22622262                        hapDict[pfx+'MD'] = hapData['Pref.Ori.'][1]
    22632263                        controlDict[pfx+'MDAxis'] = hapData['Pref.Ori.'][3]
    2264                         if hapData['Pref.Ori.'][2]:
     2264                        if hapData['Pref.Ori.'][2] and not parmDict[pfx+'LeBail']:
    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]:
     2280                            if hapData['Pref.Ori.'][2] and not parmDict[pfx+'LeBail']:
    22812281                                hapVary.append(pfx+item)
    22822282                for item in ['Mustrain','Size']:
     
    23112311                    for bab in ['BabA','BabU']:
    23122312                        hapDict[pfx+bab] = hapData['Babinet'][bab][0]
    2313                         if hapData['Babinet'][bab][1]:
     2313                        if hapData['Babinet'][bab][1] and not parmDict[pfx+'LeBail']:
    23142314                            hapVary.append(pfx+bab)
    23152315                               
     
    23362336                            PrintBabinet(hapData['Babinet'])                       
    23372337                if resetRefList and hapDict[pfx+'newLeBail']:
    2338                     if hapData.get('LeBail',False):
     2338                    if hapData.get('LeBail',False):         #stop regeneating reflections for LeBail
    23392339                        hapData['newLeBail'] = False
    23402340                    refList = []
     
    26782678                wtFrSum[hId] = 0.
    26792679            if 'PWDR' in histogram:
    2680                 if not parmDict[pfx+'LeBail']:
    2681                     for item in ['Scale','Extinction']:
    2682                         hapData[item][0] = parmDict[pfx+item]
    2683                         if pfx+item in sigDict:
     2680                for item in ['Scale','Extinction']:
     2681                    hapData[item][0] = parmDict[pfx+item]
     2682                    if pfx+item in sigDict and not hapData[pfx+'LeBail']:
     2683                        PhFrExtPOSig.update({pfx+item:sigDict[pfx+item],})
     2684                wtFrSum[hId] += hapData['Scale'][0]*General['Mass']
     2685                if hapData['Pref.Ori.'][0] == 'MD':
     2686                    hapData['Pref.Ori.'][1] = parmDict[pfx+'MD']
     2687                    if pfx+'MD' in sigDict and not hapData[pfx+'LeBail']:
     2688                        PhFrExtPOSig.update({pfx+'MD':sigDict[pfx+'MD'],})
     2689                else:                           #'SH' spherical harmonics
     2690                    for item in hapData['Pref.Ori.'][5]:
     2691                        hapData['Pref.Ori.'][5][item] = parmDict[pfx+item]
     2692                        if pfx+item in sigDict and not hapData[pfx+'LeBail']:
    26842693                            PhFrExtPOSig.update({pfx+item:sigDict[pfx+item],})
    2685                     wtFrSum[hId] += hapData['Scale'][0]*General['Mass']
    2686                     if hapData['Pref.Ori.'][0] == 'MD':
    2687                         hapData['Pref.Ori.'][1] = parmDict[pfx+'MD']
    2688                         if pfx+'MD' in sigDict:
    2689                             PhFrExtPOSig.update({pfx+'MD':sigDict[pfx+'MD'],})
    2690                     else:                           #'SH' spherical harmonics
    2691                         for item in hapData['Pref.Ori.'][5]:
    2692                             hapData['Pref.Ori.'][5][item] = parmDict[pfx+item]
    2693                             if pfx+item in sigDict:
    2694                                 PhFrExtPOSig.update({pfx+item:sigDict[pfx+item],})
    26952694                SizeMuStrSig.update({pfx+'Mustrain':[[0,0,0],[0 for i in range(len(hapData['Mustrain'][4]))]],
    26962695                    pfx+'Size':[[0,0,0],[0 for i in range(len(hapData['Size'][4]))]],
     
    27252724                    if pfx+name in sigDict:
    27262725                        SizeMuStrSig[pfx+'HStrain'][name] = sigDict[pfx+name]
    2727                 if Phases[phase]['General']['Type'] != 'magnetic' and not parmDict[pfx+'LeBail']:
     2726                if Phases[phase]['General']['Type'] != 'magnetic':
    27282727                    for name in ['BabA','BabU']:
    27292728                        hapData['Babinet'][name][0] = parmDict[pfx+name]
    2730                         if pfx+name in sigDict:
     2729                        if pfx+name in sigDict and not parmDict[pfx+'LeBail']:
    27312730                            BabSig[pfx+name] = sigDict[pfx+name]               
    27322731               
Note: See TracChangeset for help on using the changeset viewer.