best_box_moments#
- scarlet2.init.best_box_moments(obs, center_pix, sizes=[11, 17, 25, 35, 47, 61, 77], min_snr=3, min_corr=0.99)[source]#
Make a bounding box for source at center
This method finds small box around the center so that the edge flux has a minimum SNR, the color of the edge pixels remains highly correlated to the center pixel color, and the flux in all channels is lower than with the last acceptable box size. This should effectively isolate the source against the noise background and neighboring objects.
- Parameters:
obs (
Observation) – The Observation instance to use when defining the bounding box.center_pix (
tuple) – source center, in pixel coordinatessizes (
list[int]) – a list of box sizes to cycle throughmin_snr (
float) – minimum SNR of edge pixels (aggregated over all observation channel) to allow increase of box sizemin_corr (
float) – minimum correlation coefficient between center and edge color to allow increase of box size
- Return type:
Box,Moments