Changeset 1376


Ignore:
Timestamp:
Jun 10, 2014 12:15:43 PM (7 years ago)
Author:
vondreele
Message:

fix problem in LoadControls?
fix integration result names

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIIO.py

    r1364 r1376  
    976976            Azms.append((azms[i+1]+azm)/2.)
    977977    for i,azm in enumerate(azms[:-1]):
    978         name += " Azm= %.2f"%(Azms[i])
     978        Aname = name+" Azm= %.2f"%(Azms[i])
    979979        item, cookie = G2frame.PatternTree.GetFirstChild(G2frame.root)
    980980        nOcc = 0
    981981        while item:
    982982            Name = G2frame.PatternTree.GetItemText(item)
    983             if name in Name:
     983            if Aname in Name:
    984984                nOcc += 1
    985985            item, cookie = G2frame.PatternTree.GetNextChild(G2frame.root, cookie)
    986986        if nOcc:
    987             name += '(%d)'%(nOcc)
     987            Aname += '(%d)'%(nOcc)
    988988        Sample = G2pdG.SetDefaultSample()
    989989        Sample['Gonio. radius'] = data['distance']
     
    991991        Sample['Chi'] = data['GonioAngles'][1]
    992992        Sample['Phi'] = data['GonioAngles'][2]
    993         if 'PWDR' in name:
     993        if 'PWDR' in Aname:
    994994            parms = ['PXC',data['wavelength'],0.0,0.99,1.0,-0.10,0.4,0.30,1.0,0.0001,Azms[i]]    #set polarization for synchrotron radiation!
    995         elif 'SASD' in name:
     995        elif 'SASD' in Aname:
    996996            Sample['Trans'] = data['SampleAbs'][0]
    997997            parms = ['LXC',data['wavelength'],0.0,Azms[i]]
    998998        Y = G2frame.Integrate[0][i]
    999999        W = np.where(Y>0.,1./Y,1.e-6)                    #probably not true
    1000         Id = G2frame.PatternTree.AppendItem(parent=G2frame.root,text=name)
     1000        Id = G2frame.PatternTree.AppendItem(parent=G2frame.root,text=Aname)
    10011001        G2frame.PatternTree.SetItemPyData(G2frame.PatternTree.AppendItem(Id,text='Comments'),Comments)                   
    10021002        G2frame.PatternTree.SetItemPyData(G2frame.PatternTree.AppendItem(Id,text='Limits'),[tuple(Xminmax),Xminmax])
    1003         if 'PWDR' in name:
     1003        if 'PWDR' in Aname:
    10041004            G2frame.PatternTree.SetItemPyData(G2frame.PatternTree.AppendItem(Id,text='Background'),[['chebyschev',1,3,1.0,0.0,0.0],
    10051005                {'nDebye':0,'debyeTerms':[],'nPeaks':0,'peaksList':[]}])
     
    10081008            inst[0][item] = list(inst[0][item])
    10091009        G2frame.PatternTree.SetItemPyData(G2frame.PatternTree.AppendItem(Id,text='Instrument Parameters'),inst)
    1010         if 'PWDR' in name:
     1010        if 'PWDR' in Aname:
    10111011            G2frame.PatternTree.SetItemPyData(G2frame.PatternTree.AppendItem(Id,text='Sample Parameters'),Sample)
    10121012            G2frame.PatternTree.SetItemPyData(G2frame.PatternTree.AppendItem(Id,text='Peak List'),[])
     
    10141014            G2frame.PatternTree.SetItemPyData(G2frame.PatternTree.AppendItem(Id,text='Unit Cells List'),[])
    10151015            G2frame.PatternTree.SetItemPyData(G2frame.PatternTree.AppendItem(Id,text='Reflection Lists'),{})
    1016         elif 'SASD' in name:             
     1016        elif 'SASD' in Aname:             
    10171017            G2frame.PatternTree.SetItemPyData(G2frame.PatternTree.AppendItem(Id,text='Substances'),G2pdG.SetDefaultSubstances())
    10181018            G2frame.PatternTree.SetItemPyData(G2frame.PatternTree.AppendItem(Id,text='Sample Parameters'),Sample)
  • trunk/GSASIIimgGUI.py

    r1375 r1376  
    290290                    S = File.readline()
    291291                data.update(save)
    292                 G2frame.PatternTree.SetItemPyData(G2gd.GetPatternTreeItemId(G2frame,G2frame.Image, 'Image Controls'),copy.deepcopy(Data))
     292                G2frame.PatternTree.SetItemPyData(G2gd.GetPatternTreeItemId(G2frame,G2frame.Image, 'Image Controls'),copy.deepcopy(data))
    293293                UpdateImageControls(G2frame,data,masks)
    294294                G2plt.PlotExposedImage(G2frame,event=event)
Note: See TracChangeset for help on using the changeset viewer.