Skip to content

Commit

Permalink
Move qm out of moment calculation.
Browse files Browse the repository at this point in the history
  • Loading branch information
[Harry Lane] committed Jul 10, 2023
1 parent ba4dde8 commit 3a8402c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
10 changes: 6 additions & 4 deletions src/SpinWaveTheory/Test_scripts/simple_AFM.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,22 +72,24 @@ begin
Plots.plot!(qvals, disp_SUN[:,4], linecolor="blue", label="SUN")
end
display(p)
=#
@time begin
qvals = 0.0:0.005:1.0
qs = [(q, 0, 0) for q in qvals]
energies = 0.0:0.01:4.25
is = Sunny.intensities(swt_SUN, qs, energies, 0.1)
Plots.heatmap(qvals, energies, is'; clims=(0.0, 10), xlabel="[H,0,0]",ylabel="E (mev)")
end
#=
=#
@time begin
qvals = 0.:0.005:1.0
qs = [(q, 0, 0) for q in qvals]
energies = 0.0:0.01:4.25
is = Sunny.KPMintensities(swt_SUN, qs, energies, 200)
p=Plots.heatmap(qvals, energies, is'; clims=(0.0, 10), xlabel="[H,0,0]",ylabel="E (mev)")
end
=#

using PlotUtils
#savefig("20x20x1_LSWT_0p1.png")
#savefig("20x20x1_LSWT_0p1.png")

Plots.plot(energies,is[101,:],xlabel="E (meV)", ylabel = "Intensity",xlims=(0,1),title = "Cut at [0.5,0,0]",legend = false)
5 changes: 2 additions & 3 deletions src/SpinWaveTheory/kpm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,13 @@ function KPMdssf(swt::SpinWaveTheory, qs,ωlist,P::Int64)
(α1, α0) = (αnew, α1)
end
end
chebyshev_moments[:,:,qidx,1]*=(1/π)
chebyshev_moments[:,:,qidx,2:end]*=(2/π)
for m=0:P-1
for w=1:length(ωlist)
ωdep[w,m+1]=Cheby(ωlist[w]/γ,m)*JacksonKernelDamping(m,P-1)
end
end

ωdep[:,1] *=(1/π)
ωdep[:,2:end] *=(2/π)
for w=1:length(ωlist)
for α=1:3
for β=1:3
Expand Down

0 comments on commit 3a8402c

Please sign in to comment.