Changeset 1504


Ignore:
Timestamp:
Sep 20, 2014 2:44:23 PM (9 years ago)
Author:
vondreele
Message:

fix plot HKL routines for superlattice cases. Don't plot them for 2D plots.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r1493 r1504  
    358358    HKLmin = Data['HKLmin']
    359359    FosqMax = Data['FoMax']
     360    Super = Data.get('Super',0)
    360361    FoMax = math.sqrt(FosqMax)
    361362    xlabel = ['k, h=','h, k=','h, l=']
     
    370371    for refl in hklRef:
    371372        H = np.array(refl[:3])
     373        if Super and np.any(refl[3:3+Super]):   #skip superlattice reflections for 2D plot
     374            continue
    372375        if 'HKLF' in Name:
    373             Fosq,sig,Fcsq = refl[5:8]
     376            Fosq,sig,Fcsq = refl[5+Super:8+Super]
    374377        else:
    375             Fosq,sig,Fcsq = refl[8],1.0,refl[9]
     378            Fosq,sig,Fcsq = refl[8+Super],1.0,refl[9+Super]
    376379        HKL.append(H)
    377380        HKLF.append([Fosq,sig,Fcsq])
     
    522525        cell = [10,10,10,90,90,90]
    523526    drawingData = Data['Drawing']
     527    Super = Data.get('Super',0)
    524528    defaultViewPt = copy.copy(drawingData['viewPoint'])
    525529    Amat,Bmat = G2lat.cell2AB(cell)         #Amat - crystal to cartesian, Bmat - inverse
     
    549553            H = np.array(refl[:3])
    550554            if 'HKLF' in Name:
    551                 Fosq,sig,Fcsq = refl[5:8]
     555                Fosq,sig,Fcsq = refl[5+Super:8+Super]
    552556            else:
    553                 Fosq,sig,Fcsq = refl[8],1.0,refl[9]
     557                Fosq,sig,Fcsq = refl[8+Super],1.0,refl[9+Super]
    554558            HKL.append(H)
    555559            if Data['Type'] == 'Unit':
Note: See TracChangeset for help on using the changeset viewer.