Skip to content

Commit 7831467

Browse files
committed
Make testplot larger
change scaling of spin RB sp harmonics.
1 parent 8398db8 commit 7831467

2 files changed

Lines changed: 10 additions & 11 deletions

File tree

GSASII/GSASIIstrMath.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -499,22 +499,21 @@ def MakePolar(Orient,QB):
499499
Shell = SHdat[shl]
500500
Atm = Shell['AtType']
501501
Nat = Shell['Natoms']
502-
Irb = Shell['ShR']
503502
if 'X' in hType:
504-
SFF = G2el.ScatFac(FFtables[Atm],SQR)
503+
SFF = 4.*np.pi*G2el.ScatFac(FFtables[Atm],SQR)
505504
elif 'N' in hType:
506-
SFF = G2el.getBLvalues(BLtables)[Atm]
505+
SFF = 4.*np.pi*G2el.getBLvalues(BLtables)[Atm]
507506
Rname = 'Sh;%s;Radius:%d:%s'%(shl,iAt,Irb)
508507
R = Shell['Radius']
509-
R0 = sp.spherical_jn(0,QR*R)/(4.*np.pi)
510-
R0P = sp.spherical_jn(0,QR*(R+0.01))/(4.*np.pi)
511-
R0M = sp.spherical_jn(0,QR*(R-0.01))/(4.*np.pi)
508+
R0 = sp.spherical_jn(0,QR*R) #/(4.*np.pi)
509+
R0P = sp.spherical_jn(0,QR*(R+0.01)) #/(4.*np.pi)
510+
R0M = sp.spherical_jn(0,QR*(R-0.01)) #/(4.*np.pi)
512511
dBSdR = Nat*SFF*(R0P-R0M)/0.02
513512
FFR[:,iAt] += Nat*SFF*R0 #Bessel function; L=0 term
514513
for item in Shell:
515514
if 'C(' in item:
516515
l,m = eval(item.strip('C').strip('c'))
517-
SH = 4.0*np.pi*G2lat.KslCalc(item,Th,Ph)
516+
SH = G2lat.KslCalc(item,Th,Ph)
518517
if l%2: #odd L
519518
SHI = SH
520519
SHR = np.zeros_like(SHI)
@@ -529,9 +528,9 @@ def MakePolar(Orient,QB):
529528
SHMi = G2lat.KslCalc(item,ThMi,PhMi)
530529
SHMj = G2lat.KslCalc(item,ThMj,PhMj)
531530
SHMk = G2lat.KslCalc(item,ThMk,PhMk)
532-
BS = sp.spherical_jn(l,QR*R)/(4.*np.pi) #Bessel function
533-
BSP = sp.spherical_jn(l,QR*(R+0.01))/(4.*np.pi)
534-
BSM = sp.spherical_jn(l,QR*(R-0.01))/(4.*np.pi)
531+
BS = sp.spherical_jn(l,QR*R) #/(4.*np.pi) #Bessel function
532+
BSP = sp.spherical_jn(l,QR*(R+0.01)) #/(4.*np.pi)
533+
BSM = sp.spherical_jn(l,QR*(R-0.01)) #/(4.*np.pi)
535534
dBSdR += Nat*SFF*SH*Shell[item]*(BSP-BSM)/0.02
536535
dSHdO += Nat*SFF*BS*Shell[item]*(SHP-SHM)/0.0002
537536
dSHdOi += Nat*SFF*BS*Shell[item]*(SHPi-SHMi)/(2.*dp)

GSASII/GSASIItestplot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class PlotNotebook(wx.Panel):
3333
'creates a Wx application and a plotting notebook'
3434
def __init__(self, id = -1):
3535
self.app = wx.App()
36-
self.frame = wx.Frame(None,-1,'Plotter', size=wx.Size(600,600),
36+
self.frame = wx.Frame(None,-1,'Plotter', size=wx.Size(1000,800),
3737
style=wx.DEFAULT_FRAME_STYLE ^ wx.CLOSE_BOX)
3838
self.status = self.frame.CreateStatusBar()
3939
self.status.SetStatusText('Use K-box to set plot controls')

0 commit comments

Comments
 (0)