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

Clustering index descending from 0 #2318

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

Baharis
Copy link
Contributor

@Baharis Baharis commented Jan 19, 2023

Following #2311 and discussion therein, this PR suggests indexing clusters created by dials.combine_experiments from largest to smallest as well as indexing from 0 instead of an arbitrary integer, which depends on other phil parameters. Additionally, I took the liberty to rewrite the _save_output method and nested save_in_batches function, as the previous implementation of the latter was fairly difficult to read.

This PR requires #2311 to be merged before it to avoid undefined variable error. Afterwards, I also need to perform a test or two to check whether everything behaves as expected.

@Baharis
Copy link
Contributor Author

Baharis commented Feb 2, 2023

I hoped I'll be able to solve the issue myself, but I am at loss. I have prepared this branch to reverse the clustering order, so that the largest cluster is indexed 0, second largest is indexed 1 and so on. This code failed 3 tests: 2 of them relied on old naming scheme, and this was easy to fix.

Unfortunately, this PR also causes test_combine_imagesets to fail for a reason, which I do not fully comprehend. It is expected that reflections with "id" == -1 will preserve it during combining (see #1760). However, my tests show that "id" == -1 on my branch is not preserved, but rather set =="imageset_id". I do not understand the reason behind this behavior. I tried looking for it in the code, but I have problems understanding the changes introduced by #1760.

@ndevenish, do you maybe happen to have an idea why saving combined files with different names influences refl indexing?

@Baharis Baharis marked this pull request as ready for review February 2, 2023 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant