Changeset 265 for trunk/GSASIIimage.py


Ignore:
Timestamp:
Apr 19, 2011 3:12:37 PM (12 years ago)
Author:
vondreele
Message:

further progress on implementing pdf calculations
optionally put legends on the pdf plots
attempt implementation of a rotation of the azimuth ranges for multiazimuth integrations -not fully successful

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIimage.py

    r264 r265  
    291291    tilt = data['tilt']
    292292    phi = data['rotation']
     293    LRazim = data['LRazimuth']
    293294    azmthoff = data['azmthOff']
     295    azmRot = data['azmthRotate']
     296    Full = data['fullIntegrate']
    294297    dx = np.array(x-cent[0],dtype=np.float32)
    295298    dy = np.array(y-cent[1],dtype=np.float32)
     
    299302    tth = npatand(np.sqrt(dx**2+dy**2-Z**2)/(dist-Z))
    300303    dsp = wave/(2.*npsind(tth/2.))
    301     azm = npatan2d(dx,-dy)+azmthoff
     304    azm = (npatan2d(dx,-dy)+azmthoff+720.)%360.
     305    if Full:
     306        azm = (azm+azmRot+720.)%360.
     307    else:
     308        azm = np.where(azm<LRazim[0],azm+360.,azm)
    302309    return tth,azm,dsp
    303310   
     
    325332    return abs(avg-curr)/avg < .02
    326333
    327        
    328334def ImageCalibrate(self,data):
    329335    import copy
     
    554560    LUtth = data['IOtth']
    555561    if data['fullIntegrate']:
    556         LRazm = [-180,180]
     562        LRazm = [0,360]
    557563    else:
    558564        LRazm = data['LRazimuth']
    559565    numAzms = data['outAzimuths']
    560566    numChans = data['outChannels']
     567    azmRot = data['azmthRotate']
     568    Full = data['fullIntegrate']
    561569    Dtth = (LUtth[1]-LUtth[0])/numChans
    562570    Dazm = (LRazm[1]-LRazm[0])/numAzms
     
    602610            H2 = LUtth
    603611        if Dazm:       
    604             H1 = [azm for azm in np.linspace(LRazm[0],LRazm[1],numAzms+1)]
     612            H1 = np.array([azm for azm in np.linspace(LRazm[0],LRazm[1],numAzms+1)])
     613            if Full:
     614                H1 = H1+azmRot
    605615        else:
    606616            H1 = LRazm
Note: See TracChangeset for help on using the changeset viewer.