shift_ref_image

jwst.extract_1d.ifu.shift_ref_image(mask, delta_y, delta_x, fill=0)[source]

Apply source position offset to target or background for ref image.

Parameters:
maskndarray

This is either the 2D or 3D target mask or background mask, which was created from an image EXTRACT1D reference file. It is assumed that all pixels in the science data are good. If that is not correct, this function may be called with a data quality array as the first argument, in order to obtain a shifted data quality array. In this case, fill should be set to a positive value, e.g., 1.

delta_y, delta_xint

These are the shifts to be applied to the vertical and horizontal axes respectively.

fillint or float

The output array will be initialized to this value. This should be 0 (the default) if mask is a target or background mask, but it should be set to 1 (or some other positive value) if mask is a data quality array.

Returns:
tempndarray

A copy of mask, but shifted by delta_y and delta_x.