applyDcr

lsst.ip.diffim.applyDcr(image, dcr, useInverse=False, splitSubfilters=False, splitThreshold=0.0, doPrefilter=True, order=3)

Shift an image along the X and Y directions.

Parameters:
image : numpy.ndarray

The input image to shift.

dcr : tuple

Shift calculated with calculateDcr. Uses numpy axes ordering (Y, X). If splitSubfilters is set, each element is itself a tuple of two float, corresponding to the DCR shift at the two wavelengths. Otherwise, each element is a float corresponding to the DCR shift at the effective wavelength of the subfilter.

useInverse : bool, optional

Apply the shift in the opposite direction. Default: False

splitSubfilters : bool, optional

Calculate DCR for two evenly-spaced wavelengths in each subfilter, instead of at the midpoint. Default: False

splitThreshold : float, optional

Minimum DCR difference within a subfilter required to use splitSubfilters

doPrefilter : bool, optional

Spline filter the image before shifting, if set. Filtering is required, so only set to False if the image is already filtered. Filtering takes ~20% of the time of shifting, so if applyDcr will be called repeatedly on the same image it is more efficient to precalculate the filter.

order : int, optional

The order of the spline interpolation, default is 3.

Returns:
shiftedImage : numpy.ndarray

A copy of the input image with the specified shift applied.