-
Notifications
You must be signed in to change notification settings - Fork 119
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
Xfel merge filter by resolution n obs #1030
base: master
Are you sure you want to change the base?
Conversation
a6f54d9
to
b947567
Compare
b947567
to
4ca6c71
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a good feature. Some review comments added.
filter_by_n_obs = 'n_obs' in self.params.filter.algorithm[0] | ||
filter_by_resolution = 'resolution' in self.params.filter.algorithm[0] | ||
# only "unit_cell" "n_obs" and "resolution" algorithms are supported | ||
if (not filter_by_unit_cell) and (not filter_by_n_obs) and (not filter_by_resolution): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These validation steps should likely be in the validate function. validate runs before the program starts execution, which will save time if the parameters are invalid.
{ | ||
algorithm = n_obs reindex resolution unit_cell report | ||
.type = choice | ||
.type = strings | ||
.multiple = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If .type = choice and .multiple = true, then params.filter.algorithm should be a list of already validated strings. Is there a reason that doesn't work?
|
||
# Do we have any data left? | ||
from xfel.merging.application.utils.data_counter import data_counter | ||
data_counter(self.params).count(new_experiments, new_reflections) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
data_counter result not checked?
@@ -129,14 +129,18 @@ | |||
.help = The filter section defines criteria to accept or reject whole experiments | |||
.help = or to modify the entire experiment by a reindexing operator | |||
.help = refer to the select section for filtering of individual reflections | |||
.help = only unit_cell, resolution, and n_obs are implemented |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's go ahead and drop reindex and report if they aren't implemented.
Implemented experiment filters by resolution and number of observations within cctbx.xfel.merge