Coadd

class spizzle.Coadd(out_shape, n_var=0, fillval=nan, context=False)

Bases: object

Weighted mean of drizzled exposures on one output grid, in float64.

Parameters:
out_shapetuple of int

(ny_out, nx_out).

n_varint

Number of variance planes given with each exposure.

fillvalfloat

Value of output pixels without weight, in out_img and out_var.

contextbool

Keep drizzle’s context, one int32 plane of the output size per 32 exposures, as out_ctx.

Attributes Summary

out_ctx

ndarray of int32, shape (n_planes,) + out_shape: bit k % 32 of plane k // 32 set where exposure k lands.

out_img

ndarray, shape out_shape: weighted mean of the data, fillval without weight.

out_var

list of ndarray, shape out_shape: variance of out_img from each variance plane.

out_wht

ndarray, shape out_shape: sum of the weights.

Methods Summary

add(W, data[, variances, iscale])

Add one exposure.

Attributes Documentation

out_ctx

ndarray of int32, shape (n_planes,) + out_shape: bit k % 32 of plane k // 32 set where exposure k lands.

None unless the Coadd was made with context=True.

out_img

ndarray, shape out_shape: weighted mean of the data, fillval without weight.

out_var

list of ndarray, shape out_shape: variance of out_img from each variance plane.

out_wht

ndarray, shape out_shape: sum of the weights.

Methods Documentation

add(W, data, variances=(), iscale=1.0)

Add one exposure.

Parameters:
WOperator or scipy.sparse array

The exposure’s operator, from drizzle_operator or build_operator, or a sparse array of shape (ny_out * nx_out, ny * nx) on the whole output grid.

datandarray, shape (ny, nx)

Science data.

variancessequence of ndarray or None

One variance plane per n_var, each of shape (ny, nx); None adds nothing to that plane.

iscalefloat

Factor applied to the data, and its square to the variances.