JuliaAstro / AstroImages.jl

Visualization of astronomical images
Other
29 stars 9 forks source link

cmap seems unused in implot #42

Closed mamivilledeschenes closed 8 months ago

mamivilledeschenes commented 9 months ago

I am not been able to modify the color map with implot. I would expect the following lines to display the image with colormap ice. Whatever the cmap provided, the image is displayed with magma.

using AstroImages, Plots
file = "Image.fits"
img = AstroImage(file)
implot(img, cmap=:ice)

I am able to display with a different colormap using imview

p = imview(img, cmap=:ice)
plot(p, frame=:none)

this displays with cmap=:ice as expected.

Is this an issue or me misusing implot ?

sefffal commented 9 months ago

Thanks for the report @mamivilledeschenes! This is indeed a regression.

As a workaround you can for now try the following:

implot(imview(img,cmap=:ice))

This is what implot should essentially be doing in the background. I will look into why they have diverged.

sefffal commented 8 months ago

Fixed in https://github.com/JuliaAstro/AstroImages.jl/commit/ec88440ff264ce24e2b5b5142ee5732ecf01402a

I'll tag a new release once CI is green.

Thanks for the bug report!