get_multiresolution_support

get_multiresolution_support#

scarlet2.wavelets.get_multiresolution_support(image, starlets, sigma, K=3, epsilon=0.1, max_iter=20, image_type='ground', rng_key=None)[source]#

Calculate the multi-resolution support for a dictionary of starlet coefficients.

This is different for ground and space based telescopes. For space-based telescopes the procedure in Starck and Murtagh 1998 iteratively calculates the multi-resolution support. For ground based images, where the PSF is much wider and there are no pixels with no signal at all scales, we use a modified method that estimates support at each scale independently.

Parameters:
  • image (2D array) – The image to transform into starlet coefficients.

  • starlets (array with dimension (scales+1, Ny, Nx)) – The starlet dictionary used to reconstruct image.

  • sigma (float) – The standard deviation of the image.

  • K (float) – The multiple of sigma to use to calculate significance. Coefficients w where |w| > K*sigma_j, where sigma_j is the standard deviation at the jth scale, are considered significant.

  • epsilon (float) – The convergence criteria of the algorithm. Once |new_sigma_j - sigma_j| / new_sigma_j < epsilon the algorithm has completed.

  • max_iter (int) – Maximum number of iterations to fit sigma_j at each scale.

  • image_type (str) – The type of image that is being used. This should be "ground" for ground based images with wide PSFs or "space" for images from space-based telescopes with a narrow PSF.

  • rng_key (jax.random.PRNGKey, optional) – Random key used only when image_type="space" to generate a noise realisation for estimating per-scale standard deviations. Defaults to jax.random.PRNGKey(0) if not provided.

Returns:

  • M (array of int) – Mask with significant coefficients in starlets set to 1.

  • sigma_j (array, shape (scales+1,)) – Converged per-scale noise estimate used for thresholding. For the "ground" branch this is the iteratively refined sigma_j; for "space" it is sigma * sigma_je (the product of the input sigma and the per-scale noise factor derived from a noise realisation).