Ignore:
Timestamp:
Feb 20, 2021 9:43:32 AM (10 months ago)
Author:
toby
Message:

Warn if param limits on constrained vars

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIdataGUI.py

    r4819 r4822  
    51175117            if key not in Controls: Controls[key] = {}
    51185118        wx.EndBusyCursor()
     5119        # check for limits on dependent vars
     5120        consVars = [i for i in reqVaryList if i not in varyList]
     5121        impossible = set(
     5122            [str(i) for i in Controls['parmMinDict'] if i in consVars] +
     5123            [str(i) for i in Controls['parmMaxDict'] if i in consVars])
     5124        if impossible:
     5125            msg = ''
     5126            for i in sorted(impossible):
     5127                if msg: msg += ', '
     5128                msg += i
     5129            msg =  ' &'.join(msg.rsplit(',',1))
     5130            msg = ('Note: limits on variable(s) '+msg+
     5131            ' will be ignored because they are constrained.')
     5132            G2G.G2MessageBox(self,msg,'Limits ignored for constrained vars')
    51195133        # debug stuff
    51205134        #if GSASIIpath.GetConfigValue('debug'):
     
    51225136        #    import imp
    51235137        #    imp.reload(G2G)
    5124         # end debug stuff           
     5138        # end debug stuff   
    51255139        dlg = G2G.ShowLSParms(self,'Least Squares Parameters',parmValDict,
    51265140                    varyList,reqVaryList,Controls)
     5141        dlg.CenterOnParent()
    51275142        dlg.ShowModal()
    51285143        dlg.Destroy()
Note: See TracChangeset for help on using the changeset viewer.