Changeset 2223 for trunk/GSASIIimgGUI.py


Ignore:
Timestamp:
Apr 23, 2016 10:23:15 AM (6 years ago)
Author:
vondreele
Message:

make min Threshold = 0 for images on import; anything else is too confusing
further mods to OnCopyControls? - simplify & prevent image from having self as dark or background
& not allow setting of dark or background to current image

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIimgGUI.py

    r2222 r2223  
    256256            G2frame.ErrorDialog('Nothing to copy controls to','There must be more than one "IMG" pattern')
    257257            return
    258 # set up source
    259         Data = copy.deepcopy(data)
    260         Data['showLines'] = True
    261         Data['ring'] = []
    262         Data['rings'] = []
    263         Data['ellipses'] = []
    264         Data['setDefault'] = False
    265258        Source = G2frame.PatternTree.GetItemText(G2frame.Image)
    266259        Names.pop(Names.index(Source))
     
    276269                    CId = G2gd.GetPatternTreeItemId(G2frame,Id,'Image Controls')
    277270                    oldData = copy.deepcopy(G2frame.PatternTree.GetItemPyData(CId))
    278 #                    Data['range'] = oldData['range']
     271                    Data = copy.deepcopy(data)
    279272                    Data['size'] = oldData['size']
    280273                    Data['GonioAngles'] = oldData.get('GonioAngles', [0.,0.,0.])
     
    282275                    Data['rings'] = []
    283276                    Data['ellipses'] = []
     277                    if name == Data['dark image'][0]:
     278                        Data['dark image'] = ['',-1.]
     279                    if name == Data['background image'][0]:
     280                        Data['background image'] = ['',-1.]
    284281                    G2frame.PatternTree.SetItemPyData(G2gd.GetPatternTreeItemId(G2frame,Id, 'Image Controls'),copy.deepcopy(Data))
    285282        finally:
     
    859856        backSizer.Add(wx.StaticText(G2frame.dataDisplay,-1,' Dark image'),0,WACV)
    860857        Choices = ['',]+G2gd.GetPatternTreeDataNames(G2frame,['IMG ',])
     858        Source = G2frame.PatternTree.GetItemText(G2frame.Image)
     859        Choices.pop(Choices.index(Source))
    861860        darkImage = wx.ComboBox(parent=G2frame.dataDisplay,value=data['dark image'][0],choices=Choices,
    862861            style=wx.CB_READONLY|wx.CB_DROPDOWN)
     
    877876
    878877        backSizer.Add(wx.StaticText(G2frame.dataDisplay,-1,' Background image'),0,WACV)
    879         Choices = ['',]+G2gd.GetPatternTreeDataNames(G2frame,['IMG ',])
    880878        backImage = wx.ComboBox(parent=G2frame.dataDisplay,value=data['background image'][0],choices=Choices,
    881879            style=wx.CB_READONLY|wx.CB_DROPDOWN)
Note: See TracChangeset for help on using the changeset viewer.