Skip to content

Commit 0691e54

Browse files
docs: improve docstring and test comment
1 parent 8d7b540 commit 0691e54

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ def scale_to(self, target_diff_object, q=None, tth=None, d=None, offset=None):
400400
"""Returns a new diffraction object which is the current object but
401401
rescaled in y to the target.
402402
403-
By default, if `q`, `tth`, or `d` are not provided, scaling is based on the max q-value from each object.
403+
By default, if `q`, `tth`, or `d` are not provided, scaling is based on the max intensity from each object.
404404
Otherwise, y-value in the target at the closest specified x-value will be used as the factor to scale to.
405405
The entire array is scaled by this factor so that one object places on top of the other at that point.
406406
If multiple values of `q`, `tth`, or `d` are provided, an error will be raised.

Diff for: tests/test_diffraction_objects.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def test_init_invalid_xtype():
191191
"org_do_args, target_do_args, scale_inputs, expected",
192192
[
193193
# Test whether the original y-array is scaled as expected
194-
( # C1: none of q, tth, d, provided, expect to scale on the maximal x-arrays
194+
( # C1: none of q, tth, d, provided, expect to scale on the maximal intensity from each object
195195
{
196196
"xarray": np.array([0.1, 0.2, 0.3]),
197197
"yarray": np.array([1, 2, 3]),

0 commit comments

Comments
 (0)