Changeset 1607


Ignore:
Timestamp:
Dec 15, 2014 8:25:14 AM (7 years ago)
Author:
vondreele
Message:

fix directory problem when saving 3D reciprocal space views as e.g. jpeg

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r1604 r1607  
    599599           
    600600    Name = G2frame.PatternTree.GetItemText(G2frame.PatternId)
    601     if Title != 'no phase':
     601    if Title != 'no phase': #NB: save image as e.g. jpeg will fail if no phase; MyDir is unknown
    602602        generalData = G2frame.GetPhaseData()[Title]['General']
    603603        cell = generalData['Cell'][1:7]
     604        Mydir = generalData['Mydir']
    604605    else:
    605606        cell = [10,10,10,90,90,90]
     607        Mydir = G2frame.dirname
    606608    drawingData = Data['Drawing']
    607609    Super = Data['Super']
     
    16441646        Parms,Parms2 = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,PatternId, 'Instrument Parameters'))
    16451647        if G2frame.PatternTree.GetItemText(PickId) in ['Index Peak List','Unit Cells List']:
    1646             peaks = np.array((G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,PatternId, 'Index Peak List'))))[0]
    1647             for peak in peaks:
    1648 #                print 'peak',peak
     1648            peaks = np.array((G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,PatternId, 'Index Peak List'))))
     1649            for peak in peaks[0]:
    16491650                if peak[2]:
    16501651                    if G2frame.qPlot:
Note: See TracChangeset for help on using the changeset viewer.