Changeset 2749


Ignore:
Timestamp:
Mar 7, 2017 3:56:24 PM (5 years ago)
Author:
vondreele
Message:

fix issues with HKLF reflection displays

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpwdGUI.py

    r2744 r2749  
    34883488                       
    34893489                                                 
    3490         if not len(data[phaseName]):
     3490        if not HKLF and not len(data[phaseName]):
    34913491            return          #deleted phase?
    34923492        G2frame.RefList = phaseName
     
    35113511            G2frame.refTable[phaseName].AutoSizeColumns(False)
    35123512            setBackgroundColors(im,itof)
    3513 #        GSASIIpath.IPyBreak()
    3514         refList = np.array([refl[:6+im] for refl in data[phaseName]['RefList']])
     3513        if HKLF:
     3514            refList = np.array([refl[:6+im] for refl in data[1]['RefList']])
     3515        else:
     3516            refList = np.array([refl[:6+im] for refl in data[phaseName]['RefList']])
    35153517        G2frame.HKL = np.vstack((refList.T)).T    #build for plots
    35163518        # raise the tab (needed for 1st use and from OnSelectPhase)
     
    35783580    G2frame.dataFrame.currentGrids = []
    35793581    for tabnum,phase in enumerate(phases):
    3580         if len(data[phase]):
     3582        if isinstance(data,list):           #single crystal HKLF
     3583            G2frame.refTable[phase] = G2G.GSGrid(parent=G2frame.dataDisplay)
     3584            G2frame.dataDisplay.AddPage(G2frame.refTable[phase],phase)
     3585        elif len(data[phase]):              #else dict for PWDR
    35813586            G2frame.refTable[phase] = G2G.GSGrid(parent=G2frame.dataDisplay)
    35823587            G2frame.dataDisplay.AddPage(G2frame.refTable[phase],phase)
Note: See TracChangeset for help on using the changeset viewer.