Skip to content

Commit

Permalink
Update molecule_shell.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
baptiste committed Dec 2, 2022
1 parent 7f9e3df commit 9ecdd5e
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions dev/book/molecule_shell.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,9 @@ function model(; ρ=1, R0=2, d = 0.5, medium=1.33, orientation="radial")
if N > 1e4
@warn "$N dipoles is rather a lot, are you sure? "
end
if orientation == "radial"
# cl = cluster_shell(N, a, b, c, R; orientation="radial", material="Rhodamine", type="point")
cl = cluster_shell(N, 0, 0, 1, R; orientation="radial", material="Rhodamine", type="point")
elseif orientation == "flat"
cl = cluster_shell(N, 1, 1, 0, R; orientation="radial", material="Rhodamine", type="point")
else
@warn "orientation not recognised"
end

cl = cluster_shell(N, 0, 0, 1, R; orientation=orientation, material="Rhodamine", type="point")

# testing
# cl = cluster_shell(5, 1, 1, 0, R; orientation="radial", material="Rhodamine", type="point")
res = spectrum_oa(cl, mat)
Expand All @@ -63,8 +58,10 @@ single = oa_df(s, mat.wavelengths)

using ColorSchemes
set_aog_theme!()
d1 = data(filter(:crosstype => ==("extinction"), all))
d2 = data(filter(:crosstype => ==("extinction"), single))


d1 = data(@rsubset(all, :crosstype == "extinction", :type == "average" ))
d2 = data(@rsubset(single, :crosstype == "extinction", :type == "average" ))
m1 = d1 * mapping(:wavelength, :value, color= => nonnumeric, col=:orientation, row=:crosstype)
m2 = d2 * mapping(:wavelength, :value, row=:crosstype)
layer1 = m1 * visual(Lines)
Expand Down

0 comments on commit 9ecdd5e

Please sign in to comment.