Ignore:
Timestamp:
Sep 27, 2017 3:18:40 PM (4 years ago)
Author:
vondreele
Message:

implement fix FXU for sequential refinements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIstrMain.py

    r3095 r3100  
    261261    '''
    262262    Removes unused parameters from phase varylist if phase not in histogram
    263     #TODO - implement "Fix F,X,U" for seq refinement here
     263    #TODO - implement "Fix FXU" for seq refinement here - done?
    264264    '''
    265     pIds = []
     265    NewVary = []
    266266    for phase in Phases:
    267267        if histogram not in Phases[phase]['Histograms']: continue
    268268        if Phases[phase]['Histograms'][histogram]['Use']:
    269             pIds.append(str(Phases[phase]['pId']))
    270     return [item for item in phaseVary if item.split(':')[0] in pIds]
     269            pId = Phases[phase]['pId']
     270            newVary = [item for item in phaseVary if item.split(':')[0] == str(pId)]
     271            FixVals = Phases[phase]['Histograms'][histogram].get('Fix FXU',' ')
     272            if 'F' in FixVals:
     273                newVary = [item for item in newVary if not 'AF' in item]
     274            if 'X' in FixVals:
     275                newVary = [item for item in newVary if not 'dA' in item]
     276            if 'U' in FixVals:
     277                newVary = [item for item in newVary if not 'AU' in item]
     278            if 'M' in FixVals:
     279                newVary = [item for item in newVary if not 'AM' in item]
     280            NewVary += newVary
     281    return NewVary
    271282
    272283def SeqRefine(GPXfile,dlg,PlotFunction=None,G2frame=None):
     
    334345            print("Error: not found!")
    335346            continue
    336     #TODO - implement "Fix F,X,U" for seq refinement here
     347    #TODO - implement "Fix FXU" for seq refinement here - done?
     348        redphaseVary = phaseCheck(phaseVary,Phases,histogram)
    337349        Histo = {histogram:Histograms[histogram],}
    338         redphaseVary = phaseCheck(phaseVary,Phases,histogram)
    339350        hapVary,hapDict,controlDict = G2stIO.GetHistogramPhaseData(Phases,Histo,Print=False)
    340351        calcControls.update(controlDict)
Note: See TracChangeset for help on using the changeset viewer.