STScI-Citizen-Science/MTPipeline — pull request #144 by kevinfhale (2014-08-08 15:35:00+00:00)
Title: Merging revise_PNG into Master

Now that all of our images (with 83 known bad exceptions) have preview images, and we've preserved a version of our pipeline that still retains CosmoQuest functionality, I think it's time to merge this branch into Master.

The development process for this branch is documented in Ticket #129. In summary, this branch introduces the following major changes:

- Refactoring to replace several class methods which merely wrapped functions defined elsewhere with the functions themselves.
- Removed saturated clipping, which spent large amounts of time averaging the off-the-chip spaces in the new AstroDrizzle outputs.
- Replaced positive shifting with a simpler method of just setting any negative pixel values to 0.001. This eliminates absurd pixel values in the negative billions that screwed up any reasonable scaling.
- A similar cut sets pixel values above 20,000 to 20,000
- Outputting log-stretch images alongside the linear-stretch is now standard.
- Added a `stat_switch` that controls whether the before/after histograms for various array manipulations are output.

We output both a linear and log stretch in order to insure that at least one preview image is useful for each AstroDrizzle output. In general, linear stretching works for planetary targets, and log stretching works for fainter fields. Certain exceptions to this rule (not infrequently due to WFC3/UVIS often having a row of border pixels with absurd values) make creating a single, one-size-fits-all stretch very challenging. See the last few comments in Ticket #129 for details.