Aim: Compute Y extent of bad pixels, remove redundancies. Column segments are built only for identical type and status. In case of redundancy, the lower status is kept (uplinked > CCF > new) and for the types the precedence is set as follows: HOT(1) > FLICKERING(2) > PIN_HOLE(4) > DEAD(3) > UNSPECIFIED(5) > INTACT(0)
The routine declaration is:
subroutine mergeBad(xbad, ybad, yext, tbad, fbad, nbad) ! xbad : array of RAWX coordinates ! ybad : array of RAWY coordinates ! yext : array of RAWY extensions ! tbad : array of bad pixel types ! fbad : array of bad pixel status (uplinked, CCF or new) ! nbad : number of bad pixels integer(kind=int16), dimension(:), intent(inout) :: xbad, ybad, yext, & tbad, fbad integer, intent(inout) :: nbad