Recreate the DESCaL RGB image in python/astropy

23 views
Skip to first unread message

Sagar Sethi

unread,
Jan 5, 2025, 7:36:02 PM1/5/25
to DECam Legacy Survey
Hi All,
I have downloaded the g, r, and z filters fits separately.
Now, I am trying to recreate the same type of RGB image we can generally see in legacy viewer using Python. I want to overlay the radio contour, but I am not getting the proper colours for each filter.

Does anybody know, or is there any Python code available anywhere to do this?

I am using APLpy:
f=aplpy.make_rgb_image('J2145.fits','J2145.png', indices=(0, 1, 2),
                       vmin_r=None, vmax_r=None, pmin_r=70, pmax_r=99.75, stretch_r='sqrt', vmid_r=None,
                       vmin_g=None, vmax_g=None, pmin_g=1, pmax_g=99.75, stretch_g='sqrt', vmid_g=None,
                       vmin_b=None, vmax_b=None, pmin_b=70, pmax_b=99.75, stretch_b='sqrt', vmid_b=None,
                       make_nans_transparent=False, embed_avm_tags=True)


Thanks in advance
Happy New Year
Regards
Sagar

Dustin Lang

unread,
Jan 6, 2025, 10:26:23 AM1/6/25
to DECam Legacy Survey
Hi,

Here's the code that the viewer uses to make its RGB images:  dr2_rgb() takes a list of images and a list of bands (eg ['g','r','z']):
(and it calls the function just above with scales that make the images look okay):

cheers,
dustin

Reply all
Reply to author
Forward
0 new messages