File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff 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 ):
You can’t perform that action at this time.
0 commit comments