1.119. removeFlaggedPixels

Full Name: herschel.hifi.pipeline.util.tools.RemoveFlaggedPixelsTask
Alias: removeFlaggedPixels
Type: Java Task - Java Task
Import: from herschel.hifi.pipeline.util.tools import RemoveFlaggedPixelsTask



Task to handle flagged pixels by either setting the flux value to NaN,

replacing it by a value interpolated from non-flagged neighboring values, or by removing the pixel from the segment.

API Summary

Jython Syntax

from herschel.hifi.pipeline.product import HifiMask

removePixel = RemoveFlaggedPixelsTask()

removePixel(htp=htp, mask=HifiMask.BAD_PIXEL)

# Removes the pixels that have both bits at the same time

removePixel(htp=htp, mask=[HifiMask.BAD_PIXEL,HifiMask.SATURATED])

# Set interpolated flux value for pixels with the BAD_PIXEL set.

removePixel(htp=htp, mask=HifiMask.BAD_PIXEL, mode='Interpolate') {@link #__call__(PyObject[], String[])

API details


HifiTimelineProduct htp [INOUT, OPTIONAL, default=no default value.]

The input timeline product.

Object mask [INPUT, OPTIONAL, default=no default value.]

The flag to be handled by this task. It can be a HifiMask or an array of such. You can also specify the string 'any' in which case any flagged pixel (flag value > 0) will be removed.

String mode [INPUT, OPTIONAL, default="NaN".]

Method for how to handle the flagged flux values: 'NaN', 'Interpolate', 'Remove'

String interpolator [INPUT, OPTIONAL, default="linear".]

Interpolator for the flux and, if applicable, the weights if mode='Interpolate' has been chosen.

See also


  • 2011-08-08 - Melchior: : renamed from RemoveFlaggedPixels
  • 2011-12-20 - Melchior: : Examples in the URM corrected (HIFI-4396)