Ignore:
Timestamp:
Sep 13, 2018 1:58:35 PM (4 years ago)
Author:
toby
Message:

remove vars from constraints (see G2obj.removeNonRefined); new tutorial

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIconstrGUI.py

    r3588 r3599  
    175175    globalList = list(rbDict.keys())
    176176    globalList.sort()
     177    globalList = G2obj.removeNonRefined(globalList)   # remove any non-refinable prms from list
    177178    try:
    178179        AtomDict = dict([Phases[phase]['pId'],Phases[phase]['Atoms']] for phase in Phases)
    179180    except KeyError:
    180181        G2frame.ErrorDialog('Constraint Error','Constraints cannot be set until a cycle of least squares'+
    181                             'has been run.\nWe suggest you refine a scale factor.')
     182                            ' has been run.\nWe suggest you refine a scale factor.')
    182183        return
    183184
     
    203204            phaseAtNames[item] = ''
    204205            phaseAtTypes[item] = ''
     206    phaseList = G2obj.removeNonRefined(phaseList)  # remove any non-refinable prms from list
    205207             
    206208    # create a list of the hist*phase variables
     
    221223            if sj not in wildList: wildList.append(sj)
    222224        hapList = wildList
     225    hapList = G2obj.removeNonRefined(hapList)  # remove any non-refinable prms from list
    223226    histVary,histDict,controlDict = G2stIO.GetHistogramData(histDict,Print=False)
    224     histList = []
    225     for item in histDict:
    226         if item.split(':')[2] not in ['Omega','Type','Chi','Phi',
    227                                       'Azimuth','Gonio. radius',
    228                                       'Lam1','Lam2','Back','Temperature','Pressure',
    229                                       'FreePrm1','FreePrm2','FreePrm3',
    230                                       ]:
    231             histList.append(item)
     227    histList = list(histDict.keys())
    232228    histList.sort()
    233229    if seqList: # convert histogram # to wildcard
     
    240236            if sj not in wildList: wildList.append(sj)
    241237        histList = wildList
     238    histList = G2obj.removeNonRefined(histList)  # remove any non-refinable prms from list
    242239    Indx = {}
    243240    G2frame.Page = [0,'phs']
Note: See TracChangeset for help on using the changeset viewer.