Changeset 1131
- Timestamp:
- Oct 30, 2013 4:00:33 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIIO.py
r1127 r1131 477 477 image = ar.array('L',File.read(4*Npix)) 478 478 image = np.array(np.asarray(image),dtype=np.int32) 479 else: 480 if IFD[258][2][0] == 16: 481 print sizexy 482 tifType = 'GE' 483 pixy = (200,200) 484 File.seek(8) 485 if not imageOnly: 486 print 'Read GE-detector tiff file: ',filename 487 image = np.array(ar.array('H',File.read(2*Npix)),dtype=np.int32) 488 479 489 elif 262 in IFD and IFD[262][2][0] > 4: 480 490 tifType = 'DND' … … 503 513 else: 504 514 image = np.array(ar.array('I',File.read(4*Npix)),dtype=np.int32) 515 505 516 elif IFD[273][2][0] == 4096: 506 517 if sizexy[0] == 3072: -
trunk/GSASIIimage.py
r1121 r1131 808 808 else: 809 809 H1 = LRazm 810 H0 [0]/= npcosd(H2[:-1])**2810 H0 /= npcosd(H2[:-1])**2 811 811 if data['Oblique'][1]: 812 H0[0] /= G2pwd.Oblique(data['Oblique'][0],H2[:-1]) 812 H0 /= G2pwd.Oblique(data['Oblique'][0],H2[:-1]) 813 if 'SASD' in data['type'] and data['PolaVal'][1]: 814 H0 /= np.array([G2pwd.Polarization(data['PolaVal'][0],H2[:-1],Azm=azm)[0] for azm in H1[:-1]+np.diff(H1)]) 813 815 Nup += 1 814 816 dlg.Update(Nup) -
trunk/GSASIIimgGUI.py
r1128 r1131 253 253 def OnDataType(event): 254 254 data['type'] = typeSel.GetValue()[:4] 255 wx.CallAfter(UpdateImageControls,G2frame,data,masks) 255 256 256 257 def OnNewColorBar(event): … … 265 266 pass 266 267 azmthOff.SetValue("%.2f"%(data['azmthOff'])) #reset in case of error 268 G2plt.PlotExposedImage(G2frame,event=event) 267 269 268 270 comboSizer = wx.BoxSizer(wx.HORIZONTAL) … … 523 525 G2plt.PlotExposedImage(G2frame,event=event) 524 526 525 dataSizer = wx.FlexGridSizer(5,2,5,5) 527 def OnApplyPola(event): 528 if data['PolaVal'][1]: 529 data['PolaVal'][1] = False 530 else: 531 data['PolaVal'][1] = True 532 533 def OnPolaVal(event): 534 try: 535 value = float(polaVal.GetValue()) 536 if 0.001 <= value <= 0.999: 537 data['PolaVal'][0] = value 538 else: 539 raise ValueError 540 except ValueError: 541 pass 542 polaVal.SetValue('%.3f'%(data['PolaVal'][0])) 543 544 dataSizer = wx.FlexGridSizer(5,2,5,3) 526 545 dataSizer.Add(wx.StaticText(parent=G2frame.dataDisplay,label=' Integration coefficients'),0, 527 546 wx.ALIGN_CENTER_VERTICAL) … … 586 605 littleSizer.Add(obliqVal,0,wx.ALIGN_CENTER_VERTICAL) 587 606 dataSizer.Add(littleSizer,0,) 607 if 'SASD' in data['type']: 608 littleSizer = wx.BoxSizer(wx.HORIZONTAL) 609 setPolariz = wx.CheckBox(parent=G2frame.dataDisplay,label='Apply polarization?') 610 dataSizer.Add(setPolariz,0,wx.ALIGN_CENTER_VERTICAL) 611 setPolariz.Bind(wx.EVT_CHECKBOX, OnApplyPola) 612 setPolariz.SetValue(data['PolaVal'][1]) 613 littleSizer.Add(wx.StaticText(G2frame.dataDisplay,label='Value (0.001-0.999) '),0, 614 wx.ALIGN_CENTER_VERTICAL) 615 polaVal = wx.TextCtrl(parent=G2frame.dataDisplay,value='%.3f'%(data['PolaVal'][0]), 616 style=wx.TE_PROCESS_ENTER) 617 polaVal.Bind(wx.EVT_TEXT_ENTER,OnPolaVal) 618 polaVal.Bind(wx.EVT_KILL_FOCUS,OnPolaVal) 619 littleSizer.Add(polaVal,0,wx.ALIGN_CENTER_VERTICAL) 620 dataSizer.Add(littleSizer,0,) 588 621 589 622 showLines = wx.CheckBox(parent=G2frame.dataDisplay,label='Show integration limits?') … … 772 805 if 'Oblique' not in data: 773 806 data['Oblique'] = [0.5,False] 807 if 'PolaVal' not in data: 808 data['PolaVal'] = [0.99,False] 774 809 #end fix 775 810 -
trunk/GSASIIplot.py
r1128 r1131 2266 2266 elif G2frame.MaskKey =='p': 2267 2267 polygon = Masks['Polygons'][-1] 2268 if len(polygon) > 2 and event. mouseevent.button == 3:2268 if len(polygon) > 2 and event.button == 3: 2269 2269 x0,y0 = polygon[0] 2270 2270 polygon.append([x0,y0]) … … 2276 2276 elif G2frame.MaskKey =='f': 2277 2277 frame = Masks['Frames'] 2278 if len(frame) > 2 and event. mouseevent.button == 3:2278 if len(frame) > 2 and event.button == 3: 2279 2279 x0,y0 = frame[0] 2280 2280 frame.append([x0,y0]) -
trunk/GSASIIpwd.py
r1073 r1131 163 163 164 164 def Oblique(ObCoeff,Tth): 165 ' needs a doc string'165 'currently assumes detector is normal to beam' 166 166 if ObCoeff: 167 167 return (1.-ObCoeff)/(1.0-np.exp(np.log(ObCoeff)/npcosd(Tth)))
Note: See TracChangeset
for help on using the changeset viewer.