Skip to content

Commit

Permalink
In symmetry, don't remove on failed normalisation
Browse files Browse the repository at this point in the history
  • Loading branch information
jbeilstenedmands committed Oct 27, 2023
1 parent a129ed3 commit 7c2e213
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions src/dials/algorithms/symmetry/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def _normalise(self, method):
normalise = self.ml_iso_normalisation
elif method == "ml_aniso":
normalise = self.ml_aniso_normalisation
bad_datasets = []

normalised_intensities = None
for i in range(int(flex.max(self.dataset_ids) + 1)):
logger.info("\n" + "-" * 80 + "\n")
Expand All @@ -172,22 +172,10 @@ def _normalise(self, method):
method,
exc_info=True,
)
bad_datasets.append(i)
if not normalised_intensities:
normalised_intensities = intensities
else:
if not normalised_intensities:
normalised_intensities = intensities
else:
normalised_intensities = normalised_intensities.concatenate(
intensities
)

if bad_datasets:
sel = flex.bool(self.dataset_ids.size(), True)
for i in bad_datasets:
bad_sel = self.dataset_ids == i
sel.set_selected(bad_sel, False)
self.dataset_ids = self.dataset_ids.select(sel)
assert self.dataset_ids.size() == normalised_intensities.size()
normalised_intensities = normalised_intensities.concatenate(intensities)
self.intensities = normalised_intensities.set_info(
self.intensities.info()
).set_observation_type_xray_intensity()
Expand Down

0 comments on commit 7c2e213

Please sign in to comment.