Changeset 2556


Ignore:
Timestamp:
Dec 2, 2016 4:29:37 PM (5 years ago)
Author:
vondreele
Message:

reorder contents of PDF Controls data page to put sample stuff first, then files & finally PDF calc. controls

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIimage.py

    r2551 r2556  
    11251125    rollImage = lambda rho,roll: np.roll(np.roll(rho,roll[0],axis=0),roll[1],axis=1)
    11261126    print 'auto spot search'
    1127     spotMask = ma.array(Image,mask=(Image<10.*np.mean(Image)))
    1128     incre = np.array(Image.shape,dtype=np.float)
     1127    pixelSize = Controls['pixelSize']
     1128    spotMask = ma.array(Image,mask=(Image<3.*np.mean(Image)))
    11291129    indices = (-1,0,1)
    11301130    rolls = np.array([[ix,iy] for ix in indices for iy in indices])
     
    11331133            spotMask = ma.array(spotMask,mask=(spotMask-rollImage(Image,roll)<=0.))
    11341134    indx = np.transpose(spotMask.nonzero())
    1135     peaks = indx
     1135    peaks = indx*pixelSize/1000.
    11361136    mags = spotMask[spotMask.nonzero()]
    1137     print zip(peaks,mags)
    1138    
    1139        
     1137                   
     1138   
     1139       
  • trunk/GSASIIplot.py

    r2551 r2556  
    41414141            item = G2frame.itemPicked
    41424142            pixelSize = Data['pixelSize']
    4143             scalex = 1000./pixelSize[0]
     4143            scalex = 1000./pixelSize[0]         #microns --> 1/mm
    41444144            scaley = 1000./pixelSize[1]
    41454145            if item and G2frame.PatternTree.GetItemText(G2frame.PickId) == 'Image Controls':
     
    44534453
    44544454    imScale = 1
    4455     if len(G2frame.ImageZ) > 1024:
    4456         imScale = len(G2frame.ImageZ)/1024
     4455    maxpix = 2048
     4456    if len(G2frame.ImageZ) > maxpix:
     4457        imScale = len(G2frame.ImageZ)/maxpix
    44574458    sizexy = Data['size']
    44584459    pixelSize = Data['pixelSize']
  • trunk/GSASIIpwdGUI.py

    r2554 r2556  
    51955195    G2frame.dataFrame.Bind(wx.EVT_MENU, OnComputeAllPDF, id=G2gd.wxID_PDFCOMPUTEALL)
    51965196    mainSizer = wx.BoxSizer(wx.VERTICAL)
     5197
     5198    ElList = data['ElList']
     5199    mainSizer.Add((5,5),0)
     5200    if not ElList:
     5201        mainSizer.Add(wx.StaticText(G2frame.dataDisplay,label=' Sample information: fill in this 1st'),0,WACV)
     5202    else:
     5203        mainSizer.Add(wx.StaticText(G2frame.dataDisplay,label=' Sample information: '),0,WACV)
     5204    mainSizer.Add((5,5),0)   
     5205    Abs = G2lat.CellAbsorption(ElList,data['Form Vol'])
     5206    Trans = G2pwd.Transmission(data['Geometry'],Abs*data['Pack'],data['Diam'])
     5207    elemSizer = wx.FlexGridSizer(0,3,5,1)
     5208    for El in ElList:
     5209        FillElemSizer(elemSizer,ElList[El])
     5210    mainSizer.Add(elemSizer,0)
     5211    mainSizer.Add((5,5),0)   
     5212    midSizer = wx.BoxSizer(wx.HORIZONTAL)
     5213    midSizer.Add(wx.StaticText(G2frame.dataDisplay,label=' Formula volume: '),0,WACV)
     5214    formVol = wx.TextCtrl(G2frame.dataDisplay,value='%.2f'%(data['Form Vol']))
     5215    formVol.Bind(wx.EVT_TEXT_ENTER,OnFormVol)       
     5216    formVol.Bind(wx.EVT_KILL_FOCUS,OnFormVol)
     5217    midSizer.Add(formVol,0)
     5218    midSizer.Add(wx.StaticText(G2frame.dataDisplay,
     5219        label=' Theoretical absorption: %.4f cm-1 Sample absorption: %.4f cm-1'%(Abs,Abs*data['Pack'])),
     5220        0,WACV)
     5221    mainSizer.Add(midSizer,0)
     5222    mainSizer.Add((5,5),0)
     5223    geoBox = wx.BoxSizer(wx.HORIZONTAL)
     5224    geoBox.Add(wx.StaticText(G2frame.dataDisplay,label=' Sample geometry: '),0,WACV)
     5225    choice = ['Cylinder','Bragg-Brentano','Tilting flat plate in transmission','Fixed flat plate']
     5226    geometry = wx.ComboBox(G2frame.dataDisplay,value=data['Geometry'],choices=choice,
     5227            style=wx.CB_READONLY|wx.CB_DROPDOWN)
     5228    geometry.Bind(wx.EVT_COMBOBOX, OnGeometry)
     5229    geoBox.Add(geometry,0)
     5230    geoBox.Add(wx.StaticText(G2frame.dataDisplay,label=' Sample diameter/thickness, mm: '),0,WACV)
     5231    diam = wx.TextCtrl(G2frame.dataDisplay,value='%.3f'%(data['Diam']))
     5232    diam.Bind(wx.EVT_TEXT_ENTER,OnDiameter)       
     5233    diam.Bind(wx.EVT_KILL_FOCUS,OnDiameter)
     5234#    diam.Bind(wx.EVT_SET_FOCUS,OnShowTip(G2frame,'tip')) #this doesn't work - what would????
     5235    geoBox.Add(diam,0)
     5236    mainSizer.Add(geoBox,0)
     5237    mainSizer.Add((5,5),0)   
     5238    geoBox = wx.BoxSizer(wx.HORIZONTAL)
     5239    geoBox.Add(wx.StaticText(G2frame.dataDisplay,label=' Packing: '),0,WACV)
     5240    pack = wx.TextCtrl(G2frame.dataDisplay,value='%.2f'%(data['Pack']))
     5241    pack.Bind(wx.EVT_TEXT_ENTER,OnPacking)       
     5242    pack.Bind(wx.EVT_KILL_FOCUS,OnPacking)
     5243    geoBox.Add(pack,0)
     5244    geoBox.Add(wx.StaticText(G2frame.dataDisplay,label=' Sample transmission: %.3f %%'%(Trans)),0,WACV)   
     5245    mainSizer.Add(geoBox,0)
     5246    mainSizer.Add((5,5),0)   
    51975247    mainSizer.Add(wx.StaticText(parent=G2frame.dataDisplay,label=' PDF data files: '),0,WACV)
    5198     mainSizer.Add((5,5),0)
     5248    mainSizer.Add((5,5),0)   
    51995249    if 'C' in inst['Type'][0]:
    52005250        str = ' Sample file: PWDR %s   Wavelength, A: %.5f  Energy, keV: %.3f  Polariz.: %.2f '%(dataFile[3:],wave,keV,polariz)
     
    52215271    mainSizer.Add(fileSizer,0)
    52225272    mainSizer.Add((5,5),0)
    5223     mainSizer.Add(wx.StaticText(G2frame.dataDisplay,label=' Sample information: '),0,WACV)
    5224     mainSizer.Add((5,5),0)   
    52255273
    5226     ElList = data['ElList']
    5227     Abs = G2lat.CellAbsorption(ElList,data['Form Vol'])
    5228     Trans = G2pwd.Transmission(data['Geometry'],Abs*data['Pack'],data['Diam'])
    5229     elemSizer = wx.FlexGridSizer(0,3,5,1)
    5230     for El in ElList:
    5231         FillElemSizer(elemSizer,ElList[El])
    5232     mainSizer.Add(elemSizer,0)
    5233     mainSizer.Add((5,5),0)   
    5234     midSizer = wx.BoxSizer(wx.HORIZONTAL)
    5235     midSizer.Add(wx.StaticText(G2frame.dataDisplay,label=' Formula volume: '),0,WACV)
    5236     formVol = wx.TextCtrl(G2frame.dataDisplay,value='%.2f'%(data['Form Vol']))
    5237     formVol.Bind(wx.EVT_TEXT_ENTER,OnFormVol)       
    5238     formVol.Bind(wx.EVT_KILL_FOCUS,OnFormVol)
    5239     midSizer.Add(formVol,0)
    5240     midSizer.Add(wx.StaticText(G2frame.dataDisplay,
    5241         label=' Theoretical absorption: %.4f cm-1 Sample absorption: %.4f cm-1'%(Abs,Abs*data['Pack'])),
    5242         0,WACV)
    5243     mainSizer.Add(midSizer,0)
    5244     mainSizer.Add((5,5),0)   
    5245 
    5246     geoBox = wx.BoxSizer(wx.HORIZONTAL)
    5247     geoBox.Add(wx.StaticText(G2frame.dataDisplay,label=' Sample geometry: '),0,WACV)
    5248     choice = ['Cylinder','Bragg-Brentano','Tilting flat plate in transmission','Fixed flat plate']
    5249     geometry = wx.ComboBox(G2frame.dataDisplay,value=data['Geometry'],choices=choice,
    5250             style=wx.CB_READONLY|wx.CB_DROPDOWN)
    5251     geometry.Bind(wx.EVT_COMBOBOX, OnGeometry)
    5252     geoBox.Add(geometry,0)
    5253     geoBox.Add(wx.StaticText(G2frame.dataDisplay,label=' Sample diameter/thickness, mm: '),0,WACV)
    5254     diam = wx.TextCtrl(G2frame.dataDisplay,value='%.3f'%(data['Diam']))
    5255     diam.Bind(wx.EVT_TEXT_ENTER,OnDiameter)       
    5256     diam.Bind(wx.EVT_KILL_FOCUS,OnDiameter)
    5257 #    diam.Bind(wx.EVT_SET_FOCUS,OnShowTip(G2frame,'tip')) #this doesn't work - what would????
    5258     geoBox.Add(diam,0)
    5259     mainSizer.Add(geoBox,0)
    5260     mainSizer.Add((5,5),0)   
    5261     geoBox = wx.BoxSizer(wx.HORIZONTAL)
    5262     geoBox.Add(wx.StaticText(G2frame.dataDisplay,label=' Packing: '),0,WACV)
    5263     pack = wx.TextCtrl(G2frame.dataDisplay,value='%.2f'%(data['Pack']))
    5264     pack.Bind(wx.EVT_TEXT_ENTER,OnPacking)       
    5265     pack.Bind(wx.EVT_KILL_FOCUS,OnPacking)
    5266     geoBox.Add(pack,0)
    5267     geoBox.Add(wx.StaticText(G2frame.dataDisplay,label=' Sample transmission: %.3f %%'%(Trans)),0,WACV)   
    5268     mainSizer.Add(geoBox,0)
    5269     mainSizer.Add((5,5),0)   
    52705274       
    52715275    mainSizer.Add(wx.StaticText(parent=G2frame.dataDisplay,label=' S(Q)->F(Q)->G(R) controls: '),0,WACV)
Note: See TracChangeset for help on using the changeset viewer.