Skip to content

Commit 69aa7c7

Browse files
committed
Improve wavelength warning msg
1 parent d176b6b commit 69aa7c7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: src/diffpy/utils/transforms.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"No wavelength has been specified. You can continue to use the DiffractionObject, but "
88
"some of its powerful features will not be available. "
99
"To specify a wavelength, if you have do = DiffractionObject(xarray, yarray, 'tth'), "
10-
"you may set do.wavelength = 1.54 with the unit in angstroms."
10+
"you may set do.wavelength = 1.54 for a wavelength of 1.54 angstroms."
1111
)
1212
invalid_tth_emsg = "Two theta exceeds 180 degrees. Please check the input values for errors."
1313
invalid_q_or_d_or_wavelength_emsg = (

Diff for: tests/test_transforms.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def test_q_to_tth(wavelength, q, expected_tth):
2929
"No wavelength has been specified. You can continue to use the DiffractionObject, but "
3030
"some of its powerful features will not be available. "
3131
"To specify a wavelength, if you have do = DiffractionObject(xarray, yarray, 'tth'), "
32-
"you may set do.wavelength = 1.54 with the unit in angstroms."
32+
"you may set do.wavelength = 1.54 for a wavelength of 1.54 angstroms."
3333
)
3434
if wavelength is None:
3535
with pytest.warns(UserWarning, match=re.escape(wavelength_warning_emsg)):

0 commit comments

Comments
 (0)