StarletMorphology#

class scarlet2.StarletMorphology(coeffs: Array)[source]#

Bases: Morphology

Morphology in the starlet basis

Notes

The starlet basis is overcomplete, which means it can exactly represent the same image in multiple ways. If used without constraints or priors on the starlet coefficients, this morphology model is functionally indistinguishable from a 2D pixel array, while using more operations.

__call__(**kwargs)[source]#

Evaluate the model

coeffs: Array#

Starlet coefficients

static from_image(image, min_value=None, max_value=None)[source]#

Create starlet morphology from image

Parameters:
  • image (array) – 2D image array to determine coefficients from.

  • min_value ((float, None):) – Minimum value threshold for coefficients

  • max_value ((float, None):) – Minimum value threshold for coefficients

Return type:

StarletMorphology

get(name=None)#

Get parameter(s) from this module

Parameters:

name (str, optional) – Name of parameter. If not set, returns all parameters.

Returns:

requested data arrays for parameters

Return type:

dict

property parameters#

Parameters defined for this module

Returns:

name: (node, param) mapping for all parameters

Return type:

dict

set(values)#

Set parameter(s) from this module with values

Parameters:

values (dict[str,jnp.array]) – values to replace parameters with, identified by their name

Returns:

new module with parameter(s) replaced by values

Return type:

Module

property shape#

Shape (2D) of the morphology model