Opened 16 years ago
Closed 16 years ago
#47 closed defect (fixed)
GaussSmooth: look at scaling
Reported by: | MatthewWhiting | Owned by: | MatthewWhiting |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Smoothing | Version: | 1.1.6 |
Severity: | normal | Keywords: | |
Cc: |
Description (last modified by )
In the smooth() function of GaussSmooth, the output array pixels are scaled by the kernel flux. This shouldn't really happen. It seems to be correcting for the amount of kernel used, but perhaps something like
output[pos] *= fullKernelSize / fsum
rather than just /= fsum
.
Should check whether this is needed at all (presumably it is for the edge pixels where we don't use the full kernel?)
Change History (2)
comment:1 Changed 16 years ago by
Description: | modified (diff) |
---|---|
Status: | new → assigned |
comment:2 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
We do want the scaling present, as otherwise sources that are near the edges will be suppressed relative to a similar-sized source in the middle of the cube.
However, the scaling by the size of the kernel used should be done relative to the full kernel size (as shown above), otherwise you don't get what you expect at the end. That is, for most of the image, this factor should be 1, and so you will get exactly what you expect if you convolve with your kernel, and the noise scaling works in the way you expect. Without the !fullKernelSize parameter, everything gets reduced by a (large) factor.
I have made this change, and added a "hidden" parameter to the function call that allows you to select whether or not to do the scaling at all (it defaults to true).
Closing the ticket.