Skip to content

Commit

Permalink
Added wavelength residual column in output.
Browse files Browse the repository at this point in the history
  • Loading branch information
toastisme committed Mar 27, 2024
1 parent 04bc8e3 commit e59f823
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/dials/algorithms/refinement/refiner.py
Original file line number Diff line number Diff line change
Expand Up @@ -836,6 +836,8 @@ def print_step_table(self):
if units == "mm":
header.append(name + "\n(mm)")
rmsd_multipliers.append(1.0)
elif units == "A":
header.append(name + "\n(A)")
elif units == "rad": # convert radians to degrees for reporting
header.append(name + "\n(deg)")
rmsd_multipliers.append(RAD2DEG)
Expand Down Expand Up @@ -949,6 +951,8 @@ def calc_exp_rmsd_table(self):
rmsds.append(rmsd * px_per_mm[1])
elif name == "RMSD_Phi" and units == "rad":
rmsds.append(rmsd * images_per_rad)
elif name == "RMSD_wavelength" and units == "A":
header.append(name + "\n(A)")
elif units == "rad":
rmsds.append(rmsd * RAD2DEG)
rows.append([str(iexp), str(num)] + [f"{r:.5g}" for r in rmsds])
Expand Down Expand Up @@ -999,6 +1003,8 @@ def print_panel_rmsd_table(self):
name == "RMSD_DeltaPsi" and units == "rad"
): # convert radians to degrees for reporting of stills
header.append(name + "\n(deg)")
elif name == "RMSD_wavelength" and units == "A":
header.append(name + "\n(frame)")
else: # skip RMSDs that cannot be expressed in image/scan space
pass

Expand All @@ -1025,6 +1031,8 @@ def print_panel_rmsd_table(self):
rmsds.append(rmsd * images_per_rad)
elif name == "RMSD_DeltaPsi" and units == "rad":
rmsds.append(rmsd * RAD2DEG)
elif name == "RMSD_wavelength" and units == "A":
rmsds.append(rmsd)
rows.append([str(ipanel), str(num)] + [f"{r:.5g}" for r in rmsds])

if len(rows) > 0:
Expand Down

0 comments on commit e59f823

Please sign in to comment.