Changeset 2173


Ignore:
Timestamp:
Mar 15, 2016 4:43:40 PM (8 years ago)
Author:
vondreele
Message:

fix layer plotting problems

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r2172 r2173  
    58125812            if il:
    58135813                TX += np.array(Trans[laySeq[il-1]][layer][1:4])
    5814             XYZ += TX
    5815             XYZT = XYZ.T
    5816             XYZT[0] = XYZT[0]%1.
    5817             XYZT[1] = XYZT[1]%1.
    5818             XYZ = XYZT.T
     5814                XYZ += TX
     5815                XYZT = XYZ.T
     5816                XYZT[0] = XYZT[0]%1.
     5817                XYZT[1] = XYZT[1]%1.
     5818                XYZ = XYZT.T
    58195819            AtNames += atNames
    58205820            AtTypes += atTypes
     
    58235823        na = int(8./cell[0])
    58245824        nb = int(8./cell[1])
    5825         nunit = [na,nb,0]
    5826         indA = range(-na,na)
    5827         indB = range(-nb,nb)
    5828         Units = np.array([[h,k,0] for h in indA for k in indB])
    5829         newXYZ = np.zeros((0,3))
    5830         for unit in Units:
    5831             newXYZ = np.concatenate((newXYZ,unit+XYZ))
    5832         if len(Units):
    5833             AtNames *= len(Units)
    5834             AtTypes *= len(Units)
    5835         XYZ = newXYZ
     5825        if any([na,nb]):
     5826            nunit = [na,nb,0]
     5827            indA = range(-na,na)
     5828            indB = range(-nb,nb)
     5829            Units = np.array([[h,k,0] for h in indA for k in indB])
     5830            newXYZ = np.zeros((0,3))
     5831            for unit in Units:
     5832                newXYZ = np.concatenate((newXYZ,unit+XYZ))
     5833            if len(Units):
     5834                AtNames *= len(Units)
     5835                AtTypes *= len(Units)
     5836            XYZ = newXYZ
     5837       
    58365838        Bonds = FindBonds(AtTypes,XYZ)
    58375839                       
Note: See TracChangeset for help on using the changeset viewer.