# blot_image

drizzle.resample.blot_image(data, pixmap, pix_ratio, exptime, output_pixel_shape, interp='poly5', sinscl=1.0)

  Resample the `data` input image onto an output grid defined by the `pixmap` array. `blot_image` performs resampling using one of the several interpolation algorithms and, unlike the “drizzle” algorithm with ‘square’, ‘turbo’, and ‘point’ kernels, this resampling is not flux-conserving.

  This method works best for with well sampled images and thus it is typically used to resample the output of `Drizzle` back to the coordinate grids of input images of `Drizzle.add_image()`. The output of `Drizzle` are usually well sampled images especially if it was created from a set of dithered images.

  Parameters:

    - data (2D array) – Input numpy array of the source image in units of ‘cps’.

    - pixmap (3D array) – A mapping from input image (`data`) coordinates to resampled (`out_img`) coordinates. `pixmap` must be an array of shape `(Ny, Nx, 2)` where `(Ny, Nx)` is the shape of the input image. `pixmap[..., 0]` forms a 2D array of X-coordinates of input pixels in the ouput frame and `pixmap[..., 1]` forms a 2D array of Y-coordinates of input pixels in the ouput coordinate frame.

    - output_pixel_shape (tuple of int) – A tuple of two integer numbers indicating the dimensions of the output image `(Nx, Ny)`.

    - pix_ratio (float) – Ratio of the input image pixel scale to the ouput image pixel scale.

    - exptime (float) – The exposure time of the input image.

    - interp (str, optional) –

      The type of interpolation used in the resampling. The possible values are:

      > - ”nearest” (nearest neighbor interpolation);

      > - ”linear” (bilinear interpolation);

      > - ”poly3” (cubic polynomial interpolation);

      > - ”poly5” (quintic polynomial interpolation);

      > - ”sinc” (sinc interpolation);

      > - ”lan3” (3rd order Lanczos interpolation); and

      > - ”lan5” (5th order Lanczos interpolation).

    - sincscl (float, optional) – The scaling factor for “sinc” interpolation.

  Returns:

    out_img – A 2D numpy array containing the resampled image data.

  Return type:

    2D numpy.ndarray