Changeset 189


Ignore:
Timestamp:
Dec 7, 2010 3:57:36 PM (13 years ago)
Author:
vondreele
Message:

change names in GenHKLLaue to conform to general usage

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIlattice.py

    r166 r189  
    469469    return sortHKLd(HKL,True,False)
    470470   
    471 def GenHLaue(dmin,Laue,Cent,Axis,A):
     471def GenHLaue(dmin,Laue,SGLatt,SGUniq,A):
    472472    '''Generate the crystallographically unique powder diffraction reflections
    473473    for a lattice and Bravais type
     
    476476# Laue - Laue group symbol = '-1','2/m','mmm','4/m','6/m','4/mmm','6/mmm',
    477477#                            '3m1', '31m', '3', '3R', '3mR', 'm3', 'm3m'
    478 # Cent - lattice centering = 'P','A','B','C','I','F'
    479 # Axis - code for unique monoclinic axis = 'a','b','c'
     478# SGLatt - lattice centering = 'P','A','B','C','I','F'
     479# SGUniq - code for unique monoclinic axis = 'a','b','c'
    480480# A - 6 terms as defined in calc_rDsq
    481481# returns - HKL = list of [h,k,l,d] sorted with largest d first and is unique
     
    503503                for h in range(hmin,Hmax[0]+1):
    504504                    H = []
    505                     if CentCheck(Cent,[h,k,l]): H=[h,k,l]
     505                    if CentCheck(SGLatt,[h,k,l]): H=[h,k,l]
    506506                    rdsq = calc_rDsq(H,A)
    507507                    if 0 < rdsq <= dminsq:
    508508                        HKL.append([h,k,l,1/math.sqrt(rdsq)])
    509509    elif Laue == '2/m':                #monoclinic
    510         axisnum = 1 + ['a','b','c'].index(Axis)
     510        axisnum = 1 + ['a','b','c'].index(SGUniq)
    511511        Hmax = SwapIndx(axisnum,Hmax)
    512512        for h in range(Hmax[0]+1):
     
    517517                    [h,k,l] = SwapIndx(-axisnum,[h,k,l])
    518518                    H = []
    519                     if CentCheck(Cent,[h,k,l]): H=[h,k,l]
     519                    if CentCheck(SGLatt,[h,k,l]): H=[h,k,l]
    520520                    if H:
    521521                        rdsq = calc_rDsq(H,A)
     
    530530                for k in range(kmin,Hmax[1]+1):
    531531                    H = []
    532                     if CentCheck(Cent,[h,k,l]): H=[h,k,l]
     532                    if CentCheck(SGLatt,[h,k,l]): H=[h,k,l]
    533533                    if H:
    534534                        rdsq = calc_rDsq(H,A)
     
    540540                for k in range(h+1):
    541541                    H = []
    542                     if CentCheck(Cent,[h,k,l]): H=[h,k,l]
     542                    if CentCheck(SGLatt,[h,k,l]): H=[h,k,l]
    543543                    if H:
    544544                        rdsq = calc_rDsq(H,A)
     
    560560                for k in range(kmin,kmax+1):
    561561                    H = []
    562                     if CentCheck(Cent,[h,k,l]): H=[h,k,l]
     562                    if CentCheck(SGLatt,[h,k,l]): H=[h,k,l]
    563563                    if Laue in ['3R','3mR']:
    564564                        H = Hx2Rh(H)
     
    577577                for l in range(lmin,lmax+1):
    578578                    H = []
    579                     if CentCheck(Cent,[h,k,l]): H=[h,k,l]
     579                    if CentCheck(SGLatt,[h,k,l]): H=[h,k,l]
    580580                    if H:
    581581                        rdsq = calc_rDsq(H,A)
Note: See TracChangeset for help on using the changeset viewer.