Skip to main content

drizzle Documentation

Powered by Astropy Badge Drizzle's Coverage Status CI Status Documentation Status PyPI Status Zenodo DOI

The drizzle library is a Python package for combining dithered images into a single image. This library is derived from code used in DrizzlePac. Like DrizzlePac, most of the code is implemented in the C language. The biggest change from DrizzlePac is that this code passes an array that maps the input to output image into the C code, while the DrizzlePac code computes the mapping by using a Python callback. Switching to using an array allowed the code to be greatly simplified.

The DrizzlePac code is currently used in the Space Telescope processing pipelines. This library is forward looking in that it can be used with the new GWCS code.

Requirements

  • Python 3.10 or later

  • Numpy

  • Astropy

The Drizzle Algorithm

This section has been extracted from Chapter 3 of The DrizzlePac Handbook [Driz2025]

There are a family of linear reconstruction techniques that, at two opposite extremes, are represented by the interlacing and shift-and-add techniques, with the Drizzle algorithm representing a continuum between these two extremes.

If the dithers are particularly well-placed, one can simply interlace the pixels from the images onto a finer grid. In the interlacing method, pixels from the independent input images are placed in alternate pixels on the output image according to the alignment of the pixel centers in the original images. However, due to occasional small positioning errors by the telescope, and non-uniform shifts in pixel space across the detector caused by geometric distortion of the optics, true interlacing of images is generally not feasible.

Another standard simple linear technique for combining shifted images, descriptively named “shift-and-add”, has been used for many years to combine dithered infrared data onto finer grids. Each input pixel is block-replicated onto a finer subsampled grid, shifted into place, and added to the output image. Shift-and-add has the advantage of being able to easily handle arbitrary dither positions. However, it convolves the image yet again with the original pixel, thus adding to the blurring of the image and to the correlation of noise in the image. Furthermore, it is difficult to use shift-and-add in the presence of missing data (e.g., from cosmic rays) and geometric distortion.

In response to the limitations of the two techniques described above, an improved method known formally as variable-pixel linear reconstruction, and more commonly referred to as Drizzle, was developed by Andy Fruchter and Richard Hook, initially for the purposes of combining dithered images of the Hubble Deep Field North (HDF-N). This algorithm can be thought of as a continuous set of linear functions that vary smoothly between the optimum linear combination technique (interlacing) and shift-and-add. This often allows an improvement in resolution and a reduction in correlated noise, compared with images produced by only using shift-and-add.

The degree to which the algorithm departs from interlacing and moves towards shift-and-add depends upon how well the PSF is subsampled by the shifts in the input images. In practice, the behavior of the Drizzle algorithm is controlled through the use of a parameter called pixfrac, which can be set to values ranging from 0 to 1, that represents the amount by which input pixels are shrunk before being mapped onto the output image plane.

A key to understanding the use of pixfrac is to realize that a CCD image can be thought of as the true image convolved first by the optics, then by the pixel response function (ideally a square the size of a pixel), and then sampled by a delta-function at the center of each pixel. A CCD image is thus a set of point samples of a continuous two-dimensional function. Hence the natural value of pixfrac is 0, which corresponds to pure interlacing. Setting pixfrac to values greater than 0 causes additional broadening of the output PSF by convolving the original PSF with pixels of non-zero size. Thus, setting pixfrac to its maximum value of 1 is equivalent to shift-and-add, the other extreme of linear combination, in which the output image PSF has been smeared by a convolution with the full size of the original input pixels.

The Drizzle algorithm is conceptually straightforward. Pixels in the original input images are mapped into pixels in the subsampled output image, taking into account shifts and rotations between images and the optical distortion of the camera. However, in order to avoid convolving the image with the large pixel “footprint” of the camera, Drizzle allows the user to shrink the pixel before it is averaged into the output image through the pixfrac parameter.

The flux value of each input pixel is divided up into the output pixels with weights proportional to the area of overlap between the “drop” and each output pixel. If the drop size is too small, not all output pixels have data added to them from each of the input images. One should therefore choose a drop size that is small enough to avoid convolving the image with too large an input pixel footprint, yet sufficiently large to ensure that there is not too much variation in the number of input pixels contributing to each output pixel.

When images are combined using Drizzle, a weight map can be specified for each input image. The weight image contains information about bad pixels in the image (in that bad pixels result in lower weight values). When the final output science image is generated, an output weight map which combines information from all the input weight images, is also saved.

Drizzle has a number of advantages over standard linear reconstruction methods. Since the pixel area can be scaled by the Jacobian of the geometric distortion, it is preserved for surface and absolute photometry. Therefore, the flux in the drizzled image, that was corrected for geometric distortion, can be measured with an aperture size that’s not dependent of its position on the image. Since the Drizzle code anticipates that a given output pixel might not receive any information from an input pixel, missing data does not cause a substantial problem as long as the observer has taken enough dither samples to fill in the missing information.

The blot methods perform the inverse operation of drizzle. That is, blotting performs the inverse mapping to transform the dithered median image back into the coordinate system of the original input image. Blotting is primarily used for identifying cosmic rays in the original image. Blot requires the user to provide the world coordinate system (WCS)-based transformations in the form of a pixel map array as input.

[Driz2025]

Anand, G. S., Mack, J., et al., 2025, “The DrizzlePac Handbook”, Version 3.0, (Baltimore: STScI)

Metadata

Release files for drizzle 3.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for drizzle 3.1.0
File Size Uploaded Provenance Actions
drizzle-3.1.0.tar.gz 139.4 kB Without provenance Details for drizzle-3.1.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for drizzle 3.1.0
File Actions
drizzle-3.1.0-cp315-cp315t-win_amd64.whl CPython 3.15 CPython 3.15 free-threading Windows x86-64 Details for drizzle-3.1.0-cp315-cp315t-win_amd64.whl
drizzle-3.1.0-cp315-cp315t-win32.whl CPython 3.15 CPython 3.15 free-threading Windows x86-32 Details for drizzle-3.1.0-cp315-cp315t-win32.whl
drizzle-3.1.0-cp315-cp315t-musllinux_1_2_x86_64.whl CPython 3.15 CPython 3.15 free-threading Linux musl 1.2+ x86-64 Details for drizzle-3.1.0-cp315-cp315t-musllinux_1_2_x86_64.whl
drizzle-3.1.0-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.15 CPython 3.15 free-threading Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details for drizzle-3.1.0-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
drizzle-3.1.0-cp315-cp315t-macosx_11_0_arm64.whl CPython 3.15 CPython 3.15 free-threading macOS 11.0+ ARM64 Details for drizzle-3.1.0-cp315-cp315t-macosx_11_0_arm64.whl
drizzle-3.1.0-cp314-cp314t-win_amd64.whl CPython 3.14 CPython 3.14 free-threading Windows x86-64 Details for drizzle-3.1.0-cp314-cp314t-win_amd64.whl
drizzle-3.1.0-cp314-cp314t-win32.whl CPython 3.14 CPython 3.14 free-threading Windows x86-32 Details for drizzle-3.1.0-cp314-cp314t-win32.whl
drizzle-3.1.0-cp314-cp314t-musllinux_1_2_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux musl 1.2+ x86-64 Details for drizzle-3.1.0-cp314-cp314t-musllinux_1_2_x86_64.whl
drizzle-3.1.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details for drizzle-3.1.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
drizzle-3.1.0-cp314-cp314t-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64 Details for drizzle-3.1.0-cp314-cp314t-macosx_11_0_arm64.whl
drizzle-3.1.0-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for drizzle-3.1.0-cp311-abi3-win_amd64.whl
drizzle-3.1.0-cp311-abi3-win32.whl CPython 3.11 abi3 Windows x86-32 Details for drizzle-3.1.0-cp311-abi3-win32.whl
drizzle-3.1.0-cp311-abi3-musllinux_1_2_x86_64.whl CPython 3.11 abi3 Linux musl 1.2+ x86-64 Details for drizzle-3.1.0-cp311-abi3-musllinux_1_2_x86_64.whl
drizzle-3.1.0-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 abi3 Linux glibc 2.28+ x86-64, Linux glibc 2.17+ x86-64 Details for drizzle-3.1.0-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
drizzle-3.1.0-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for drizzle-3.1.0-cp311-abi3-macosx_11_0_arm64.whl

Total release size: 3.2 MB

Release files / drizzle-3.1.0.tar.gz

Download URL drizzle-3.1.0.tar.gz
Size 139.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ca1c07f5cacfb77020835b947ac0e3cfa2266135a71b9d84aadf08cffadd0843
BLAKE2b-256 checksum
How to use checksums
9b1e0dcc5885310c7e83385491e9e02a59ffe358f8705c9a66f55a152fe61165
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / drizzle-3.1.0-cp315-cp315t-win_amd64.whl

Download URL drizzle-3.1.0-cp315-cp315t-win_amd64.whl
Size 104.1 kB
Tags CPython 3.15 CPython 3.15 free-threading Windows x86-64
SHA-256 checksum
How to use checksums
2a5ec58543f0447f56a96b094595fe97d7038896c1277616b9f7b7454aaaf605
BLAKE2b-256 checksum
How to use checksums
9005aa44d8349ebe1f551e116fa567b5ab4d523f71852520135e1905c41bc3c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / drizzle-3.1.0-cp315-cp315t-win32.whl

Download URL drizzle-3.1.0-cp315-cp315t-win32.whl
Size 94.6 kB
Tags CPython 3.15 CPython 3.15 free-threading Windows x86-32
SHA-256 checksum
How to use checksums
44563f9fe139413e0be54e9d2b4fe9f15bade413af44791e33c039464a67c349
BLAKE2b-256 checksum
How to use checksums
91b7518c23014b5dcc97341c29b2a49f07ea309d022e7de24ed75b832fb9bdb5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / drizzle-3.1.0-cp315-cp315t-musllinux_1_2_x86_64.whl

Download URL drizzle-3.1.0-cp315-cp315t-musllinux_1_2_x86_64.whl
Size 364.0 kB
Tags CPython 3.15 CPython 3.15 free-threading Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
53d27fb790d9b72f3c2d7c6783e62cc03ec134e596969f76c97eee594024ffc1
BLAKE2b-256 checksum
How to use checksums
e52ff863ca51fff1a3cf5b1c807f9b8cc3a216721ad5b1969d771b883b4f65ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / drizzle-3.1.0-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL drizzle-3.1.0-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 369.3 kB
Tags CPython 3.15 CPython 3.15 free-threading Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
fdb7ee0320657a7aedd7e664326788a93a1ea8f2817ad3b2a43cf5d92ffeab1c
BLAKE2b-256 checksum
How to use checksums
712ff0b27baca945a248d9c3acffe823b130f8614bb7fae565d7c4c0204ce844
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / drizzle-3.1.0-cp315-cp315t-macosx_11_0_arm64.whl

Download URL drizzle-3.1.0-cp315-cp315t-macosx_11_0_arm64.whl
Size 102.6 kB
Tags CPython 3.15 CPython 3.15 free-threading macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ed657971002183c211593c2ea094046014c0e81858f512304be526bf68233f73
BLAKE2b-256 checksum
How to use checksums
142697f52467ac12973ae6042333b7c4472e1b07839dd7004db73a460f85654a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / drizzle-3.1.0-cp314-cp314t-win_amd64.whl

Download URL drizzle-3.1.0-cp314-cp314t-win_amd64.whl
Size 104.1 kB
Tags CPython 3.14 CPython 3.14 free-threading Windows x86-64
SHA-256 checksum
How to use checksums
a840f819f0562cca0055c2ea666087f1da72bdf5d33e45d614efeec4eb708c6a
BLAKE2b-256 checksum
How to use checksums
e6f0cb9eafb2c5aea3b5c3fdfbf78b6e6eeaa67bdab315d9316776965a24a57a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / drizzle-3.1.0-cp314-cp314t-win32.whl

Download URL drizzle-3.1.0-cp314-cp314t-win32.whl
Size 94.6 kB
Tags CPython 3.14 CPython 3.14 free-threading Windows x86-32
SHA-256 checksum
How to use checksums
7d3615c7463dd46120fa1b59767187306b63ecfa00d9a32f83d3a468606e3f8c
BLAKE2b-256 checksum
How to use checksums
117ebaa3cede5a1e09ff54035149b13c20ed0d47ee80cc1af7bb53957630ac94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / drizzle-3.1.0-cp314-cp314t-musllinux_1_2_x86_64.whl

Download URL drizzle-3.1.0-cp314-cp314t-musllinux_1_2_x86_64.whl
Size 362.6 kB
Tags CPython 3.14 CPython 3.14 free-threading Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
dd668f866b3cc61286ab9e2ffbeff27f1118a7b52e5135d18dc05748076bdeb7
BLAKE2b-256 checksum
How to use checksums
82fba85e274591c5c081d2e0c8128406a532145fccf26dbc7fe3e4883e58ec74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / drizzle-3.1.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL drizzle-3.1.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 367.9 kB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
0ba367d0d24574fa5d64b70efd9d7600973ccc4694ac30a5a7d4dbd20edbd035
BLAKE2b-256 checksum
How to use checksums
669eb2302fd4892f0140054c9f7fe68cba94eb7fc08ba85551cd89343ef99c2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / drizzle-3.1.0-cp314-cp314t-macosx_11_0_arm64.whl

Download URL drizzle-3.1.0-cp314-cp314t-macosx_11_0_arm64.whl
Size 102.6 kB
Tags CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
c90a099d648e1ef9951a7fd769110de2bb4ed52da631b59c48fc2c252d3bb3c2
BLAKE2b-256 checksum
How to use checksums
bd500cfaa8ea47bb0202ff490584d644234faa809b74b4b66feb80f58efaaf70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / drizzle-3.1.0-cp311-abi3-win_amd64.whl

Download URL drizzle-3.1.0-cp311-abi3-win_amd64.whl
Size 101.1 kB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
0d8ca47991d59e4c068f0877687a22190b971f6f3b1ae2ad5639e208a96c9dbb
BLAKE2b-256 checksum
How to use checksums
6d1b1a5fa1140623360329100f3974373c67668293dc6f5f79014c577506e398
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / drizzle-3.1.0-cp311-abi3-win32.whl

Download URL drizzle-3.1.0-cp311-abi3-win32.whl
Size 92.4 kB
Tags CPython 3.11 Windows x86-32 abi3
SHA-256 checksum
How to use checksums
e6a61631163b43faeb9b7399ca7e4e9647450735c0fcc01edf40998f41a8fdea
BLAKE2b-256 checksum
How to use checksums
ab4c1fa1b14dd54af110392a5e11a0ebee80e6c6c8e451569c80c374c0b6d624
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / drizzle-3.1.0-cp311-abi3-musllinux_1_2_x86_64.whl

Download URL drizzle-3.1.0-cp311-abi3-musllinux_1_2_x86_64.whl
Size 344.0 kB
Tags CPython 3.11 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
31f351cf44a3f956b6b2033b0da24dc045b366b9783e1a60bc6308b14934b2fd
BLAKE2b-256 checksum
How to use checksums
1b31578e1cdfcd0eb6122dad1e81f751dd97b1e4202e250b599d77121fb10567
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / drizzle-3.1.0-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL drizzle-3.1.0-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 348.4 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
a833226b93957ba41cb9ec5a1d3dc2323799c87bb53dcd1b408b8cb011eee48d
BLAKE2b-256 checksum
How to use checksums
c6e0ded988abb005944d87b740798f4906675d4a9e9609524a102da2866b7e9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / drizzle-3.1.0-cp311-abi3-macosx_11_0_arm64.whl

Download URL drizzle-3.1.0-cp311-abi3-macosx_11_0_arm64.whl
Size 101.9 kB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
52093117db69e1646647d592f388449a72374df18a40dde91ae6b9770dd6ec77
BLAKE2b-256 checksum
How to use checksums
0d574a1a3b94091003ca9add3cae40f8dea601e8ae986328220abb4d4cb1cd97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for drizzle 3.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page