Skip to content

Commit

Permalink
Change default wavelength_weight value. Change default outlier algori…
Browse files Browse the repository at this point in the history
…thm to mcd. Fix typo when checking wavelength_strategy override.
  • Loading branch information
toastisme committed May 1, 2024
1 parent 71c435b commit 72bbad6
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions src/dials/algorithms/refinement/reflection_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
"whether the case is for stills or scans. The default gives"
"unit weighting."
.type = floats(size = 3, value_min = 0)
wavelength_weight = 1e7
wavelength_weight = 1e4
.help = "Weight for the wavelength term in the target function for"
"Laue refinement"
.type = float(value_min = 0)
Expand Down Expand Up @@ -388,7 +388,7 @@ def laue_manager(

## Outlier detection
if params.outlier.algorithm in ("auto", libtbx.Auto):
params.outlier.algorithm = "sauter_poon"
params.outlier.algorithm = "mcd"
if params.outlier.sauter_poon.px_sz is libtbx.Auto:
# get this from the first panel of the first detector
params.outlier.sauter_poon.px_sz = experiments.detectors()[0][
Expand All @@ -411,13 +411,18 @@ def laue_manager(
## Weighting strategy

if params.weighting_strategy.override == "statistical":
params.weighting_strategy.override == "statistical_laue"
params.weighting_strategy.override = "statistical_laue"
elif params.weighting_strategy.override == "constant":
params.weighting_strategy.override = "constant_laue"
elif params.weighting_strategy.override is not None:
raise ValueError(
f"{params.weighting_strategy.override} not compatible with Laue data"
)

if params.weighting_strategy.override is not None:
if params.weighting_strategy.override not in [
"constant_laue",
"statistical_laue",
]:
raise ValueError(
f"{params.weighting_strategy.override} not compatible with Laue data"
)

weighting_strategy = ReflectionManagerFactory.get_weighting_strategy_override(
params
Expand Down

0 comments on commit 72bbad6

Please sign in to comment.