Skip to content

Commit

Permalink
Merge pull request #36 from toastisme/integration_bbox_fix
Browse files Browse the repository at this point in the history
Fixed bounds of calculcated bounding boxes and allowed size of boundi…
  • Loading branch information
Justin-Bergmann authored Dec 13, 2023
2 parents 2dd121d + 28fdbef commit fe5884f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
13 changes: 12 additions & 1 deletion src/dials/algorithms/profile_model/gaussian_rs/bbox_calculator.h
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,7 @@ namespace dials {

/// Calculate the rotation angles at the following XDS
// e3 coordinates: -delta_m, +delta_m
/*
double wavelength1 = xcs.to_wavelength(-delta_m, s1);
double wavelength2 = xcs.to_wavelength(+delta_m, s1);
double tof1 = beam_.get_tof_from_wavelength(wavelength1, L1);
Expand All @@ -451,8 +452,18 @@ namespace dials {
double z1 = sequence_.get_frame_from_tof(tof1);
double z2 = sequence_.get_frame_from_tof(tof2);
double2 z(z1, z2);
*/
double z0 = frame - delta_m;
if (z0 < 0) {
z0 = 0;
}
double max_z = sequence_.get_array_range()[1];
double z1 = frame + delta_m;
if (z1 > max_z) {
z1 = max_z;
}

int6 bbox(x0, x1, y0, y1, frame - 30, frame + 30);
int6 bbox(x0, x1, y0, y1, z0, z1);
DIALS_ASSERT(bbox[1] > bbox[0]);
DIALS_ASSERT(bbox[3] > bbox[2]);
DIALS_ASSERT(bbox[5] > bbox[4]);
Expand Down
2 changes: 1 addition & 1 deletion src/dials/command_line/simple_tof_integrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ def run_simple_integrate(params, experiments, reflections):
model_reflections = reflections.select(used_in_ref)

# sigma_m in 3.1 of Kabsch 2010
sigma_m = 0.01
sigma_m = 3
sigma_b = 0.01
# The Gaussian model given in 2.3 of Kabsch 2010
experiment.profile = GaussianRSProfileModel(
Expand Down

0 comments on commit fe5884f

Please sign in to comment.