gwcs_blot
- stcal.outlier_detection.utils.gwcs_blot(median_data, median_wcs, blot_shape, blot_wcs, pix_ratio=None, fillval=0.0, pixmap_stepsize=1, pixmap_order=1)[source]
Resample the median data to recreate an input image based on the blot wcs.
- Parameters:
median_data (numpy.ndarray) – The data to blot.
median_wcs (gwcs.wcs.WCS) – The wcs for the median data.
blot_wcs (gwcs.wcs.WCS) – The target/blotted wcs.
fillval (float, optional) – Fill value for missing data.
pixmap_stepsize (int, optional) – If
pixmap_stepsize>1, perform the full WCS calculation on a sparser grid and use interpolation to fill in the rest of the pixels. This option speeds up pixel map computation by reducing the number of WCS calls, though at the cost of reduced pixel map accuracy. The loss of accuracy is typically negligible if the underlying distortion correction is smooth, but if the distortion is non-smooth,pixmap_stepsize>1is not recommended. Largepixmap_stepsizevalues are automatically reduced to no more than 1/10 of image size. Passed to stcal.resample.utils.calc_pixmap. Default 1.pixmap_order (int, optional) – Order of the 2D spline to interpolate the sparse pixel mapping if
pixmap_stepsize>1. Supported values are: 1 (bilinear) or 3 (bicubic). This Parameter is ignored whenpixmap_stepsize <= 1. Default 1.
- Returns:
blotted (numpy.ndarray) – The blotted median data.
blot_img (datamodel) – Datamodel containing header and WCS to define the ‘blotted’ image