# Allow configuring more statistical options for assembleCoadds.py

XMLWordPrintable

## Details

• Type: Story
• Status: Done
• Resolution: Done
• Fix Version/s: None
• Component/s:
• Labels:
None
• Story Points:
3
• Sprint:
DRP F17-3
• Team:
Data Release Production

## Description

The assembleCoadd.py task has a configuration option doSigmaClip which chooses between MEAN and MEANCLIP. Please replace this with an option to specify the algorithm to be used. Note that afwMath.stringToStatisticsProperty can be used to convert a string to an enum value. In particular, this would allow me to specify a MEDIAN stack if desired (e.g. to make pretty RGB images)

## Activity

Hide
Robert Lupton added a comment -

This is really an HSC request, but if possible we should do it on the LSST side and cherry pick to HSC not vice-versa.

Show
Robert Lupton added a comment - This is really an HSC request, but if possible we should do it on the LSST side and cherry pick to HSC not vice-versa.
Hide

Bob, do you have time to review this? Allowing all statistics on coadds required removing the doClip argument to assemble, and hence some changes to SafeClipAssembleCoadd. I sought to imitate the original behavior of SafeClipAssemble:

• ignore doSigmaClip
• allow only "MEAN" for the final coadd
• pass configs sigmaClip and clipIter to the child task that creates the MEANCLIP'ped coadd.

One interesting discovery was that we pass the coadd variance plane as the weighting to coaddUtils.setCoaddEdgeBits. Most stats, such as NPOINT, SUM, don't have an uncertainty computed and the variance is 0. If a stat without an uncertainty is requested and doInterp=True, the whole image gets replaced with the median value. I chose to validate that doInterp=False when those stats are chosen, rather than reformulate how we set the NO_DATA bits for pixels zero variance.

Show
Yusra AlSayyad added a comment - Bob, do you have time to review this? Allowing all statistics on coadds required removing the doClip argument to assemble, and hence some changes to SafeClipAssembleCoadd. I sought to imitate the original behavior of SafeClipAssemble: ignore doSigmaClip allow only "MEAN" for the final coadd pass configs sigmaClip and clipIter to the child task that creates the MEANCLIP'ped coadd. One interesting discovery was that we pass the coadd variance plane as the weighting to coaddUtils.setCoaddEdgeBits. Most stats, such as NPOINT, SUM, don't have an uncertainty computed and the variance is 0. If a stat without an uncertainty is requested and doInterp=True, the whole image gets replaced with the median value. I chose to validate that doInterp=False when those stats are chosen, rather than reformulate how we set the NO_DATA bits for pixels zero variance.

## People

• Assignee:
Reporter:
Robert Lupton
Reviewers:
Bob Armstrong
Watchers:
Bob Armstrong, Robert Lupton, Yusra AlSayyad