Skip to content

Commit

Permalink
Draft of mask calculator.
Browse files Browse the repository at this point in the history
  • Loading branch information
toastisme committed Jul 15, 2024
1 parent 9d0cca8 commit dc17386
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,10 @@ namespace dials { namespace algorithms { namespace boost_python {
arg("incident_number_density"),
arg("apply_lorentz_correction"),
arg("apply_spherical_absorption_correction")));

def("tof_calculate_shoebox_foreground",
&tof_calculate_shoebox_foreground,
(arg("reflection_table"), arg("experiment"), arg("foreground_radius")));
}

}}} // namespace dials::algorithms::boost_python
2 changes: 1 addition & 1 deletion src/dials/array_family/flex_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ def __init__(self):
distance = cctbx.array_family.flex.sqrt(
cctbx.array_family.flex.pow2(x1 - x2)
+ cctbx.array_family.flex.pow2(y1 - y2)
+ cctbx.array_family.flex.pow2(z1 - z2)
+ cctbx.array_family.flex.pow2(z1 - z1)
)
mask = distance < 2
logger.info(" %d reflections matched", len(o2))
Expand Down

0 comments on commit dc17386

Please sign in to comment.