Skip to content

Commit b7e037e

Browse files
test function for fast_compute_cve
1 parent 7d0d574 commit b7e037e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import numpy as np
2+
3+
from diffpy.labpdfproc.fast_cve import FAST_TTH_GRID, INVERSE_CVE_DATA, fast_compute_cve
4+
5+
6+
def test_fast_compute_cve():
7+
expected_tth_grid = FAST_TTH_GRID
8+
expected_cve = 1 / np.array(INVERSE_CVE_DATA)
9+
actual_tth_grid, actual_cve = fast_compute_cve(mud=1)
10+
assert np.allclose(actual_tth_grid, expected_tth_grid)
11+
assert np.allclose(actual_cve, expected_cve, rtol=1e-5)

0 commit comments

Comments
 (0)