Changeset 2724 for trunk/GSASIIimage.py


Ignore:
Timestamp:
Feb 24, 2017 12:21:51 PM (5 years ago)
Author:
vondreele
Message:

fix stress/strain radial intensity plot - azimuth offset by ellipse tilt axis

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIimage.py

    r2723 r2724  
    247247    for i in range(0,C,1):      #step around ring in 1mm increments
    248248        a = 360.*i/C
    249         x = radii[1]*cosd(a)        #major axis
    250         y = radii[0]*sind(a)
     249        x = radii[1]*cosd(a+phi)        #major axis
     250        y = radii[0]*sind(a+phi)
    251251        X = (cphi*x-sphi*y+cent[0])*scalex      #convert mm to pixels
    252252        Y = (sphi*x+cphi*y+cent[1])*scaley
     
    259259            if [X,Y,dsp] not in ring:           #no duplicates!
    260260                ring.append([X,Y,dsp])
    261                 azm.append(360.-a)
     261                azm.append(a)
    262262    if len(ring) < 10:
    263263        ring = []
     
    10081008            ringxy,ringazm = makeRing(ring['Dcalc'],ellipse,0,0.,scalex,scaley,Image)
    10091009            ring['ImxyCalc'] = np.array(ringxy).T[:2]
    1010             ringint = np.array([float(Image[int(y*scaley),int(x*scalex)]) for x,y in np.array(ringxy)[:,:2]])
     1010            ringint = np.array([float(Image[int(x*scalex),int(y*scaley)]) for y,x in np.array(ringxy)[:,:2]])
    10111011            ringint /= np.mean(ringint)
    10121012            ring['Ivar'] = np.var(ringint)
     
    10281028            ringxy,ringazm = makeRing(ring['Dcalc'],ellipse,0,0.,scalex,scaley,Image)
    10291029            ring['ImxyCalc'] = np.array(ringxy).T[:2]
    1030             ringint = np.array([float(Image[int(y*scaley),int(x*scalex)]) for x,y in np.array(ringxy)[:,:2]])
     1030            ringint = np.array([float(Image[int(x*scalex),int(y*scaley)]) for y,x in np.array(ringxy)[:,:2]])
    10311031            ringint /= np.mean(ringint)
    10321032            print ' %s %.3f %s %.3f'%('d-spacing',ring['Dcalc'],'var(MRD):',np.var(ringint))
Note: See TracChangeset for help on using the changeset viewer.