Skip to content

Commit

Permalink
Merge pull request #49 from toastisme/fix_show_for_tof
Browse files Browse the repository at this point in the history
Fixed errors when using dials.show for tof data.
  • Loading branch information
toastisme authored Mar 18, 2024
2 parents 3be8b71 + 206f446 commit 3e4a2c4
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions src/dials/command_line/show.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import iotbx.phil
from cctbx import uctbx
from dxtbx.model import PolyBeam
from dxtbx.model.experiment_list import ExperimentListFactory
from scitbx.math import five_number_summary

Expand Down Expand Up @@ -91,6 +92,8 @@ def show_beam(detector, beam):

# standard static beam model string
s = str(beam)
if isinstance(beam, PolyBeam):
return s

# report whether the beam is scan-varying
if beam.num_scan_points > 0:
Expand Down Expand Up @@ -263,14 +266,17 @@ def show_experiments(experiments, show_scan_varying=False):
except AttributeError:
pass
text.append(str(expt.detector))
text.append(
"Max resolution (at corners): %f"
% (expt.detector.get_max_resolution(expt.beam.get_s0()))
)
text.append(
"Max resolution (inscribed): %f"
% (expt.detector.get_max_inscribed_resolution(expt.beam.get_s0()))
)
try:
text.append(
"Max resolution (at corners): %f"
% (expt.detector.get_max_resolution(expt.beam.get_s0()))
)
text.append(
"Max resolution (inscribed): %f"
% (expt.detector.get_max_inscribed_resolution(expt.beam.get_s0()))
)
except AttributeError:
pass
text.append("")
text.append(show_beam(expt.detector, expt.beam))
if expt.sequence is not None:
Expand Down

0 comments on commit 3e4a2c4

Please sign in to comment.