Changeset 2546 for trunk/GSASIIimage.py


Ignore:
Timestamp:
Nov 22, 2016 1:08:48 PM (5 years ago)
Author:
vondreele
Message:

cleanup of all GSASII main routines - remove unused variables, dead code, etc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIimage.py

    r2522 r2546  
    2121import numpy.linalg as nl
    2222import numpy.ma as ma
    23 import numpy.fft as fft
    24 import scipy.signal as signal
    2523import polymask as pm
    2624from scipy.optimize import leastsq
     
    3230import GSASIIpwd as G2pwd
    3331import GSASIIspc as G2spc
    34 import fellipse as fel
    3532
    3633# trig functions in degrees
     
    9188        ''' gives ellipse center coordinates
    9289        '''
    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]
    9491        num = b*b-a*c
    9592        x0=(c*d-b*f)/num
     
    10198        range will be -90 to 90 deg
    10299        '''
    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]
    104101        return 0.5*npatand(2*b/(a-c))
    105102   
     
    170167        phi0 = npatan2d(y-parms['det-Y'],x-parms['det-X'])
    171168        dxy = peneCorr(tth,parms['dep'],parms['tilt'],phi0)
    172         ttth = nptand(tth)
    173169        stth = npsind(tth)
    174170        cosb = npcosd(parms['tilt'])
     
    176172        tbm = nptand((tth-parms['tilt'])/2.)
    177173        tbp = nptand((tth+parms['tilt'])/2.)
    178         sinb = npsind(parms['tilt'])
    179174        d = parms['dist']+dxy
    180175        fplus = d*tanb*stth/(cosb+stth)
     
    277272    '''
    278273    radii = [0,0]
    279     ttth = tand(tth)
    280274    stth = sind(tth)
    281     ctth = cosd(tth)
    282275    cosb = cosd(tilt)
    283276    tanb = tand(tilt)
     
    332325    cent = data['center']
    333326    tth = 2.0*asind(data['wavelength']/(2.*dsp))
    334     ttth = tand(tth)
    335327    stth = sind(tth)
    336     ctth = cosd(tth)
    337328    cosb = cosd(tilt)
    338329    if radii[0] > 0.:
     
    680671    Ring0 = makeRing(dsp,ellipse,3,cutoff,scalex,scaley,G2frame.ImageZ)[0]
    681672    ttth = nptand(tth)
    682     stth = npsind(tth)
    683673    ctth = npcosd(tth)
    684674#1st estimate of tilt; assume ellipse - don't know sign though
     
    879869    numAzms = data['outAzimuths']
    880870    numChans = data['outChannels']
    881     azmOff = data['azmthOff']
    882871    Dazm = (LRazm[1]-LRazm[0])/numAzms
    883872    if '2-theta' in data.get('binType','2-theta'):
     
    893882    NST = np.zeros(shape=(numAzms,numChans),order='F',dtype=np.float32)
    894883    H0 = np.zeros(shape=(numAzms,numChans),order='F',dtype=np.float32)
    895     imageN = len(image)
    896884    Nx,Ny = data['size']
    897885    nXBlks = (Nx-1)/blkSize+1
Note: See TracChangeset for help on using the changeset viewer.