Improve documentation for make_rgb_lupton
See original GitHub issueI tried using the make_rgb_lupton
on a set of 2MASS images for the Galactic center:
import numpy as np
from astropy.visualization import make_lupton_rgb
from astropy.utils.data import get_pkg_data_filename
from astropy.io import fits
image_r = fits.getdata(get_pkg_data_filename('galactic_center/gc_2mass_k.fits'))
image_g = fits.getdata(get_pkg_data_filename('galactic_center/gc_2mass_h.fits'))
image_b = fits.getdata(get_pkg_data_filename('galactic_center/gc_2mass_j.fits'))
image = make_lupton_rgb(image_r, image_g, image_b, filename='galactic_center_default.png')
and get the following result:
That’s… a lot of yellow…
I cannot figure out how to make this look like a normal star field, and the documentation doesn’t explain how to tune the parameters to get a good result. It would be nice to have more extensive documentation to show the effect different parameters have.
@parejkoj - on a shorter timescale, can you explain how to optimize the example above so that I have a better idea how this work?
Where does the algorithm perform best - not so dense star fields?
Is the issue the minimum values and if so should we have better defaults? (for example percentile-based)
Issue Analytics
- State:
- Created 7 years ago
- Comments:18 (18 by maintainers)
Top Results From Across the Web
3 ways to begin to reduce clinical documentation by 75% by ...
Reduce stress in your practice with: Expert insights on burnout; Quick tips to streamline workflows; Resources to improve professional ...
Read more >Strategies for Improving Documentation
EHRs increase healthcare providers' responsibility and accountability with respect to reviewing, comprehending and documenting personal health information.
Read more >Tips for Approaching Clinical Documentation Improvement
Healthcare providers can approach clinical documentation improvement project through a number of methods, including staffing, teamwork, ...
Read more >5 Tips for Improving Documentation | CloudApp Blog
Effective documentation improves workplace productivity and efficiency. Think about it: easy to understand documents help new employees learn their jobs faster.
Read more >Key Strategies for Improving Clinical Documentation in 2020
Precise, complete, trustworthy, and timely documentation is critical to validate services provided, reduce risks, and improve patient care.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@astrofrog @parejkoj I want to reiterate my suggestion from #5570 : I think this function doesn’t necessarily need a lot of narrative docs in astropy proper, but this is a perfect case to write a tutorial that promotes use of proper packages in the proper places. Photutils has a bunch of algorithms for estimating the background level of an image and subtracting it (https://photutils.readthedocs.io/en/stable/photutils/background.html). So my suggested workflow would be:
make_lupton_rgb
to generate the final RGB imageThat sounds like a beautiful example of how the ecosystem works together flexibly, doesn’t it? And then the narrative docs can reference that tutorial and stay lean-and-mean focused on just the final step.
Oh, but it probably does make sense to add at least a little bit along the lines of “make sure your backgrounds match”. Maybe even use this specific example, with magic numbers chosen by @astrofrog to make it pretty, with a note that says “if you want to know how these numbers were chosen, see the fancy tutorial that includes feature-ful background subtraction”