|
10 | 10 | "wavelength, q, expected_tth", |
11 | 11 | [ |
12 | 12 | # Test conversion of q to tth with valid values |
13 | | - # Case 1: Allow empty arrays for q |
14 | | - # 1. Expect empty arrays when wavelength is provided |
| 13 | + # C1: Allow empty array q to compute tth with or without wavelength |
| 14 | + # 1. Wavelength provided, expect empty array of tth |
15 | 15 | (4 * np.pi, np.empty((0)), np.empty(0)), |
16 | | - # 2. Expect empty arrays and wavelength warning when no wavelength is provided |
| 16 | + # 2. No wavelength provided, expected empty tth and wavelength UserWarning |
17 | 17 | (None, np.empty((0)), np.empty((0))), |
18 | | - # Case 2: Non-empty q values are provided without wavelength |
19 | | - # 1. Expect valid tth values in degrees. |
| 18 | + # C2: Use non-empty q values to compute tth with or without |
| 19 | + # 1. No wavelength provided, expect valid tth values in degrees with wavelength UserWarning |
20 | 20 | ( |
21 | 21 | None, |
22 | 22 | np.array([0, 0.2, 0.4, 0.6, 0.8, 1]), |
23 | 23 | np.array([0, 1, 2, 3, 4, 5]), |
24 | 24 | ), |
25 | | - # Case 3: Both valid q and wavelength are provided. |
26 | | - # 1. Expect tth values of 2*arcsin(q) in degrees |
| 25 | + # 2. Wavelength provided, expect tth values of 2*arcsin(q) in degrees |
27 | 26 | (4 * np.pi, np.array([0, 1 / np.sqrt(2), 1.0]), np.array([0, 90.0, 180.0])), |
28 | 27 | ], |
29 | 28 | ) |
|
0 commit comments