Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed bounds of calculcated bounding boxes and allowed size of boundi… #36

Merged
merged 1 commit into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading