Skip to content

Commit

Permalink
adjusted odf actor test
Browse files Browse the repository at this point in the history
  • Loading branch information
tvcastillod committed Sep 13, 2024
1 parent 95aa9eb commit ca9ec16
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 63 deletions.
47 changes: 0 additions & 47 deletions docs/experimental/SH-ODF_experimental/example_odf.py

This file was deleted.

20 changes: 4 additions & 16 deletions fury/tests/test_actors.py
Original file line number Diff line number Diff line change
Expand Up @@ -1982,9 +1982,6 @@ def test_odf_actor(interactive=False):
npt.assert_equal(report.actors, 1)
scene.clear()

# given degree is not even
npt.assert_warns(UserWarning, actor.odf, centers, coeffs, 3)

centers = np.array([0, 0, 0])
coeffs = np.array([
[-0.2739740312099, 0.2526670396328, 1.8922271728516, 0.2878578901291,
Expand All @@ -1995,7 +1992,8 @@ def test_odf_actor(interactive=False):
0.0499043911695, 0.2162453681231, 0.0921059995890, -0.2611238956451,
0.2549301385880, -0.4534865319729, 0.1922748684883, -0.6200597286224]
])
odf_actor = actor.odf(centers=centers, coeffs=coeffs, degree=6)
# odf glyph of degree 6
odf_actor = actor.odf(centers=centers, coeffs=coeffs)
scene.add(odf_actor)

if interactive:
Expand All @@ -2005,7 +2003,8 @@ def test_odf_actor(interactive=False):
npt.assert_equal(report.actors, 1)
scene.clear()

odf_actor = actor.odf(centers=centers, coeffs=coeffs, degree=4)
# odf glyph of degree 4
odf_actor = actor.odf(centers=centers, coeffs=coeffs[:15])
scene.add(odf_actor)

if interactive:
Expand All @@ -2014,14 +2013,3 @@ def test_odf_actor(interactive=False):
report = window.analyze_scene(scene)
npt.assert_equal(report.actors, 1)
scene.clear()

odf_actor = actor.odf(centers=centers, coeffs=coeffs, degree=8)
# not enough coefficients for given degree
npt.assert_warns(UserWarning, actor.odf, centers, coeffs, 8)
scene.add(odf_actor)

if interactive:
window.show(scene)

npt.assert_equal(report.actors, 1)
scene.clear()

0 comments on commit ca9ec16

Please sign in to comment.