Operator

class spizzle.Operator(matrix: csr_array, box: tuple, out_shape: tuple, reach: int = None)

Bases: object

Drizzle operator of one exposure on its bounding box of the output grid.

matrix @ data.ravel() gives the exposure’s weighted sums on the output pixels of box; the exposure contributes nothing outside it. Keeping to the box makes the operator, and the work to build and apply it, scale with the exposure rather than with the output grid.

Parameters:
matrixscipy.sparse.csr_array, shape (box_ny * box_nx, ny * nx)

Row r is output pixel (y0 + r // box_nx, x0 + r % box_nx).

boxtuple of slice

(slice(y0, y1), slice(x0, x1)), the smallest box of output pixels that holds every entry, so that image[box] is the exposure’s region of an output image; empty if the exposure misses the output grid.

out_shapetuple of int

(ny_out, nx_out).

reachint or None

Largest distance in y or in x, in output pixels, between two output pixels that share an input pixel: drizzled noise is uncorrelated beyond it (see Covariance). None if not known.

Attributes Summary

box

box_shape

tuple of int: (box_ny, box_nx), the shape of image[box].

matrix

out_shape

reach

Methods Summary

full()

The operator on the whole output grid.

Attributes Documentation

box: tuple = MISSING
box_shape

tuple of int: (box_ny, box_nx), the shape of image[box].

matrix: csr_array = MISSING
out_shape: tuple = MISSING
reach: int = None

Methods Documentation

full()

The operator on the whole output grid.

Returns:
scipy.sparse.csr_array, shape (ny_out * nx_out, ny * nx)

Shares its indices and values with matrix.