You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Could be a useful function to have. It's common to want to degrade maps to a lower resolution. Below is a prototype implementation (would definitely want to tidy this up first).
functionsmooth(map, width, output_nside=nside(map))
σ = width/(2sqrt(2log(2)))
kernel =HealpixMap(Float64, output_nside)
for pix =1:length(kernel)
θ, ϕ = LibHealpix.pix2ang_ring(nside(kernel), pix)
θ =rad2deg(θ)
kernel[pix] =exp(-θ^2/(2σ^2))
end
dΩ =4π/length(kernel)
kernel =HealpixMap(kernel.pixels / (sum(kernel.pixels)*dΩ))
lmax = mmax =1000
map_alm =map2alm(map, lmax, mmax, iterations=10)
kernel_alm =map2alm(kernel, lmax, mmax, iterations=10)
output_alm =Alm(Complex128, lmax, mmax)
for m =0:mmax, l = m:lmax
output_alm[l, m] =sqrt((4π)/(2l+1))*map_alm[l, m]*kernel_alm[l, 0]
endalm2map(output_alm, output_nside)
end
The text was updated successfully, but these errors were encountered:
Could be a useful function to have. It's common to want to degrade maps to a lower resolution. Below is a prototype implementation (would definitely want to tidy this up first).
The text was updated successfully, but these errors were encountered: