cctbx / cctbx_project

Computational Crystallography Toolbox
https://cci.lbl.gov/docs/cctbx
Other
208 stars 111 forks source link

absolute_scaling IndexError #904

Closed dagewa closed 11 months ago

dagewa commented 1 year ago

With the previous code, if number == d_star_sq_hkl.size() then the following line would fail with IndexError (https://github.com/xia2/xia2/issues/749):

self.kernel_width = d_star_sq_hkl[sort_permut[number]]-d_star_sq_low

The change ensures that number does not exceed d_star_sq_hkl.size()-1