Skip to content

Commit ffddb48

Browse files
committed
another fix to Calibrate
1 parent 311023c commit ffddb48

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

GSASII/GSASIIpwdGUI.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2587,14 +2587,15 @@ def OnCalibrate(event):
25872587
XY = []
25882588
Sigs = []
25892589
for ip,peak in enumerate(IndexPeaks[0]):
2590+
calcPos = G2lat.Dsp2pos(data,peak[-1])
25902591
shft = 0.0
25912592
if peak[2] and peak[3]:
25922593
binwid = cw[np.searchsorted(xye[0],peak[0])]
25932594
if const:
25942595
if 'Debye' in Sample['Type']:
2595-
shft -= 0.5*const*(Sample['DisplaceX'][0]*npcosd(peak[0])+Sample['DisplaceY'][0]*npsind(peak[0]))
2596+
shft -= const*(Sample['DisplaceX'][0]*npcosd(calcPos)+Sample['DisplaceY'][0]*npsind(calcPos))
25962597
else:
2597-
shft -= 2.0*const*Sample['Shift'][0]*npcosd(peak[0]/2.0)
2598+
shft -= 2.0*const*Sample['Shift'][0]*npcosd(calcPos/2.0)
25982599
XY.append([peak[-1],peak[0]-shft,binwid])
25992600
Sigs.append(IndexPeaks[1][ip])
26002601
if len(XY):

0 commit comments

Comments
 (0)