#365 closed defect (fixed)
pmSourceLocalSky annulus forced on image
| Reported by: | eugene | Owned by: | |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | detrend | Version: | 0.5.0 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
the subimage defiend in pmSourceLocalSky needs to be constrained to stay within
the bounds of the image. I've added MAX/MIN functions to require that. (If we
have PS_MAX, PS_MIN defines, we should use those):
peak->x,y is guaranteed to be on image
psS32 SubImageCenterRow = peak->y;
psS32 SubImageCenterCol = peak->x;
psS32 SubImageStartRow = MAX (0, SubImageCenterRow - outerRadiusS32);
psS32 SubImageEndRow = MIN (image->numRows - 1, SubImageCenterRow +
outerRadiusS32);
psS32 SubImageStartCol = MAX (0, SubImageCenterCol - outerRadiusS32);
psS32 SubImageEndCol = MIN (image->numCols - 1, SubImageCenterCol +
outerRadiusS32);

This should be done in current code.