index_assignment.method=local is broken when joint_index=True

Open
#3,209 3 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
58/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python
Domain
backend

Research direction

Start with the failing path in modules/dials/src/dials/algorithms/indexing/assign_indices.py, especially the selection at line 145, and trace how joint indexing and local index assignment produce the reflection arrays. Reproduce using the commands and Rigaku_HyPix_Arc data in the issue, comparing with and without index_assignment.method=local. Done when the local joint-indexing command succeeds without the selection-size assertion.

Written by the indexing model from the issue text.

Description

bug dials.index

When joint indexing multiple sweeps (i.e. one common orientation matrix for all sweeps), local indexing should work, but does not.

How to reproduce

dials.import `dials.data get -q Rigaku_HyPix_Arc`/CHNOS_*.rodhypix
dials.find_spots imported.expt
dials.index imported.expt strong.refl joint_index=True # works
dials.index imported.expt strong.refl joint_index=True index_assignment.method=local # fails

Error

  File "/prog/dials-dev/modules/dials/src/dials/command_line/index.py", line 285, in run
    indexed_experiments, indexed_reflections = index(
                                               ^^^^^^
  File "/prog/dials-dev/modules/dials/src/dials/command_line/index.py", line 195, in index
    indexed_experiments, indexed_reflections = _index_experiments(
                                               ^^^^^^^^^^^^^^^^^^^
  File "/prog/dials-dev/modules/dials/src/dials/command_line/index.py", line 125, in _index_experiments
    idxr.index()
  File "/prog/dials-dev/modules/dials/src/dials/algorithms/indexing/indexer.py", line 552, in index
    new_expts = self.find_lattices()
                ^^^^^^^^^^^^^^^^^^^^
  File "/prog/dials-dev/modules/dials/src/dials/algorithms/indexing/lattice_search/__init__.py", line 148, in find_lattices
    crystal_model, n_indexed = self.choose_best_orientation_matrix(
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/prog/dials-dev/modules/dials/src/dials/algorithms/indexing/lattice_search/__init__.py", line 222, in choose_best_orientation_matrix
    self.index_reflections(experiments, refl)
  File "/prog/dials-dev/modules/dials/src/dials/algorithms/indexing/indexer.py", line 1003, in index_reflections
    self._assign_indices(reflections, experiments, d_min=self.d_min)
  File "/prog/dials-dev/modules/dials/src/dials/algorithms/indexing/assign_indices.py", line 145, in __call__
    rlp_sel = rlps.select(cryst_sel)
              ^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Please report this error at https://github.com/dials/dials/issues or to [email protected]: scitbx Internal Error: /home/conda/feedstock_root/build_artifacts/cctbx-split_1746201864733/work/modules/cctbx_project/scitbx/array_family/selections.h(44): SCITBX_ASSERT(flags.size() == self.size()) failure.
Dominant language
Python
Stars
107
Forks
61
Avg merge
2d 15h
Merged PRs (30d)
12

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dials/dials

All issues in dials/dials

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.