Changeset 2546 for trunk/GSASIIimage.py
 Timestamp:
 Nov 22, 2016 1:08:48 PM (5 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASIIimage.py
r2522 r2546 21 21 import numpy.linalg as nl 22 22 import numpy.ma as ma 23 import numpy.fft as fft24 import scipy.signal as signal25 23 import polymask as pm 26 24 from scipy.optimize import leastsq … … 32 30 import GSASIIpwd as G2pwd 33 31 import GSASIIspc as G2spc 34 import fellipse as fel35 32 36 33 # trig functions in degrees … … 91 88 ''' gives ellipse center coordinates 92 89 ''' 93 b,c,d,f, g,a = p[1]/2, p[2], p[3]/2, p[4]/2, p[5], p[0]90 b,c,d,f,a = p[1]/2, p[2], p[3]/2, p[4]/2, p[0] 94 91 num = b*ba*c 95 92 x0=(c*db*f)/num … … 101 98 range will be 90 to 90 deg 102 99 ''' 103 b,c, d,f,g,a = p[1]/2, p[2], p[3]/2, p[4]/2, p[5], p[0]100 b,c,a = p[1]/2, p[2], p[0] 104 101 return 0.5*npatand(2*b/(ac)) 105 102 … … 170 167 phi0 = npatan2d(yparms['detY'],xparms['detX']) 171 168 dxy = peneCorr(tth,parms['dep'],parms['tilt'],phi0) 172 ttth = nptand(tth)173 169 stth = npsind(tth) 174 170 cosb = npcosd(parms['tilt']) … … 176 172 tbm = nptand((tthparms['tilt'])/2.) 177 173 tbp = nptand((tth+parms['tilt'])/2.) 178 sinb = npsind(parms['tilt'])179 174 d = parms['dist']+dxy 180 175 fplus = d*tanb*stth/(cosb+stth) … … 277 272 ''' 278 273 radii = [0,0] 279 ttth = tand(tth)280 274 stth = sind(tth) 281 ctth = cosd(tth)282 275 cosb = cosd(tilt) 283 276 tanb = tand(tilt) … … 332 325 cent = data['center'] 333 326 tth = 2.0*asind(data['wavelength']/(2.*dsp)) 334 ttth = tand(tth)335 327 stth = sind(tth) 336 ctth = cosd(tth)337 328 cosb = cosd(tilt) 338 329 if radii[0] > 0.: … … 680 671 Ring0 = makeRing(dsp,ellipse,3,cutoff,scalex,scaley,G2frame.ImageZ)[0] 681 672 ttth = nptand(tth) 682 stth = npsind(tth)683 673 ctth = npcosd(tth) 684 674 #1st estimate of tilt; assume ellipse  don't know sign though … … 879 869 numAzms = data['outAzimuths'] 880 870 numChans = data['outChannels'] 881 azmOff = data['azmthOff']882 871 Dazm = (LRazm[1]LRazm[0])/numAzms 883 872 if '2theta' in data.get('binType','2theta'): … … 893 882 NST = np.zeros(shape=(numAzms,numChans),order='F',dtype=np.float32) 894 883 H0 = np.zeros(shape=(numAzms,numChans),order='F',dtype=np.float32) 895 imageN = len(image)896 884 Nx,Ny = data['size'] 897 885 nXBlks = (Nx1)/blkSize+1
Note: See TracChangeset
for help on using the changeset viewer.