Changeset 3509


Ignore:
Timestamp:
Jul 25, 2018 9:00:24 PM (3 years ago)
Author:
svnjenkins
Message:

initial drawingData more completely to avoid errors with CF

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIphsGUI.py

    r3505 r3509  
    11391139################################################################################
    11401140################################################################################
     1141def SetDrawingDefaults(drawingData):
     1142    """Add required items into data['drawing'] array if not present. This does not add
     1143    all the items in SetupDrawingData, but it seems that this is not a problem. Perhaps the
     1144    two routines could be combined?
     1145    """
     1146    defaultDrawing = {'viewPoint':[[0.5,0.5,0.5],[]],'showHydrogen':True,
     1147            'backColor':[0,0,0],'depthFog':False,'Zclip':50.0,'cameraPos':50.,'Zstep':0.5,
     1148            'radiusFactor':0.85,'contourLevel':1.,'bondRadius':0.1,'ballScale':0.33,
     1149            'vdwScale':0.67,'ellipseProb':50,'sizeH':0.50,'unitCellBox':True,
     1150            'showABC':True,'selectedAtoms':[],'Atoms':[],'oldxy':[],'magMult':1.0,
     1151            'bondList':{},'viewDir':[1,0,0],'Plane':[[0,0,1],False,False,0.0,[255,255,0]]}
     1152    for key in defaultDrawing:
     1153        if key not in drawingData: drawingData[key] = defaultDrawing[key]
     1154           
    11411155def UpdatePhaseData(G2frame,Item,data):
    11421156    '''Create the data display window contents when a phase is clicked on
     
    51815195        SetupDrawingData()
    51825196        drawingData = data['Drawing']
     5197        SetDrawingDefaults(drawingData)       
    51835198        cx,ct,cs,ci = drawingData['atomPtrs']
    51845199        atomData = drawingData['Atoms']
     
    61046119        SetupDrawingData()
    61056120        drawingData = data['Drawing']
     6121        SetDrawingDefaults(drawingData)       
    61066122
    61076123        G2frame.GetStatusBar().SetStatusText('',1)
  • trunk/GSASIIplot.py

    r3507 r3509  
    67546754    if not drawingData:
    67556755        return          #nothing setup, nothing to draw   
     6756    G2phG.SetDrawingDefaults(drawingData)
    67566757    if 'Map Peaks' in data:
    67576758        mapPeaks = np.array(data['Map Peaks'])
Note: See TracChangeset for help on using the changeset viewer.