Changeset 623 for trunk/GSASIIphsGUI.py


Ignore:
Timestamp:
May 18, 2012 12:51:55 PM (10 years ago)
Author:
vondreele
Message:

remove powder read from Data menu
remove 'menu' from import menus
use longFormatName as help for import menu items
remove _init_coll_Import_Items
added updateHKLFdata to process HKLF data sets

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIphsGUI.py

    r620 r623  
    770770                try:
    771771                    res = float(kFactor.GetValue())
    772                     if 0.2 <= res <= 1.2:
     772                    if 0.1 <= res <= 1.2:
    773773                        Flip['k-factor'] = res
    774774                except ValueError:
     
    795795            flipRes.Bind(wx.EVT_KILL_FOCUS,OnResVal)
    796796            line2Sizer.Add(flipRes,0,wx.ALIGN_CENTER_VERTICAL)
    797             line2Sizer.Add(wx.StaticText(dataDisplay,label=' k-Factor (0.2-1.2): '),0,wx.ALIGN_CENTER_VERTICAL)
     797            line2Sizer.Add(wx.StaticText(dataDisplay,label=' k-Factor (0.1-1.2): '),0,wx.ALIGN_CENTER_VERTICAL)
    798798            kFactor =  wx.TextCtrl(dataDisplay,value='%.3f'%(Flip['k-factor']),style=wx.TE_PROCESS_ENTER)
    799799            kFactor.Bind(wx.EVT_TEXT_ENTER,OnkFactor)       
     
    33943394                            'Extinction':['Lorentzian','Secondary Type I',{'Eg':[0.0,False]},]}                       
    33953395                    data['Histograms'] = UseList
     3396                    wx.BeginBusyCursor()
     3397                    UpdateHKLFdata(histoName)
     3398                    wx.EndBusyCursor()
    33963399                    wx.CallAfter(UpdateDData)
    33973400            finally:
    33983401                dlg.Destroy()
     3402               
     3403    def UpdateHKLFdata(histoName):
     3404        generalData = data['General']
     3405        Id = G2gd.GetPatternTreeItemId(G2frame,G2frame.root,histoName)
     3406        reflData = G2frame.PatternTree.GetItemPyData(Id)
     3407        SGData = generalData['SGData']
     3408        Cell = generalData['Cell'][1:7]
     3409        G,g = G2lat.cell2Gmat(Cell)
     3410        for ref in reflData:
     3411            H = ref[:3]
     3412            ref[4] = np.sqrt(1./G2lat.calc_rDsq2(H,G))
     3413            iabsnt,mulp,Uniq,phi = G2spc.GenHKLf(H,SGData,Friedel=False)
     3414            ref[3] = mulp/2             #convert from powder mulp.
     3415            ref[11] = Uniq
     3416            ref[12] = phi
     3417        G2frame.PatternTree.SetItemPyData(Id,reflData)
    33993418       
    34003419    def OnPwdrAdd(event):
Note: See TracChangeset for help on using the changeset viewer.