Adapted from ADASS 2024 workshop.
using ASDF
af = ASDF.load_file("../../data/jwst.asdf")
af.metadata
img_sci = let
img = af.metadata["data"][]
img[img .< 0] .= 1
img
end
And plot:
using CairoMakie
fig, ax, hm = heatmap(img_sci;
colorrange = (1, 1e3),
colorscale = log10,
colormap = :cividis,
nan_color = :lime, # NaNs are handled automatically
)
Colorbar(fig[1, 2], hm)
fig