Changeset 4820 for trunk/GSASIIplot.py


Ignore:
Timestamp:
Feb 17, 2021 3:05:30 PM (10 months ago)
Author:
vondreele
Message:

remove masks from argument list for MakeGainMap? - not used
Tweak gain map limits
fix to OnOrigX & OnOrien? - now set atom site fractions to the max found for atoms in RB
"fix" (with a try except) for the occasional crash on finding a nonexistent Pattern. Now just skips & tries again.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r4817 r4820  
    29182918    time0 = time.time()
    29192919    if G2frame.SinglePlot and PatternId:
    2920         Pattern = G2frame.GPXtree.GetItemPyData(PatternId)
    2921         Pattern.append(G2frame.GPXtree.GetItemText(PatternId))
    2922         PlotList = [Pattern,]
    2923         # PId = G2gd.GetGPXtreeItemId(G2frame,G2frame.PatternId, 'Background')
    2924         # Pattern[0]['BackFile'] = ['',-1.0,False]
    2925         # if PId:
    2926         #     Pattern[0]['BackFile'] =  G2frame.GPXtree.GetItemPyData(PId)[1].get('background PWDR',['',-1.0,False])
    2927         Parms,Parms2 = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,
    2928             G2frame.PatternId, 'Instrument Parameters'))
    2929         Sample = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,G2frame.PatternId, 'Sample Parameters'))
    2930         ParmList = [Parms,]
    2931         SampleList = [Sample,]
    2932         Title = data[0].get('histTitle')
    2933         if not Title:
    2934             Title = Pattern[-1]
     2920        try:
     2921            Pattern = G2frame.GPXtree.GetItemPyData(PatternId)
     2922            Pattern.append(G2frame.GPXtree.GetItemText(PatternId))
     2923            PlotList = [Pattern,]
     2924            # PId = G2gd.GetGPXtreeItemId(G2frame,G2frame.PatternId, 'Background')
     2925            # Pattern[0]['BackFile'] = ['',-1.0,False]
     2926            # if PId:
     2927            #     Pattern[0]['BackFile'] =  G2frame.GPXtree.GetItemPyData(PId)[1].get('background PWDR',['',-1.0,False])
     2928            Parms,Parms2 = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,
     2929                G2frame.PatternId, 'Instrument Parameters'))
     2930            Sample = G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,G2frame.PatternId, 'Sample Parameters'))
     2931            ParmList = [Parms,]
     2932            SampleList = [Sample,]
     2933            Title = data[0].get('histTitle')
     2934            if not Title:
     2935                Title = Pattern[-1]
     2936        except AttributeError:
     2937            pass
    29352938    else:     #G2frame.selection   
    29362939        Title = os.path.split(G2frame.GSASprojectfile)[1]
Note: See TracChangeset for help on using the changeset viewer.