Changeset 189
- Timestamp:
- Dec 7, 2010 3:57:36 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIlattice.py
r166 r189 469 469 return sortHKLd(HKL,True,False) 470 470 471 def GenHLaue(dmin,Laue, Cent,Axis,A):471 def GenHLaue(dmin,Laue,SGLatt,SGUniq,A): 472 472 '''Generate the crystallographically unique powder diffraction reflections 473 473 for a lattice and Bravais type … … 476 476 # Laue - Laue group symbol = '-1','2/m','mmm','4/m','6/m','4/mmm','6/mmm', 477 477 # '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' 480 480 # A - 6 terms as defined in calc_rDsq 481 481 # returns - HKL = list of [h,k,l,d] sorted with largest d first and is unique … … 503 503 for h in range(hmin,Hmax[0]+1): 504 504 H = [] 505 if CentCheck( Cent,[h,k,l]): H=[h,k,l]505 if CentCheck(SGLatt,[h,k,l]): H=[h,k,l] 506 506 rdsq = calc_rDsq(H,A) 507 507 if 0 < rdsq <= dminsq: 508 508 HKL.append([h,k,l,1/math.sqrt(rdsq)]) 509 509 elif Laue == '2/m': #monoclinic 510 axisnum = 1 + ['a','b','c'].index( Axis)510 axisnum = 1 + ['a','b','c'].index(SGUniq) 511 511 Hmax = SwapIndx(axisnum,Hmax) 512 512 for h in range(Hmax[0]+1): … … 517 517 [h,k,l] = SwapIndx(-axisnum,[h,k,l]) 518 518 H = [] 519 if CentCheck( Cent,[h,k,l]): H=[h,k,l]519 if CentCheck(SGLatt,[h,k,l]): H=[h,k,l] 520 520 if H: 521 521 rdsq = calc_rDsq(H,A) … … 530 530 for k in range(kmin,Hmax[1]+1): 531 531 H = [] 532 if CentCheck( Cent,[h,k,l]): H=[h,k,l]532 if CentCheck(SGLatt,[h,k,l]): H=[h,k,l] 533 533 if H: 534 534 rdsq = calc_rDsq(H,A) … … 540 540 for k in range(h+1): 541 541 H = [] 542 if CentCheck( Cent,[h,k,l]): H=[h,k,l]542 if CentCheck(SGLatt,[h,k,l]): H=[h,k,l] 543 543 if H: 544 544 rdsq = calc_rDsq(H,A) … … 560 560 for k in range(kmin,kmax+1): 561 561 H = [] 562 if CentCheck( Cent,[h,k,l]): H=[h,k,l]562 if CentCheck(SGLatt,[h,k,l]): H=[h,k,l] 563 563 if Laue in ['3R','3mR']: 564 564 H = Hx2Rh(H) … … 577 577 for l in range(lmin,lmax+1): 578 578 H = [] 579 if CentCheck( Cent,[h,k,l]): H=[h,k,l]579 if CentCheck(SGLatt,[h,k,l]): H=[h,k,l] 580 580 if H: 581 581 rdsq = calc_rDsq(H,A)
Note: See TracChangeset
for help on using the changeset viewer.