Changeset 1441


Ignore:
Timestamp:
Jul 24, 2014 12:18:15 PM (11 years ago)
Author:
vondreele
Message:

include option to plot unit structure factors (equal circles)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/GSASIIplot.py

    r1439 r1441  
    256256        i = zones.index(Data['Zone'])
    257257        newPlot = False
    258         typeChoice = {'1':'|DFsq|>sig','3':'|DFsq|>3sig','w':'|DFsq|/sig','f':'Fo','s':'Fosq'}
     258        pwdrChoice = {'f':'Fo','s':'Fosq','i':'Unit Fc'}
     259        hklfChoice = {'1':'|DFsq|>sig','3':'|DFsq|>3sig','w':'|DFsq|/sig','f':'Fo','s':'Fosq','i':'Unit Fc'}
    259260        if event.key == 'h':
    260261            Data['Zone'] = '100'
     
    276277        elif event.key == '0':
    277278            Data['Layer'] = 0
    278         elif event.key in typeChoice and 'HKLF' in Name:
    279             Data['Type'] = typeChoice[event.key]           
     279            Data['Scale'] = 1.0
     280        elif event.key in hklfChoice and 'HKLF' in Name:
     281            Data['Type'] = hklfChoice[event.key]           
    280282            newPlot = True
     283        elif event.key in pwdrChoice and 'PWDR' in Name:
     284            Data['Type'] = pwdrChoice[event.key]           
     285            newPlot = True       
    281286        PlotSngl(G2frame,newPlot,Data,hklRef,Title)
    282287
     
    337342        Page.canvas.mpl_connect('key_press_event', OnSCKeyPress)
    338343        Page.keyPress = OnSCKeyPress
     344        Page.Choice = (' key press','u: increase scale','d: decrease scale',
     345            'h: select 100 zone','k: select 010 zone','l: select 001 zone',
     346            'f: select Fo','s: select Fosq','i: select unit Fc',
     347            '+: increase index','-: decrease index','0: zero layer',)
    339348        if 'HKLF' in Name:
    340             Page.Choice = (' key press','u: increase scale','d: decrease scale',
    341                 'f: select Fo','s: select Fosq','w: select |DFsq|/sig',
    342                 '1: select |DFsq|>sig','3 select |DFsq|>3sig',
    343                 'h: select 100 zone','k: select 010 zone','l: select 001 zone',
    344                 '+: increase index','-: decrease index','0: zero layer',)
    345         else:   
    346             Page.Choice = (' key press','u: increase scale','d: decrease scale',
    347                 'h: select 100 zone','k: select 010 zone','l: select 001 zone',
    348                 '+: increase index','-: decrease index','0: zero layer',)
     349            Page.Choice += ('w: select |DFsq|/sig','1: select |DFsq|>sig','3: select |DFsq|>3sig',)
    349350    Page.SetFocus()
    350351   
     
    363364    pzone = [[1,2],[0,2],[0,1]]
    364365    izone = zones.index(Data['Zone'])
    365     Plot.set_title(Data['Type']+' '+Title)
     366    Plot.set_title(Data['Type']+' for '+Title)
    366367    HKL = []
    367368    HKLF = []
     
    386387                B = scale*math.sqrt(max(0,Fcsq))/FoMax
    387388                C = abs(A-B)
     389            elif Type == 'Unit Fc':
     390                A = scale/2
     391                B = scale/2
     392                C = 0.0
     393                if Fcsq and Fosq > 0:
     394                    A *= min(1.0,Fosq/Fcsq)
     395                    C = abs(A-B)
    388396            elif Type == '|DFsq|/sig':
    389397                if sig > 0.:
Note: See TracChangeset for help on using the changeset viewer.