Changeset 4593
- Timestamp:
- Oct 13, 2020 2:16:15 PM (2 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIimage.py
r4589 r4593 507 507 xyz -= np.array([0.,0.,dist]) #translate back 508 508 xyz = np.inner(xyz,iMN) 509 return xyz[:2]+cent509 return np.squeeze(xyz)[:2]+cent 510 510 511 511 def GetDetectorXY2(dsp,azm,data): … … 638 638 distsq = data['distance']**2 639 639 G = ((dx-x0x)**2+(dy-x0y)**2+distsq)/distsq #for geometric correction = 1/cos(2theta)^2 if tilt=0. 640 return np.array([tth,azm,G,dsp])640 return tth,azm,G,dsp 641 641 642 642 def GetTth(x,y,data): -
trunk/GSASIIplot.py
r4589 r4593 6822 6822 Azm = np.linspace(*aR) 6823 6823 for azm in Azm: 6824 XY = G2img.GetDetectorXY(Dsp( angI,wave),azm,Data)6824 XY = G2img.GetDetectorXY(Dsp(np.squeeze(angI),wave),azm,Data) 6825 6825 if XY is not None: 6826 6826 xy1.append(XY) #what about hyperbola 6827 XY = G2img.GetDetectorXY(Dsp( angO,wave),azm,Data)6827 XY = G2img.GetDetectorXY(Dsp(np.squeeze(angO),wave),azm,Data) 6828 6828 if XY is not None: 6829 6829 xy2.append(XY) #what about hyperbola … … 7248 7248 azm[0] += off 7249 7249 azm[1] -= off 7250 (x1,y1),(x2,y2) = ComputeArc( angI,angO,wave,*azm)7250 (x1,y1),(x2,y2) = ComputeArc(np.squeeze(angI),np.squeeze(angO),wave,*azm) 7251 7251 pI,pO,pL,pU = G2frame.arcList[pick.itemNumber] 7252 7252 pI.set_data((x2,y2)) … … 7717 7717 xyO = [] 7718 7718 arcxO = [] 7719 arcxI = []7720 7719 for azm in Azm: 7721 7720 xy = G2img.GetDetectorXY(dspO,azm,Data) … … 7726 7725 arcxO,arcyO = xyO.T 7727 7726 Plot.plot(arcxO,arcyO,picker=3,label='Otth') 7728 if ellO and ellI and len(arcxO) and len(arcxI):7727 if ellO and ellI and len(arcxO): 7729 7728 Plot.plot([arcxI[0],arcxO[0]],[arcyI[0],arcyO[0]],picker=3,label='Lazm') 7730 7729 Plot.plot([arcxI[-1],arcxO[-1]],[arcyI[-1],arcyO[-1]],picker=3,label='Uazm') … … 7734 7733 cake += delAzm/2. 7735 7734 ind = np.searchsorted(Azm,cake) 7736 if len(arcxO) and len(arcxI):7735 if len(arcxO): 7737 7736 Plot.plot([arcxI[ind],arcxO[ind]],[arcyI[ind],arcyO[ind]],color='k',dashes=(5,5)) 7738 7737 if 'linescan' in Data and Data['linescan'][0] and G2frame.GPXtree.GetItemText(G2frame.PickId) in ['Image Controls',]: … … 7794 7793 for iarc,arc in enumerate(Masks['Arcs']): # drawing arc masks 7795 7794 if arc: 7796 tth,azm,thick = arc 7795 tth,azm,thick = arc 7796 azm = np.squeeze(azm) 7797 7797 wave = Data['wavelength'] 7798 7798 (x1,y1),(x2,y2) = ComputeArc(tth-thick/2.,tth+thick/2.,wave,azm[0],azm[1])
Note: See TracChangeset
for help on using the changeset viewer.