get_shifts

sofia_redux.instruments.forcast.register_datasets.get_shifts(datasets, user_shifts=None, refset=0, basehead=None, algorithm=None, initial_reference=None, do_wcs_shift=False, wcskey=' ')[source]

Returns all shifts relative to the reference set.

No error check is performed. Should be performed by the calling function.

Parameters:
datasetsarray_like of tuples

All elements are 3-tuples. Each tuple represents a data set consisting where the elements are as follows:

  1. numpy.ndarray

    image array (nrow, ncol). Image shapes are allowed to differ from others in the inputs data set.

  2. astropy.io.fits.header.Header

    FITS header for the image array

  3. numpy.ndarray, optional

    variance array (nrow, ncol). Used to propagate variance. Must be the same shape as the data array in the first element.

  4. numpy.ndarray, optional

    normalization map (nrow, ncol) to propagate. Must be the same shape as the data array in the first element.

refsetint, optional

Index of the dataset to use as the reference. Default is the first set in the list (0).

user_shiftsarray_like of array_like, optional

User shifts if required. No shift may be represented by None. All other shifts should be supplied as (dx, dy). Length must be the same length as datasets

baseheadastropy.io.fits.header.Header, optional

FITS header to update with HISTORY messages

algorithmstr, optional

Registration and coadding algorithm. If None, defaults to the coadding algorithm determined by the drip configuration or reference header.

initial_referencearray_like, optional

An optional reference to pass if an initial shift on the reference dataset is required.

do_wcs_shiftbool, optional

If set, offsets returned are intended to be added to the CRPIX values in the header, rather than applied to the image array.

wcskeystr, optional

If not ‘ ‘, an alternate WCS is used for calculating WCS shifts. For spectral images, it is expected that wcskey=’A’.

Returns:
numpy.ndarray

(nsets, (x, y)) array of offsets