API Documentation

drizzle.resample Module

The drizzle module defines the Drizzle class, for combining input images into a single output image using the drizzle algorithm.

Functions

blot_image(data, pixmap[, pix_ratio, ...])

Resample the data input image onto an output grid defined by the pixmap array.

Classes

Drizzle([kernel, fillval, fillval2, ...])

A class for managing resampling and co-adding of multiple images onto a common output grid.

Class Inheritance Diagram

Inheritance diagram of drizzle.resample.Drizzle

drizzle.utils Module

Utility functions for computing inputs to the drizzle algorithm.

The functions in this module, such as calc_pixmap and estimate_pixel_scale_ratio, are convenience helpers. They cover common cases, primarily 2D celestial images described by astropy.wcs.WCS or gwcs.WCS objects that follow the APE 14 shared WCS interface, and they also illustrate how drizzle’s inputs can be derived from WCS information.

They are not intended to handle every possible WCS. Coordinate systems, distortion models, projections, bounding-box conventions and frame definitions vary widely, and a general-purpose solution for all of them is outside the scope of this package. If these helpers do not support your WCS objects, or produce results that are inaccurate for your data, compute the required quantities yourself:

  • a pixel map can be computed by any means and passed directly to drizzle.resample.Drizzle.add_image;

  • a pixel scale ratio can likewise be computed independently and passed via the scale argument of drizzle.resample.Drizzle.add_image.

The core resampling code does not depend on this module.

Functions

calc_pixmap(wcs_from, wcs_to[, shape, ...])

Calculate a discretized on a grid mapping between the pixels of two images using provided WCS of the original ("from") image and the destination ("to") image.

decode_context(context, x, y)

Get 0-based indices of input images that contributed to (resampled) output pixel with coordinates x and y.

estimate_pixel_scale_ratio(wcs_from, wcs_to)

Compute the ratio of the pixel scale of the "to" WCS at the refpix_to position to the pixel scale of the "from" WCS at the refpix_from position.

Classes

FrameMismatchError

Raised by calc_pixmap when frame_check="strict" and frame compatibility cannot be established, or frames differ and cannot be converted.

FrameMismatchWarning

Issued when frame_check="warn" and frame compatibility cannot be established or the required conversion cannot be performed.

Class Inheritance Diagram

Inheritance diagram of drizzle.utils.FrameMismatchError, drizzle.utils.FrameMismatchWarning