Skip to content

Commit

Permalink
Merge pull request #9 from Awwkaw/patch-1
Browse files Browse the repository at this point in the history
Update azint.py
  • Loading branch information
felix-engelmann committed Jan 26, 2024
2 parents 0110fa5 + f71b33d commit 390a78f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion azint/azint.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def setup_corrections(poni, solid_angle, polarization_factor, p1, p2, tth, phi):
solid_angle = poni.dist / np.sqrt(poni.dist**2 + p1*p1 + p2*p2)
corrections *= (solid_angle**3).reshape(-1)

if polarization_factor:
if not polarization_factor is None:
cos2_tth = np.cos(tth) ** 2
polarization = 0.5 * (1.0 + cos2_tth - polarization_factor * np.cos(2.0 * phi) * (1.0 - cos2_tth))
corrections *= polarization.reshape(-1)
Expand Down

0 comments on commit 390a78f

Please sign in to comment.