Changeset 1166
 Timestamp:
 Dec 15, 2013 3:20:41 PM (8 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASIIimage.py
r1165 r1166 247 247 x = radii[0]*cosd(a) 248 248 y = radii[1]*sind(a) 249 X = (cphi*x +sphi*y+cent[0])*scalex #convert mm to pixels250 Y = ( sphi*x+cphi*y+cent[1])*scaley249 X = (cphi*xsphi*y+cent[0])*scalex #convert mm to pixels 250 Y = (sphi*x+cphi*y+cent[1])*scaley 251 251 X,Y,I,J = ImageLocalMax(image,pix,X,Y) 252 252 if I and J and I/J > reject: … … 289 289 zdis = (fplusfminus)/2. 290 290 else: #hyperbola! 291 f = d* tanb*stth/(cosb+stth)292 v = d*( tanb+tand(tthtilt))293 delt = d*stth*(1 +stth*cosb)/(sinb*cosb*(stth+cosb))291 f = d*abs(tanb)*stth/(cosb+stth) 292 v = d*(abs(tanb)+tand(tthabs(tilt))) 293 delt = d*stth*(1.+stth*cosb)/(abs(sinb)*cosb*(stth+cosb)) 294 294 eps = (vf)/(deltv) 295 295 radii[0] = eps*(deltf)/np.sqrt(eps**21.) #minor axis 296 296 radii[1] = eps*(deltf)/(eps**21.) #major axis 297 zdis = f+radii[1]*eps 297 if tilt > 0: 298 zdis = f+radii[1]*eps 299 else: 300 zdis = f 298 301 #NB: zdis is  to major axis & phi is rotation of minor axis 299 302 #thus shift from beam to ellipse center is [Z*sin(phi),Z*cos(phi)]
Note: See TracChangeset
for help on using the changeset viewer.