diff options
author | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2019-03-29 14:42:53 +0100 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2019-09-25 14:10:08 +0200 |
commit | 0f4ceb4c7f3f63fddf8fbf44c59fcd8f415e3847 (patch) | |
tree | d2f271ffe76f0ec18479a52dfe418beb16e38edb /tests | |
parent | 1fec36f7ccadd5f7dcf2bb59b0654dc53653b0f3 (diff) | |
download | astra-0f4ceb4c7f3f63fddf8fbf44c59fcd8f415e3847.tar.gz astra-0f4ceb4c7f3f63fddf8fbf44c59fcd8f415e3847.tar.bz2 astra-0f4ceb4c7f3f63fddf8fbf44c59fcd8f415e3847.tar.xz astra-0f4ceb4c7f3f63fddf8fbf44c59fcd8f415e3847.zip |
Adjust line kernels to line integral scaling
Diffstat (limited to 'tests')
-rw-r--r-- | tests/python/test_line2d.py | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/tests/python/test_line2d.py b/tests/python/test_line2d.py index d04ffb8..755bd27 100644 --- a/tests/python/test_line2d.py +++ b/tests/python/test_line2d.py @@ -454,23 +454,15 @@ class Test2DKernel(unittest.TestCase): for i, (center, edge1, edge2) in enumerate(gen_lines(pg)): (src, det) = center - try: - detweight = pg['DetectorWidth'] - except KeyError: - if 'fan' not in type: - detweight = effective_detweight(src, det, pg['Vectors'][i//pg['DetectorCount'],4:6]) - else: - detweight = np.linalg.norm(pg['Vectors'][i//pg['DetectorCount'],4:6], ord=2) - # We compute line intersections with slightly bigger (cw) and # smaller (aw) rectangles, and see if the kernel falls # between these two values. (aw,bw,cw) = intersect_line_rectangle_interval(src, det, xmin, xmax, ymin, ymax, 1e-3) - a[i] = aw * detweight - b[i] = bw * detweight - c[i] = cw * detweight + a[i] = aw + b[i] = bw + c[i] = cw a = a.reshape(astra.functions.geom_size(pg)) b = b.reshape(astra.functions.geom_size(pg)) c = c.reshape(astra.functions.geom_size(pg)) |