@@ -191,7 +191,7 @@ def test_init_invalid_xtype():
191191 "org_do_args, target_do_args, scale_inputs, expected" ,
192192 [
193193 # Test whether scale_to() scales to the expected values
194- ( # C1: Same x-array and y-array with 2.1 offset, expect yarray shifted by 2.1 offset
194+ ( # C1: Same x-array and y-array with 2.1 offset, expect y-array to shift up by 2.1
195195 {
196196 "xarray" : np .array ([10 , 15 , 25 , 30 , 60 , 140 ]),
197197 "yarray" : np .array ([2 , 3 , 4 , 5 , 6 , 7 ]),
@@ -212,7 +212,7 @@ def test_init_invalid_xtype():
212212 },
213213 {"xtype" : "tth" , "yarray" : np .array ([4.1 , 5.1 , 6.1 , 7.1 , 8.1 , 9.1 ])},
214214 ),
215- ( # C2: Same length x-arrays with exact x-value match
215+ ( # C2: Same x-arrays, x-value matches at tth=60, expect y-array to divide by 10
216216 {
217217 "xarray" : np .array ([10 , 15 , 25 , 30 , 60 , 140 ]),
218218 "yarray" : np .array ([10 , 20 , 25 , 30 , 60 , 100 ]),
@@ -233,7 +233,10 @@ def test_init_invalid_xtype():
233233 },
234234 {"xtype" : "tth" , "yarray" : np .array ([1 , 2 , 2.5 , 3 , 6 , 10 ])},
235235 ),
236- ( # C3: Same length x-arrays with approximate x-value match
236+ ( # C3: Different x-arrays with same length,
237+ # x-value has closest match at q=0.12 (y=10) and q=0.14 (y=1)
238+ # for original and target diffraction objects,
239+ # expect y-array to divide by 10
237240 {
238241 "xarray" : np .array ([0.12 , 0.24 , 0.31 , 0.4 ]),
239242 "yarray" : np .array ([10 , 20 , 40 , 60 ]),
@@ -254,7 +257,10 @@ def test_init_invalid_xtype():
254257 },
255258 {"xtype" : "q" , "yarray" : np .array ([1 , 2 , 4 , 6 ])},
256259 ),
257- ( # C4: Different x-array lengths with approximate x-value match
260+ ( # C4: Different x-array lengths
261+ # x-value has closest matches at tth=61 (y=50) and tth=62 (y=5),
262+ # for original and target diffraction objects,
263+ # expect y-array to divide by 10
258264 {
259265 "xarray" : np .array ([10 , 25 , 30.1 , 40.2 , 61 , 120 , 140 ]),
260266 "yarray" : np .array ([10 , 20 , 30 , 40 , 50 , 60 , 100 ]),
@@ -273,7 +279,6 @@ def test_init_invalid_xtype():
273279 "d" : None ,
274280 "offset" : 0 ,
275281 },
276- # C5: Scaling factor is calculated at index = 4 (tth=61) for self and index = 5 for target (tth=62)
277282 {"xtype" : "tth" , "yarray" : np .array ([1 , 2 , 3 , 4 , 5 , 6 , 10 ])},
278283 ),
279284 ],
0 commit comments