find_discontinuity

jwst.background.background_sub_soss.find_discontinuity(image)[source]

Determine the location of a discontinuity in the background levels.

This function applies a gaussian smoothing filter to the image, then searches for a discontinuity by locating the maximum gradient in the smoothed image. The search is restricted to columns where the discontinuity is expected to occur, set by the BKG_DISCON_COLUMNS parameter.

Parameters:
imagendarray

The background template with a discontinuity.

Returns:
ndarray

The derived location of the discontinuity in [x, y].