NoiseFactor

class spizzle.NoiseFactor(wsum, fillval=nan)

Bases: object

Noise factor of the image of drizzled exposures, in a second pass over them.

The noise factor of Covariance needs 2 r (r + 1) + 1 output-sized sums, one per offset. With the weight sums of all exposures known from a first pass, it needs two. For C = sum_k W_k diag(var_k) W_k.T, each exposure adds to

T[o] = sum_o’ C[o, o’] / wsum[o’] = W @ (var * (W.T @ (1 / wsum))) V[o] = C[o, o] = (W * W) @ var

and noise_factor = wsum * T / V: each pixel’s covariance with every pixel, at every offset, over its variance. No radius is needed.

Add every exposure to a Coadd, then make a NoiseFactor from its weight sums and add the same operators again, kept or built again, each with the variance of its exposure.

Parameters:
wsumndarray, shape (ny_out, nx_out)

Weight sums of all the exposures, such as Coadd.out_wht. Kept, not copied, so it must not change while exposures are added.

fillvalfloat

Value where the pixel has no weight or variance.

Attributes Summary

noise_factor

ndarray, shape out_shape: covariance of each pixel with every pixel, over its variance.

Methods Summary

add(W, var[, iscale])

Add one exposure that is in the weight sums.

Attributes Documentation

noise_factor

ndarray, shape out_shape: covariance of each pixel with every pixel, over its variance.

As Covariance.noise_factor with a radius of at least the reach; fillval where the pixel has no weight or variance.

Methods Documentation

add(W, var, iscale=1.0)

Add one exposure that is in the weight sums.

Parameters:
WOperator or scipy.sparse array

The exposure’s operator, as for Coadd.add.

varndarray, shape (ny, nx)

Variance of the exposure’s data.

iscalefloat

Factor applied to the data; its square is applied to var.