AccumulatorMeanStack

class lsst.meas.algorithms.AccumulatorMeanStack(shape, bit_mask_value, mask_threshold_dict={}, mask_map=[], no_good_pixels_mask=None, calc_error_from_input_variance=True, compute_n_image=False)

Bases: object

Stack masked images.

Parameters:
shapetuple

Shape of the input and output images.

bit_mask_valueint

Bit mask to flag for “bad” inputs that should not be stacked.

mask_threshold_dictdict [int: float], optional

Dictionary of mapping from bit number to threshold for flagging. Only bad bits (in bit_mask_value) which mask fractional weight greater than this threshold will be flagged in the output image.

mask_maplist [tuple], optional

Mapping from input image bits to aggregated coadd bits.

no_good_pixels_maskint, optional

Bit mask to set when there are no good pixels in the stack. If not set then will set coadd masked image ‘NO_DATA’ bit.

calc_error_from_input_variancebool, optional

Calculate the error from the input variance?

compute_n_imagebool, optional

Calculate the n_image map as well as stack?

Methods Summary

add_image(image[, weight])

Add an image to the stack.

add_masked_image(masked_image[, weight])

Add a masked image to the stack.

fill_stacked_image(stacked_image)

Fill the image after accumulation.

fill_stacked_masked_image(stacked_masked_image)

Fill the stacked mask image after accumulation.

stats_ctrl_to_threshold_dict(stats_ctrl)

Convert stats control to threshold dict.

Methods Documentation

add_image(image, weight=1.0)

Add an image to the stack.

No bit-filtering is performed when adding an image.

Parameters:
imagelsst.afw.image.Image

Image to add to the stack.

weightfloat or np.ndarray, optional

Weight to apply for weighted mean. If an array, must be same size and shape as input image.

add_masked_image(masked_image, weight=1.0)

Add a masked image to the stack.

Parameters:
masked_imagelsst.afw.image.MaskedImage

Masked image to add to the stack.

weightfloat or np.ndarray, optional

Weight to apply for weighted mean. If an array, must be same size and shape as input masked_image.

fill_stacked_image(stacked_image)

Fill the image after accumulation.

Parameters:
stacked_imagelsst.afw.image.Image

Total image.

fill_stacked_masked_image(stacked_masked_image)

Fill the stacked mask image after accumulation.

Parameters:
stacked_masked_imagelsst.afw.image.MaskedImage

Total masked image.

static stats_ctrl_to_threshold_dict(stats_ctrl)

Convert stats control to threshold dict.

Parameters:
stats_ctrllsst.afw.math.StatisticsControl
Returns:
threshold_dictdict

Dict mapping from bit to propagation threshold.