Skip to content

Commit

Permalink
Changes for attenuation lengths (#203)
Browse files Browse the repository at this point in the history
Accounts for changes in fundamental constants in

cctbx/cctbx_project@9f2530b

Fixes #202
  • Loading branch information
graeme-winter authored Jul 30, 2020
1 parent bf5c4ae commit 8c1fa60
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/format/test_FormatHDF5EigerNearlyNexus.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def test_semi_synthetic_dectris_eiger_nearly_nexus(dials_data, tmpdir):
assert panel.get_fast_axis() == (1, 0, 0)
assert panel.get_slow_axis() == (0, -1, 0)
assert panel.get_thickness() == pytest.approx(0.45)
assert panel.get_mu() == pytest.approx(3.96763)
assert panel.get_mu() == pytest.approx(3.96764, abs=1e-4)
assert panel.get_material() == "Si"
assert panel.get_origin() == pytest.approx((-120.556, 118.982, -134.255), abs=1e-3)
assert panel.get_distance() == pytest.approx(134.255)
Expand Down
10 changes: 7 additions & 3 deletions tests/serialize/test_xds.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ def test_to_xds(dials_data, tmpdir):
sequence = ImageSetFactory.new(file_names)[0]
to_xds = xds.to_xds(sequence)
s1 = to_xds.XDS_INP()
expected = (
expected_f = (
"""\
DETECTOR=PILATUS MINIMUM_VALID_PIXEL_VALUE=0 OVERLOAD=495976
SENSOR_THICKNESS= 0.320
!SENSOR_MATERIAL / THICKNESS Si 0.320
!SILICON= 3.960382
!SILICON= %%s
DIRECTION_OF_DETECTOR_X-AXIS= 1.00000 0.00000 0.00000
DIRECTION_OF_DETECTOR_Y-AXIS= 0.00000 1.00000 0.00000
NX=2463 NY=2527 QX=0.1720 QY=0.1720
Expand Down Expand Up @@ -57,7 +57,11 @@ def test_to_xds(dials_data, tmpdir):
"""
% dials_data("centroid_test_data").join("centroid_????.cbf").strpath
)
assert s1 == expected

# universe changed once, so be flexible
expected = [expected_f % a for a in ["3.960382", "3.960386"]]

assert s1 in expected
real_space_a = (-5.327642, -39.034747, -4.988286)
real_space_b = (-35.253495, 7.596265, -22.127661)
real_space_c = (-22.673623, -1.486119, 35.793463)
Expand Down

0 comments on commit 8c1fa60

Please sign in to comment.