Changeset 1451


Ignore:
Timestamp:
Aug 1, 2014 11:15:20 AM (7 years ago)
Author:
toby
Message:

Cleanup Instrument Parms bug due to reformat of peak list

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r1448 r1451  
    21602160    else:
    21612161        difC = Parms['difC'][0]
    2162     peaks = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,PatternId, 'Peak List'))['peaks']
    2163    
     2162    try:  # PATCH: deal with older peak lists, before changed to dict to implement TOF
     2163        peaks = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,PatternId, 'Peak List'))['peaks']
     2164    except TypeError:
     2165        print "Your peak list needs reformatting...",
     2166        item = G2gd.GetPatternTreeItemId(G2frame,PatternId, 'Peak List')
     2167        G2frame.PatternTree.SelectItem(item) 
     2168        item = G2gd.GetPatternTreeItemId(G2frame,PatternId, 'Instrument Parameters')
     2169        G2frame.PatternTree.SelectItem(item)
     2170        print "done"
     2171        return
    21642172    try:
    21652173        plotNum = G2frame.G2plotNB.plotList.index('Peak Widths')
Note: See TracChangeset for help on using the changeset viewer.