STScI-Citizen-Science / MTPipeline

Pipeline to produce CR rejected, astrodrizzled, png's of HST WFPC2 solar system data.
6 stars 1 forks source link

Fix Saturated Pixel Scaling #21

Closed acviana closed 11 years ago

acviana commented 11 years ago

Right now the saturated pixels are scaled down to the saturation limit of 4095.0 by selecting the pixels in the astrodrizzled images that are greater than > 4095. However, the saturation limit can not be determined in this way from the science outputs of astrodrizzle because of the potential flux contribution from multiple pixels as a result of the geometric distortion correction.

The correct way to do this is to use the weight map and find any pixels that have a weight of 0. Those pixels have been flagged as "bad" and using those indices we can mark the same pixels in the science image to be scaled to the saturation limit or to the local median.

acviana commented 11 years ago

With the initial code in place to find the pixels with a weight of zero it seems that for the wide images there are at (least sometimes) ~200k pixels with a weight of 0. This is out of 2,362,500 total pixels (1350 x 1750), or about 10%. This seems a little high to me to be strictly saturated pixels. For example, using u2eu0101t_c0m_wide_single_wht.fits gives 238016 pixels with a weight of 0 while `u2eu0101t_c0m_center_single_wht.fits returns only 4. I'm not sure if this had something to do with any of the other settings in the wide and center outputs.

I think the next step is to run some images thought and see how they come out; especially the "stat" output.