Changeset 4671 for trunk/GSASIIimage.py
 Timestamp:
 Dec 12, 2020 1:30:31 PM (11 months ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASIIimage.py
r4593 r4671 503 503 xyz = LinePlaneCollision(dxyz0,dxyz1,vect,2.*dist*vect) 504 504 if xyz is None: 505 return None 505 return np.zeros(2) 506 # return None 506 507 xyz = np.inner(xyz,makeMat(data['det2theta'],1).T) 507 508 xyz = np.array([0.,0.,dist]) #translate back … … 638 639 distsq = data['distance']**2 639 640 G = ((dxx0x)**2+(dyx0y)**2+distsq)/distsq #for geometric correction = 1/cos(2theta)^2 if tilt=0. 640 return tth,azm,G,dsp641 return [tth,azm,G,dsp] 641 642 642 643 def GetTth(x,y,data): … … 763 764 Ty = np.zeros_like(Tx) 764 765 dsp = wave/(2.0*npsind(Tx/2.0)) 765 xy = np.array([GetDetectorXY(d,azm,data) for d in dsp]).T 766 xy = [GetDetectorXY(d,azm,data) for d in dsp] 767 xy = np.array(xy).T 766 768 xy[1] *= scalex 767 769 xy[0] *= scaley … … 1459 1461 XY = np.array(ringxy).T 1460 1462 Th,Azm = GetTthAzm(XY[0],XY[1],Controls) 1461 pola = G2pwd.Polarization(Controls['PolaVal'][0],Th,Azm90.)[0] 1463 pola = G2pwd.Polarization(Controls['PolaVal'][0],Th,Azm90.)[0] #get pola not dpola 1462 1464 ring['ImxyCalc'] = np.array(ringxy).T[:2] 1463 1465 ringint = np.array([float(Image[int(x*scalex),int(y*scaley)]) for y,x in np.array(ringxy)[:,:2]]) 1464 1466 ringint /= np.mean(ringint) 1465 ringint /= pola 1467 ringint /= pola[0] #just 1st column 1466 1468 G2fil.G2Print (' %s %.3f %s %.3f %s %d'%('dspacing',ring['Dcalc'],'sig(MRD):',np.sqrt(np.var(ringint)),'# points:',len(ringint))) 1467 1469 RingsAI.append(np.array(list(zip(ringazm,ringint))).T)
Note: See TracChangeset
for help on using the changeset viewer.