Changeset 3264


Ignore:
Timestamp:
Feb 6, 2018 4:54:53 PM (4 years ago)
Author:
toby
Message:

deal with lack of BackFile? for older GPX files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIpwdGUI.py

    r3260 r3264  
    154154
    155155def GetFileBackground(G2frame,xye,Pattern):
    156     backfile,mult = Pattern[0]['BackFile']
    157156    bxye = np.zeros(len(xye[1]))
    158     if backfile:
    159         bxye = mult*G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,G2frame.root,backfile))[1][1]
     157    if 'BackFile' in Pattern[0]:
     158        backfile,mult = Pattern[0]['BackFile']
     159        if backfile:
     160            bxye = mult*G2frame.GPXtree.GetItemPyData(G2gd.GetGPXtreeItemId(G2frame,G2frame.root,backfile))[1][1]
    160161    return bxye
    161162   
Note: See TracChangeset for help on using the changeset viewer.