Skip to content

Commit

Permalink
take care of systematic absent incides
Browse files Browse the repository at this point in the history
  • Loading branch information
minhuanli committed Dec 15, 2024
1 parent 874fac1 commit 5830a54
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions SFC_Torch/Fmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,12 @@ def init_mtz(self, mtzdata, N_bins, expcolumns, set_experiment, freeflag, testse
except:
raise ValueError(f"{expcolumns} columns not included in the mtz file!")

# Make sure no systematic absent indices are included, and map to asu
if rs.utils.is_absent(mtz_reference.get_hkls(), mtz_reference.spacegroup).sum() > 0:
mtz_reference = mtz_reference[~rs.utils.is_absent(mtz_reference.get_hkls(), mtz_reference.spacegroup)]
print("Found systematic absent indices in the mtz, already dropped!", flush=True)
mtz_reference.hkl_to_asu(inplace=True, anomalous=self.anomalous)

if self.anomalous:
# Try to get the wavelength from MTZ file
try:
Expand Down

0 comments on commit 5830a54

Please sign in to comment.