Changeset 4709 for trunk/GSASIIimgGUI.py


Ignore:
Timestamp:
Jan 4, 2021 10:41:46 AM (2 years ago)
Author:
vondreele
Message:

new (BT mostly) version of HessianLSQ & additions; fix nan problem in max shift/esd output
fix file/image name/replace handling for gain maps

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIimgGUI.py

    r4698 r4709  
    185185            GainMap = np.where(GainMap < 800,1000,GainMap)
    186186            G2IO.PutG2Image(newimagefile,[],data,Npix,GainMap)
    187             Id = G2frame.GPXtree.AppendItem(parent=G2frame.root,text='IMG '+os.path.split(newimagefile)[1])
    188             G2frame.GPXtree.SetItemPyData(Id,[Npix,newimagefile])
    189             G2frame.GPXtree.SetItemPyData(G2frame.GPXtree.AppendItem(Id,text='Comments'),[])
    190             G2frame.GPXtree.SetItemPyData(G2frame.GPXtree.AppendItem(Id,text='Image Controls'),Data)
    191             G2frame.GPXtree.SetItemPyData(G2frame.GPXtree.AppendItem(Id,text='Masks'),masks)
     187            GMname = 'IMG '+os.path.split(newimagefile)[1]
     188            Id = G2gd.GetGPXtreeItemId(G2frame,G2frame.root,GMname)
     189            if not Id:           
     190                Id = G2frame.GPXtree.AppendItem(parent=G2frame.root,text=GMname)
     191                G2frame.GPXtree.SetItemPyData(Id,[Npix,newimagefile])
     192                G2frame.GPXtree.SetItemPyData(G2frame.GPXtree.AppendItem(Id,text='Comments'),[])
     193                G2frame.GPXtree.SetItemPyData(G2frame.GPXtree.AppendItem(Id,text='Image Controls'),Data)
     194                G2frame.GPXtree.SetItemPyData(G2frame.GPXtree.AppendItem(Id,text='Masks'),masks)
     195            else:
     196                G2frame.GPXtree.SetItemPyData(Id,[Npix,newimagefile])
     197                G2frame.GPXtree.SetItemPyData(G2gd.GetGPXtreeItemId(G2frame,Id,'Comments'),[])
     198                G2frame.GPXtree.SetItemPyData(G2gd.GetGPXtreeItemId(G2frame,Id,'Image Controls'),Data)
     199                G2frame.GPXtree.SetItemPyData(G2gd.GetGPXtreeItemId(G2frame,Id,'Masks'),masks)
    192200            G2frame.GPXtree.Expand(Id)
    193201            G2frame.GPXtree.SelectItem(Id)      #to show the gain map & put it in the list
Note: See TracChangeset for help on using the changeset viewer.