Registry / data / drizzle

drizzle

JSON →
library2.2.0pypypi✓ verified 89d ago

A Python package for combining dithered astronomical images into a single image, supporting various kernels and error propagation. Current version is 2.2.0, requires Python >=3.10. Maintenance-led releases from STScI.

pip install drizzle
INSTALL
IMPORT
SIG · DRIZZLE
D
drizzle
datapythonv2.2.0
Install
4.3s avg
Import
296ms
Disk
100MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v2.2.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
build_error
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 4.3s · import 0.296s · 87MB
100MB installed
● package 100MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

drizzle
✓ import drizzle
Direct import of the top-level package is the standard entry point.
cdriz
✓ from drizzle import cdriz
✗ import cdriz
cdriz is a submodule; direct import fails.
blot
✓ from drizzle import blot
✗ from drizzle.blot import blot
blot is a high-level function in drizzle, not a submodule.
util
✓ from drizzle import cdriz
✗ from drizzle import util
Module 'util' was deprecated in 2.0.0 and removed; use cdriz or other public APIs.

Minimal drizzling example using synthetic 2x2 images. Adjust WCS parameters for real data.

import numpy as np from drizzle import drizzle # Create two simple dither images (2x2 each) img1 = np.array([[1.0, 2.0], [3.0, 4.0]]) img2 = np.array([[1.5, 2.5], [3.5, 4.5]]) # Define WCS-like parameters: output shape, input/output pixel scales # This is a minimal example; real usage requires proper WCS objects. out_shape = (4, 4) output = np.zeros(out_shape) # Drizzle the images (example with square kernel) drizzle.do_drizzle(output, img1, '1,1', '1,1', '1,1', 1.0, 1.0, kernel='square', pixfrac=1.0) print(output)
drizzle --version
Debug
Known issues
breakingVersion 2.0.0 redesigned the API: removed FITS-specific code, deprecated the 'util' module, removed support for 'tophat' kernel. Backward compatibility maintained only for JWST and Roman pipelines.
fix
If upgrading from 1.x, refactor code to remove imports from drizzle.util; use the new I/O agnostic API. For JWST/Roman users, existing code may work; otherwise check pipeline documentation.
affects: >=2.0.0
deprecatedThe 'util' module is deprecated since 2.0.0 and will be removed in a future release. Do not import from drizzle.util.
fix
Replace imports from drizzle.util with the corresponding public API functions (e.g., cdriz, drizzle.do_drizzle).
affects: >=2.0.0
gotchaThe 'gaussian', 'lanczos2', and 'lanczos3' kernels are not flux conserving. Using them will produce incorrect photometric results.
fix
Use 'square', 'point', or 'turbo' kernels for flux conservation. If you must use Lanczos, be aware of the warning and consider calibration.
affects: All
gotchaThe 'pixfrac' parameter is ignored when using the Lanczos kernel, as noted in a warning added in v2.2.0. Specify pixfrac only for other kernels; Lanczos always uses its own interpolation.
fix
Do not rely on pixfrac with Lanczos. The warning is emitted automatically.
affects: >=2.2.0
gotchaThe 'tophat' kernel was deprecated in 1.15.0 and removed in 2.0.0. Use 'square' or another supported kernel.
fix
Replace kernel='tophat' with kernel='square'.
affects: >=2.0.0
gotchaExposure time is undefined when in_units are not 'cps' (counts per second). The code may produce unexpected output if you pass non-cps data without proper scaling.
fix
Ensure input images are in units of counts per second (cps) or handle exposure time separately.
affects: >=2.0.0
Errors
Common errors & fixes
AttributeError: module 'drizzle' has no attribute 'util'
The 'util' module was deprecated and removed in v2.0.0.
fix
Import from other drizzle submodules like cdriz or use the main drizzle.do_drizzle. Do not import from drizzle.util.
ImportError: cannot import name 'cdriz' from 'drizzle'
cdriz is a C extension; incorrect import path if not installed properly or if using an older version.
fix
Run pip install --upgrade drizzle to ensure the C extensions are built. Then use: from drizzle import cdriz
TypeError: do_drizzle() got an unexpected keyword argument 'fillval'
fillval was renamed or removed in a newer version. In 2.0.0, the API changed; fillval might not be a valid argument.
fix
Check the function signature: use positional arguments or check documentation for new argument names like 'fill_value'.
ValueError: Unsupported kernel 'tophat'
The 'tophat' kernel was removed in v2.0.0.
fix
Use kernel='square' (the replacement) or another supported kernel.
Upgrade
Version history
2.2.0latest on PyPI · released Jan 6, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
19 hits · last 30 days
node
18
OpenAI (training)
1
Resources