Changeset 1384
- Timestamp:
- Jun 16, 2014 10:33:13 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIIO.py
r1376 r1384 387 387 nframes -= 1 388 388 image = np.reshape(image,(sizexy[1],sizexy[0])) 389 data = {'pixelSize': (200,200),'wavelength':0.15,'distance':250.0,'center':[204.8,204.8],'size':sizexy}389 data = {'pixelSize':[200,200],'wavelength':0.15,'distance':250.0,'center':[204.8,204.8],'size':sizexy} 390 390 File.close() 391 391 if imageOnly: … … 591 591 image = np.flipud(np.array(np.asarray(marFrame.image),dtype=np.int32)) 592 592 tifType = marFrame.filetitle 593 pixy = (marFrame.pixelsizeX/1000.0,marFrame.pixelsizeY/1000.0)593 pixy = [marFrame.pixelsizeX/1000.0,marFrame.pixelsizeY/1000.0] 594 594 head = marFrame.outputHead() 595 595 # extract resonable wavelength from header … … 619 619 tifType = 'Pilatus' 620 620 dataType = 0 621 pixy = (172,172)621 pixy = [172,172] 622 622 File.seek(4096) 623 623 if not imageOnly: … … 628 628 if IFD[258][2][0] == 16: 629 629 tifType = 'GE' 630 pixy = (200,200)630 pixy = [200,200] 631 631 File.seek(8) 632 632 if not imageOnly: … … 635 635 elif IFD[258][2][0] == 32: 636 636 tifType = 'CHESS' 637 pixy = (200,200)637 pixy = [200,200] 638 638 File.seek(8) 639 639 if not imageOnly: … … 643 643 elif 262 in IFD and IFD[262][2][0] > 4: 644 644 tifType = 'DND' 645 pixy = (158,158)645 pixy = [158,158] 646 646 File.seek(512) 647 647 if not imageOnly: … … 650 650 elif sizexy == [1536,1536]: 651 651 tifType = 'APS Gold' 652 pixy = (150,150)652 pixy = [150,150] 653 653 File.seek(64) 654 654 if not imageOnly: … … 659 659 if IFD[258][2][0] == 32: 660 660 tifType = 'PE' 661 pixy = (200,200)661 pixy = [200,200] 662 662 File.seek(8) 663 663 if not imageOnly: … … 670 670 elif IFD[273][2][0] == 4096: 671 671 if sizexy[0] == 3072: 672 pixy = (73,73)672 pixy = [73,73] 673 673 tifType = 'MAR225' 674 674 else: 675 pixy = (158,158)675 pixy = [158,158] 676 676 tifType = 'MAR325' 677 677 File.seek(4096) … … 690 690 if IFD[258][2][0] == 16: 691 691 tifType = 'scanCCD' 692 pixy = (9,9)692 pixy = [9,9] 693 693 File.seek(8) 694 694 if not imageOnly: … … 697 697 elif IFD[273][2][0] == 4096: 698 698 tifType = 'Rayonix' 699 pixy = (73.242,73.242)699 pixy = [73.242,73.242] 700 700 File.seek(4096) 701 701 if not imageOnly: -
trunk/GSASIIgrid.py
r1381 r1384 4765 4765 elif 'IMG' in G2frame.PatternTree.GetItemText(item): 4766 4766 G2frame.Image = item 4767 G2frame.dataFrame.SetTitle('Image Data') 4768 data = G2frame.PatternTree.GetItemPyData(GetPatternTreeItemId( \ 4769 G2frame,item,'Image Controls')) 4770 G2imG.UpdateImageData(G2frame,data) 4767 4771 G2plt.PlotImage(G2frame,newPlot=True) 4768 4772 elif 'PKS' in G2frame.PatternTree.GetItemText(item): -
trunk/GSASIIimage.py
r1375 r1384 882 882 H1 = LRazm 883 883 H0 /= npcosd(H2[:-1]) #**2? I don't think so, **1 is right for powders 884 if 'SASD' in data['Type']: 885 H0 /= npcosd(H2[:-1]) #one more for small angle scattering data? 884 886 if data['Oblique'][1]: 885 887 H0 /= G2pwd.Oblique(data['Oblique'][0],H2[:-1]) -
trunk/GSASIIimgGUI.py
r1380 r1384 39 39 cosd = lambda x: math.cos(x*math.pi/180.) 40 40 asind = lambda x: 180.*math.asin(x)/math.pi 41 42 ################################################################################ 43 ##### Image Data 44 ################################################################################ 45 def UpdateImageData(G2frame,data): 46 47 def OnPixVal(event): 48 Obj = event.GetEventObject() 49 id = Indx[Obj.GetId()] 50 try: 51 data['pixelSize'][id] = min(500,max(10,float(Obj.GetValue()))) 52 except ValueError: 53 pass 54 Obj.SetValue('%.3f'%(data['pixelSize'][id])) 55 G2plt.PlotExposedImage(G2frame,newPlot=True,event=event) 56 57 58 59 if G2frame.dataDisplay: 60 G2frame.dataDisplay.Destroy() 61 if not G2frame.dataFrame.GetStatusBar(): 62 G2frame.dataFrame.CreateStatusBar() 63 G2frame.dataDisplay = wx.Panel(G2frame.dataFrame) 64 mainSizer = wx.BoxSizer(wx.VERTICAL) 65 mainSizer.Add(wx.StaticText(G2frame.dataDisplay, 66 label='Do not change anything here unless you are absolutely sure!'),0,WACV) 67 pixSize = wx.FlexGridSizer(0,4,5,5) 68 pixLabels = [u'Pixel X-dimension (\xb5m)',u'Pixel Y-dimension (\xb5m)'] 69 Indx = {} 70 for i,[pixLabel,pix] in enumerate(zip(pixLabels,data['pixelSize'])): 71 pixSize.Add(wx.StaticText(G2frame.dataDisplay,label=pixLabel),0,WACV) 72 pixVal = wx.TextCtrl(G2frame.dataDisplay,value='%.3f'%(pix),style=wx.TE_PROCESS_ENTER) 73 Indx[pixVal.GetId()] = i 74 pixVal.Bind(wx.EVT_TEXT_ENTER,OnPixVal) 75 pixVal.Bind(wx.EVT_KILL_FOCUS,OnPixVal) 76 pixSize.Add(pixVal,0,WACV) 77 mainSizer.Add(pixSize,0) 78 79 mainSizer.Layout() 80 G2frame.dataDisplay.SetSizer(mainSizer) 81 fitSize = mainSizer.Fit(G2frame.dataFrame) 82 G2frame.dataFrame.setSizePosLeft(fitSize) 83 G2frame.dataDisplay.SetSize(fitSize) 41 84 42 85 ################################################################################ … … 63 106 data['binType'] = 'log(q)' 64 107 #end patch 65 66 108 67 109 # Menu items
Note: See TracChangeset
for help on using the changeset viewer.