Skip to content

Commit 54aa3ae

Browse files
committed
modify parallax correction in image integrate & gain map calcs
1 parent 8160fea commit 54aa3ae

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

GSASII/GSASIIimage.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1418,8 +1418,7 @@ def MakeUseMask(data,masks,blkSize=128):
14181418
return useMask
14191419

14201420
def MakeGainMap(image,Ix,Iy,data,mask,blkSize=128):
1421-
Iy /= npcosd(Ix[:-1]) #undo parallax
1422-
Iy *= (1000./data['distance'])**2 #undo r^2 effect
1421+
Iy *= npcosd(Ix[:-1])**2 #undo parallax
14231422
Iy /= np.array(G2pwd.Polarization(data['PolaVal'][0],Ix[:-1],0.)[0]) #undo polarization
14241423
if data['Oblique'][1]:
14251424
Iy *= G2pwd.Oblique(data['Oblique'][0],Ix[:-1]) #undo penetration
@@ -1637,8 +1636,7 @@ def ImageIntegrate(image,data,masks,blkSize=128,returnN=False,useTA=None,useMask
16371636
if 'SASD' not in data['type']:
16381637
H0 *= np.array(G2pwd.Polarization(data['PolaVal'][0],H2[:-1],0.)[0])
16391638
if np.abs(data['det2theta']) < 1.0: #small angle approx only; not appropriate for detectors at large 2-theta
1640-
H0 /= np.abs(npcosd(H2[:-1]-np.abs(data['det2theta']))) #parallax correction
1641-
# H0 *= (data['distance']/1000.)**2 #remove r^2 effect - done earlier
1639+
H0 /= np.abs(npcosd(H2[:-1]-np.abs(data['det2theta'])))**4 #parallax correction (why **4?)
16421640
if 'SASD' in data['type']:
16431641
H0 /= npcosd(H2[:-1]) #one more for small angle scattering data?
16441642
if data['Oblique'][1]:

0 commit comments

Comments
 (0)