scarlet.psf

class scarlet.psf.FunctionPSF(*parameters, integrate=True, boxsize=None)[source]

Bases: PSF

Base class for PSFs with functional forms.

Parameters:
parameters: `~scarlet.Parameter` or list thereof

Optimization parameters. Can be fixed.

integrate: bool

Whether pixel integration is performed

boxsize: int

Size of bounding box over which to evaluate the function, in frame pixels

Attributes:
children

List of child models

parameters

List of parameters, including from the children

Methods

check_parameters()

Check that all parameters have finite elements

get_model(*parameter[, offset])

Get the PSF realization

get_models_of_children(*parameters, **kwargs)

Get realization of all child models

get_parameter(i, *parameters)

Access parameters by list index or by name

update()

Update internal state or configuration of the model

expand_dims

expand_dims(model)[source]
class scarlet.psf.GaussianPSF(sigma, integrate=True, boxsize=None)[source]

Bases: FunctionPSF

Circular Gaussian Function

Parameters:
sigma: float, array, or `~scarlet.Parameter`

Standard deviation of the Gaussian in frame pixels If the width is to be optimized, provide a full defined Parameter.

integrate: bool

Whether pixel integration is performed

boxsize: int

Size of bounding box over which to evaluate the function, in frame pixels

Attributes:
children

List of child models

parameters

List of parameters, including from the children

Methods

check_parameters()

Check that all parameters have finite elements

get_model(*parameters[, offset])

Get the PSF realization

get_models_of_children(*parameters, **kwargs)

Get realization of all child models

get_parameter(i, *parameters)

Access parameters by list index or by name

update()

Update internal state or configuration of the model

expand_dims

get_model(*parameters, offset=None)[source]

Get the PSF realization

Parameters:
parameters: tuple of optimimzation parameters
offset: 2D tuple or ``~scarlet.Parameter`

Optional subpixel offset of the model, in units of frame pixels

Returns:
result: array

A centered PSF model defined by its parameters, shifted by offset

class scarlet.psf.ImagePSF(image)[source]

Bases: PSF

Image PSF

Creates a PSF model from a image of the centered PSF.

Parameters:
image: 2D or 3D array
Attributes:
children

List of child models

parameters

List of parameters, including from the children

Methods

check_parameters()

Check that all parameters have finite elements

get_model(*parameters[, offset])

Get the PSF realization

get_models_of_children(*parameters, **kwargs)

Get realization of all child models

get_parameter(i, *parameters)

Access parameters by list index or by name

update()

Update internal state or configuration of the model

get_model(*parameters, offset=None)[source]

Get the PSF realization

Parameters:
parameters: tuple of optimimzation parameters
offset: 2D tuple or ``~scarlet.Parameter`

Optional subpixel offset of the model, in units of frame pixels

Returns:
result: array

A centered PSF model defined by its parameters, shifted by offset

class scarlet.psf.MoffatPSF(alpha=4.7, beta=1.5, integrate=False, boxsize=None)[source]

Bases: FunctionPSF

Symmetric 2D Moffat function

\[(1+\]

rac{(x-x0)^2+(y-y0)^2}{lpha^2})^{-eta}

Parameters:
alpha: float

Core width, in frame pixels

beta: float

Power-law index

integrate: bool

Whether pixel integration is performed. Not implemented!

boxsize: Box

Size of bounding box over which to evaluate the function, in frame pixels

Attributes:
children

List of child models

parameters

List of parameters, including from the children

Methods

check_parameters()

Check that all parameters have finite elements

get_model(*parameters[, offset])

Get the PSF realization

get_models_of_children(*parameters, **kwargs)

Get realization of all child models

get_parameter(i, *parameters)

Access parameters by list index or by name

update()

Update internal state or configuration of the model

expand_dims

get_model(*parameters, offset=None)[source]

Get the PSF realization

Parameters:
parameters: tuple of optimimzation parameters
offset: 2D tuple or ``~scarlet.Parameter`

Optional subpixel offset of the model, in units of frame pixels

Returns:
result: array

A centered PSF model defined by its parameters, shifted by offset

class scarlet.psf.PSF(*parameters, children=None)[source]

Bases: Model

Attributes:
children

List of child models

parameters

List of parameters, including from the children

Methods

check_parameters()

Check that all parameters have finite elements

get_model(*parameter[, offset])

Get the PSF realization

get_models_of_children(*parameters, **kwargs)

Get realization of all child models

get_parameter(i, *parameters)

Access parameters by list index or by name

update()

Update internal state or configuration of the model

abstract get_model(*parameter, offset=None)[source]

Get the PSF realization

Parameters:
parameters: tuple of optimimzation parameters
offset: 2D tuple or ``~scarlet.Parameter`

Optional subpixel offset of the model, in units of frame pixels

Returns:
result: array

A centered PSF model defined by its parameters, shifted by offset

scarlet.psf.normalize(image)[source]

Normalize to PSF image in every band to unity