Changeset 1148 for trunk/GSASIIplot.py


Ignore:
Timestamp:
Nov 23, 2013 5:29:28 PM (9 years ago)
Author:
vondreele
Message:

major changes to 2-D detector calibration; now works for strongly tilted detectors & short sample to detector distances.
Distance is now defined as sample to detector plane. Previously it was sample to intercept of detector plane with incident beam (Bragg cone axis).
The "penetration" parameter is still suspect.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r1134 r1148  
    24942494                xyI = []
    24952495                for azm in Azm:
    2496                     xyI.append(G2img.GetDetectorXY(dspI,azm-90.,Data))
     2496                    xyI.append(G2img.GetDetectorXY(dspI,azm,Data))
    24972497                xyI = np.array(xyI)
    24982498                arcxI,arcyI = xyI.T
     
    25012501                xyO = []
    25022502                for azm in Azm:
    2503                     xyO.append(G2img.GetDetectorXY(dspO,azm-90.,Data))
     2503                    xyO.append(G2img.GetDetectorXY(dspO,azm,Data))
    25042504                xyO = np.array(xyO)
    25052505                arcxO,arcyO = xyO.T
     
    25262526                    N += 1           
    25272527            for ellipse in Data['ellipses']:
     2528#                print 'plot:',ellipse
    25282529                cent,phi,[width,height],col = ellipse
    25292530                Plot.add_artist(Ellipse([cent[0],cent[1]],2*width,2*height,phi,ec=col,fc='none'))
     
    26502651        extent=[ysc[0],ysc[-1],xsc[-1],xsc[0]],aspect='auto')
    26512652    colorBar = Page.figure.colorbar(Img)
    2652     if Data['ellipses']:           
    2653         for ellipse in Data['ellipses']:
    2654             ring = np.array(G2img.makeIdealRing(ellipse[:3])) #skip color
    2655             x,y = np.hsplit(ring,2)
    2656             tth,azm = G2img.GetTthAzm(x,y,Data)
    2657 #            azm = np.where(azm < 0.,azm+360,azm)
    2658             Plot.plot(tth,azm,'b,')
     2653#    if Data['ellipses']:           
     2654#        for ellipse in Data['ellipses']:
     2655#            x,y = np.array(G2img.makeIdealRing(ellipse[:3])) #skip color
     2656#            tth,azm = G2img.GetTthAzm(x,y,Data)
     2657##            azm = np.where(azm < 0.,azm+360,azm)
     2658#            Plot.plot(tth,azm,'b,')
    26592659    if not newPlot:
    26602660        Page.toolbar.push_current()
Note: See TracChangeset for help on using the changeset viewer.