DustComponent#

class scarlet2.DustComponent(center, spectrum, morphology)[source]#

Bases: Component

Component with negative exponential model

This component is meant to describe the dust attenuation, \(\exp(-\tau)\), where \(\tau\) is the hyperspectral model defined by the base Component.

Parameters:
  • center (array, astropy.coordinates.SkyCoord) – Center position. If given as astropy sky coordinate, it will be transformed with the WCS of the model frame.

  • spectrum (Spectrum) – The spectrum of the component.

  • morphology (Morphology) – The morphology of the component.

Examples

To uniquely determine coordinates, the creation of components is restricted to a context defined by a Scene, which define the Frame of the model.

>>> with Scene(model_frame) as scene:
>>>    component = Component(center, spectrum, morphology)
__call__()[source]#

What to run when DustComponent is called

bbox: Box#

Bounding box of the model, in pixel coordinates of the model frame

center: jnp.ndarray#

Center position, in pixel coordinates of the model frame

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

morphology: jnp.array, Morphology#

Morphology model

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

spectrum: jnp.array, Spectrum#

Spectrum model