Skip to content

Commit

Permalink
tests for plotting extension
Browse files Browse the repository at this point in the history
  • Loading branch information
HoBeZwe committed Feb 5, 2024
1 parent 912ade6 commit 330075e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,21 @@ end
FF = scatteredfield(sp, ex, FarField(points_cart))

@test_nowarn plotff(FF, points_sph, scale="linear", normalize=true, type="abs")
@test_nowarn plotff(FF, points_sph, scale="log", normalize=true, type="abs")

@test_nowarn plotff(FF, points_sph, scale="linear", normalize=true, type="theta")
@test_nowarn plotff(FF, points_sph, scale="log", normalize=true, type="phi")

@test_nowarn plotff(FF, points_sph, scale="linear", normalize=false, type="theta")
@test_nowarn plotff(FF, points_sph, scale="log", normalize=false, type="phi")

# --- evaluate fields at φ = 5° cut
points_cart, points_sph = phiCutPoints(5) # analogously, thetaCutPoints can be used
FF = scatteredfield(sp, ex, FarField(points_cart))

@test_nowarn plotffcut(norm.(FF), points_sph, normalize=true, scale="log", format="polar")
@test_nowarn plotffcut(norm.(FF), points_sph, normalize=true, scale="linear", format="polar")

@test_nowarn plotffcut(norm.(FF), points_sph, normalize=true, scale="log", format="rectangular")
@test_nowarn plotffcut(norm.(FF), points_sph, normalize=true, scale="linear", format="rectangular")
end

0 comments on commit 330075e

Please sign in to comment.