Changeset 696 for trunk/GSASIIplot.py


Ignore:
Timestamp:
Jul 30, 2012 12:54:13 PM (10 years ago)
Author:
vondreele
Message:

begin implementation of image strain analysis - GUI stuff first
make image plot respond & clean up display some.
fix atom selection so N can be selected from periodic table
remove crash when Pawley refl not found in reflection set - it's now skipped

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r687 r696  
    17201720    Masks = G2frame.PatternTree.GetItemPyData(
    17211721        G2gd.GetPatternTreeItemId(G2frame,G2frame.Image, 'Masks'))
     1722    try:    #may be absent
     1723        StrSta = G2frame.PatternTree.GetItemPyData(
     1724            G2gd.GetPatternTreeItemId(G2frame,G2frame.Image, 'Stress/Strain'))
     1725    except TypeError:   #is missing
     1726        StrSta = {}
    17221727
    17231728    def OnImMotion(event):
     
    20432048   
    20442049        Plot.plot(xcent,ycent,'x')
     2050        #G2frame.PatternTree.GetItemText(item)
    20452051        if Data['showLines']:
    20462052            LRAzim = Data['LRazimuth']                  #NB: integers
     
    20792085                Plot.plot([arcxI[ind],arcxO[ind]],[arcyI[ind],arcyO[ind]],color='k',dashes=(5,5))
    20802086                   
    2081         for xring,yring in Data['ring']:
    2082             Plot.plot(xring,yring,'r+',picker=3)
    2083         if Data['setRings']:
    2084 #            rings = np.concatenate((Data['rings']),axis=0)
    2085             N = 0
    2086             for ring in Data['rings']:
    2087                 xring,yring = np.array(ring).T[:2]
    2088                 Plot.plot(xring,yring,'+',color=colors[N%6])
    2089                 N += 1           
    2090         for ellipse in Data['ellipses']:
    2091             cent,phi,[width,height],col = ellipse
    2092             Plot.add_artist(Ellipse([cent[0],cent[1]],2*width,2*height,phi,ec=col,fc='none'))
    2093             Plot.text(cent[0],cent[1],'+',color=col,ha='center',va='center')
     2087        if G2frame.PatternTree.GetItemText(G2frame.PickId) in 'Image Controls':
     2088            for xring,yring in Data['ring']:
     2089                Plot.plot(xring,yring,'r+',picker=3)
     2090            if Data['setRings']:
     2091    #            rings = np.concatenate((Data['rings']),axis=0)
     2092                N = 0
     2093                for ring in Data['rings']:
     2094                    xring,yring = np.array(ring).T[:2]
     2095                    Plot.plot(xring,yring,'+',color=colors[N%6])
     2096                    N += 1           
     2097            for ellipse in Data['ellipses']:
     2098                cent,phi,[width,height],col = ellipse
     2099                Plot.add_artist(Ellipse([cent[0],cent[1]],2*width,2*height,phi,ec=col,fc='none'))
     2100                Plot.text(cent[0],cent[1],'+',color=col,ha='center',va='center')
     2101        if G2frame.PatternTree.GetItemText(G2frame.PickId) in 'Stress/Strain':
     2102            print 'plot stress/strain stuff'
     2103            print StrSta
    20942104        #masks - mask lines numbered after integration limit lines
    20952105        spots = Masks['Points']
Note: See TracChangeset for help on using the changeset viewer.