astropy / ccd-reduction-and-photometry-guide

Read the CCD guide here:
http://www.astropy.org/ccd-reduction-and-photometry-guide/
BSD 3-Clause "New" or "Revised" License
101 stars 46 forks source link

Incorrect example for non-uniform sensitivity (notebook 01-04) #355

Closed jogojapan closed 10 months ago

jogojapan commented 10 months ago

The notebook on non-uniform sensitivity (notebooks/01-04-Nonuniform-sensitivity.ipynb), in its last section ("a realistic image") correctly (and helpfully) makes the point that the effect of the "flat image" is barely discernible unless the sky background is very strong.

But the demonstration of this, based on the code for final_image2, using a 100-times stronger sky background, is not convincing because the show_image command does not include the percu=99.9 parameter that was used when showing final_image before. So the parameter defaults to None, and then indeed the effect of "flat" is very visible, but that is because of the different gray scale, not the stronger sky background. When adding percu=99.9, the "flat" effect is again hardly visible.

I propose replacing the final two lines as follows.

Instead of

final_image2 = bias_only + noise_only + dark_only + flat * (isim.sky_background(image, 100 * sky_counts, gain=gain) + stars_only)
show_image(final_image2, cmap='gray')

use even stronger sky background (factor 3000 or more instead of 100) and add back the percu=99.9 parameter:

final_image2 = bias_only + noise_only + dark_only + flat * (isim.sky_background(image, 3000 * sky_counts, gain=gain) + stars_only)
show_image(final_image2, cmap='gray', percu=99.9)

This makes the effect of non-uniform sensitivity very visible by emphasizing the noise around the center of the image.

mwcraig commented 10 months ago

Closed by #357