Changeset 766


Ignore:
Timestamp:
Oct 1, 2012 10:24:14 AM (9 years ago)
Author:
vondreele
Message:

map peaks now show with gray scale proportional to density

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r762 r766  
    23232323    mapPeaks = []
    23242324    if 'Map Peaks' in data:
    2325         mapPeaks = data['Map Peaks']
     2325        mapPeaks = np.array(data['Map Peaks'])
     2326        peakMax = np.max(mapPeaks.T[0])
    23262327    drawingData = data['Drawing']
    23272328    try:
     
    28292830        glPopMatrix()
    28302831
    2831     def RenderMapPeak(x,y,z,color):
     2832    def RenderMapPeak(x,y,z,color,den):
    28322833        xyz = np.array([x,y,z])
    28332834        glEnable(GL_COLOR_MATERIAL)
    28342835        glLineWidth(3)
    2835         glColor3fv(color)
     2836        glColor3fv(color*den/255)
    28362837        glPushMatrix()
    28372838        glBegin(GL_LINES)
     
    30523053            for ind,[mag,x,y,z,d] in enumerate(mapPeaks):
    30533054                if ind in Ind and pageName == 'Map peaks':
    3054                     RenderMapPeak(x,y,z,Gr)
     3055                    RenderMapPeak(x,y,z,Gr,1.0)
    30553056                else:
    3056                     RenderMapPeak(x,y,z,Wt)
     3057                    RenderMapPeak(x,y,z,Wt,mag/peakMax)
    30573058        if Backbones:
    30583059            for chain in Backbones:
Note: See TracChangeset for help on using the changeset viewer.