Changeset 1763 for trunk/GSASIIplot.py
- Timestamp:
- Mar 25, 2015 5:25:15 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIplot.py
r1761 r1763 3346 3346 Page.canvas.SetToolTipString('') 3347 3347 sizexy = Data['size'] 3348 FlatBkg = Data.get('Flat Bkg',0.) 3348 3349 if event.xdata and event.ydata and len(G2frame.ImageZ): #avoid out of frame errors 3349 3350 Page.canvas.SetToolTipString('%8.2f %8.2fmm'%(event.xdata,event.ydata)) … … 3372 3373 Int = 0 3373 3374 if (0 <= xpix <= sizexy[0]) and (0 <= ypix <= sizexy[1]): 3374 Int = G2frame.ImageZ[ypix][xpix] 3375 Int = G2frame.ImageZ[ypix][xpix]-int(FlatBkg) 3375 3376 tth,azm,D,dsp = G2img.GetTthAzmDsp(xpos,ypos,Data) 3376 3377 Q = 2.*math.pi/dsp … … 3447 3448 return 3448 3449 pixelSize = Data['pixelSize'] 3450 FlatBkg = Data.get('Flat Bkg',0.) 3449 3451 scalex = 1000./pixelSize[0] 3450 3452 scaley = 1000./pixelSize[1] … … 3460 3462 Xpix = Xpos*scalex 3461 3463 Ypix = Ypos*scaley 3462 xpos,ypos,I,J = G2img.ImageLocalMax(G2frame.ImageZ ,pixLimit,Xpix,Ypix)3464 xpos,ypos,I,J = G2img.ImageLocalMax(G2frame.ImageZ-FlatBkg,pixLimit,Xpix,Ypix) 3463 3465 if I and J: 3464 3466 xpos += .5 #shift to pixel center … … 3525 3527 StrSta['d-zero'].append({'Dset':dsp,'Dcalc':0.0,'pixLimit':10,'cutoff':0.5, 3526 3528 'ImxyObs':[[],[]],'ImtaObs':[[],[]],'ImtaCalc':[[],[]],'Emat':[1.0,1.0,1.0]}) 3527 R,r = G2img.MakeStrStaRing(StrSta['d-zero'][-1],G2frame.ImageZ ,Data)3529 R,r = G2img.MakeStrStaRing(StrSta['d-zero'][-1],G2frame.ImageZ-FlatBkg,Data) 3528 3530 if not len(R): 3529 3531 del StrSta['d-zero'][-1] … … 3708 3710 #do threshold mask - "real" mask - others are just bondaries 3709 3711 Zlim = Masks['Thresholds'][1] 3712 FlatBkg = Data.get('Flat Bkg',0.0) 3710 3713 wx.BeginBusyCursor() 3711 3714 try: … … 3715 3718 MA = ma.masked_greater(ma.masked_less(G2frame.ImageZ,Zlim[0]),Zlim[1]) 3716 3719 MaskA = ma.getmaskarray(MA) 3717 A = G2img.ImageCompress(MA,imScale) 3720 A = G2img.ImageCompress(MA,imScale)-FlatBkg 3718 3721 AM = G2img.ImageCompress(MaskA,imScale) 3719 3722 if G2frame.logPlot:
Note: See TracChangeset
for help on using the changeset viewer.