Skip to content

[BUG] Missing "selection" argument in bulk_solvent::k_mask_and_k_overall_grid_search #654

@sizmailov

Description

@sizmailov

Hi!

I believe there is an error in bulk_solvent::k_mask_and_k_overall_grid_search procedure.

1. k_overall should be calculated over selection (i.e. "work set"), not whole set of reflexes

FloatType k_overall = scale(f_obs, f_model.const_ref());

should be

     FloatType k_overall = scale(f_obs, f_model.const_ref(), selection);

2.k_overall_best does not correspond to r_best if no better R-factor found in the following grid search. Like I mentioned above selection should be used in this case too.

FloatType k_overall_best = 1.0;
FloatType r_best = r_factor(f_obs, f_calc);

should be

   FloatType k_overall_best = scale(f_obs, f_calc, selection);
   FloatType r_best = r_factor(f_obs, f_calc, selection, k_overall_best);

Note: Probably it would be a good idea to remove selection function argument (i.e. require users to pass already pre-selected arrays)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions