Changeset 2305 for trunk/GSASIIimage.py


Ignore:
Timestamp:
Jun 2, 2016 3:09:39 PM (6 years ago)
Author:
vondreele
Message:

in G2image.ImageIntegrate? force taz to be float-32 (it was float-64 & fortran histogram2d wanted real*4.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIimage.py

    r2304 r2305  
    414414    X = np.dstack([dx.T,dy.T,np.zeros_like(dx.T)])
    415415    Z = np.dot(X,MN).T[2]
    416     tth = npatand(np.sqrt(dx**2+dy**2-Z**2)/(dist-Z))
     416    xyZ = dx**2+dy**2-Z**2   
     417    tth = npatand(np.sqrt(xyZ)/(dist-Z))
    417418    dxy = peneCorr(tth,data['DetDepth'],tilt,npatan2d(dy,dx))
    418     tth = npatan2d(np.sqrt(dx**2+dy**2-Z**2),dist-Z+dxy)
     419    tth = npatan2d(np.sqrt(xyZ),dist-Z+dxy)
    419420    azm = (npatan2d(dy,dx)+data['azmthOff']+720.)%360.
    420421    return tth,azm,G
     
    900901            jFin = min(jBeg+blkSize,Nx)
    901902            # next is most expensive step!
    902 #            print 'before Make'
    903903            TA,tam = Make2ThetaAzimuthMap(data,masks,(iBeg,iFin),(jBeg,jFin),times)           #2-theta & azimuth arrays & create position mask
    904 #            print '\tafter Make'
    905904            Nup += 1
    906905            if dlg:
     
    908907            Block = image[iBeg:iFin,jBeg:jFin]
    909908            t0 = time.time()
    910 #            print 'before Fill'
    911909            tax,tay,taz,tad,tabs = Fill2ThetaAzimuthMap(masks,TA,tam,Block)    #and apply masks
    912 #            print '\tafter Fill'
    913910            del TA; del tam
    914911            times[2] += time.time()-t0
     
    929926                tay = 4.*np.pi*npsind(tay/2.)/data['wavelength']
    930927            t0 = time.time()
     928            taz = np.array((taz*tad/tabs),dtype='float32')
    931929            if any([tax.shape[0],tay.shape[0],taz.shape[0]]):
    932 #                print 'before histo'
    933                 NST,H0 = h2d.histogram2d(len(tax),tax,tay,taz*tad/tabs,
     930                NST,H0 = h2d.histogram2d(len(tax),tax,tay,taz,
    934931                    numAzms,numChans,LRazm,lutth,Dazm,dtth,NST,H0)
    935 #                print '\tafter histo'
    936932            times[3] += time.time()-t0
    937933            Nup += 1
Note: See TracChangeset for help on using the changeset viewer.