Skip to content

Commit 59a8462

Browse files
saransh13psavery
andauthored
Update hexrd/instrument/detector.py
Co-authored-by: Patrick Avery <[email protected]>
1 parent 75cf35a commit 59a8462

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hexrd/instrument/detector.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1750,8 +1750,8 @@ def calc_effective_pinhole_area(self, physics_package: AbstractPhysicsPackage) -
17501750
"""
17511751
effective_pinhole_area = np.ones(self.shape)
17521752

1753-
if (physics_package.pinhole_diameter != 0.
1754-
and physics_package.pinhole_thickness != 0.):
1753+
if (not np.isclose(physics_package.pinhole_diameter, 0)
1754+
and not np.isclose(physics_package.pinhole_thickness, 0)):
17551755

17561756
hod = (physics_package.pinhole_thickness /
17571757
physics_package.pinhole_diameter)

0 commit comments

Comments
 (0)