|
LSST Applications g00274db5b6+edbf708997,g00d0e8bbd7+edbf708997,g199a45376c+5137f08352,g1fd858c14a+1d4b6db739,g262e1987ae+f4d9505c4f,g29ae962dfc+7156fb1a53,g2cef7863aa+73c82f25e4,g35bb328faa+edbf708997,g3e17d7035e+5b3adc59f5,g3fd5ace14f+852fa6fbcb,g47891489e3+6dc8069a4c,g53246c7159+edbf708997,g64539dfbff+9f17e571f4,g67b6fd64d1+6dc8069a4c,g74acd417e5+ae494d68d9,g786e29fd12+af89c03590,g7ae74a0b1c+a25e60b391,g7aefaa3e3d+536efcc10a,g7cc15d900a+d121454f8d,g87389fa792+a4172ec7da,g89139ef638+6dc8069a4c,g8d7436a09f+28c28d8d6d,g8ea07a8fe4+db21c37724,g92c671f44c+9f17e571f4,g98df359435+b2e6376b13,g99af87f6a8+b0f4ad7b8d,gac66b60396+966efe6077,gb88ae4c679+7dec8f19df,gbaa8f7a6c5+38b34f4976,gbf99507273+edbf708997,gc24b5d6ed1+9f17e571f4,gca7fc764a6+6dc8069a4c,gcc769fe2a4+97d0256649,gd7ef33dd92+6dc8069a4c,gdab6d2f7ff+ae494d68d9,gdbb4c4dda9+9f17e571f4,ge410e46f29+6dc8069a4c,geaed405ab2+e194be0d2b,w.2025.47
LSST Data Management Base Package
|
Public Member Functions | |
| __init__ (self, tuple bands, Box bbox, Parameter|np.ndarray spectrum, Parameter|np.ndarray morph_params, Callable morph_func, Callable morph_grad, Callable morph_prox, Callable|np.ndarray morph_step, Callable|None prox_spectrum=None, float floor=1e-20) | |
| tuple[float, float] | peak (self) |
| float | y0 (self) |
| float | x0 (self) |
| np.ndarray | spectrum (self) |
| CartesianFrame | frame (self) |
| np.ndarray | radial_params (self) |
| np.ndarray | morph (self, CartesianFrame|None frame=None) |
| Callable | prox_morph (self) |
| Callable | grad_morph (self) |
| Callable | morph_step (self) |
| Image | get_model (self, CartesianFrame|None frame=None) |
| np.ndarray | prox_spectrum (self, np.ndarray spectrum) |
| np.ndarray | grad_spectrum (self, np.ndarray input_grad, np.ndarray spectrum, np.ndarray morph) |
| update (self, int it, np.ndarray input_grad) | |
| bool | resize (self, Box model_box) |
| None | parameterize (self, Callable parameterization) |
| ScarletComponentBaseData | to_data (self) |
| Box | bbox (self) |
| tuple | bands (self) |
Public Attributes | |
| floor = floor | |
| y0 | |
| radial_params | |
| frame | |
Protected Member Functions | |
| np.ndarray | _get_morph (self, CartesianFrame|None frame=None) |
Protected Attributes | |
| _spectrum = parameter(spectrum) | |
| _params = parameter(morph_params) | |
| _func = morph_func | |
| _morph_grad = morph_grad | |
| _morph_prox = morph_prox | |
| Callable | _morph_step = morph_step |
| Callable | _prox_spectrum = self.prox_spectrum |
| tuple | _bands = bands |
| Box | _bbox = bbox |
A parametric model of an astrophysical source
Parameters
----------
bands:
The bands used in the model.
bbox:
The bounding box that holds the model.
spectrum:
The spectrum of the component.
morph_params:
The parameters of the morphology.
morph_func:
The function to generate the 2D morphology image
based on `morphParams`.
morph_grad:
The function to calculate the gradient of the
likelihood wrt the morphological parameters.
morph_prox:
The proximal operator for the morphology parameters.
morph_step:
The function that calculates the gradient of the
morphological model.
prox_spectrum:
Proximal operator for the spectrum.
If `prox_spectrum` is `None` then the default proximal
operator `self.prox_spectrum` is used.
floor:
The minimum value of the spectrum, used to prevent
divergences in the gradients.
Definition at line 636 of file parametric.py.
| lsst.scarlet.lite.models.parametric.ParametricComponent.__init__ | ( | self, | |
| tuple | bands, | ||
| Box | bbox, | ||
| Parameter | np.ndarray | spectrum, | ||
| Parameter | np.ndarray | morph_params, | ||
| Callable | morph_func, | ||
| Callable | morph_grad, | ||
| Callable | morph_prox, | ||
| Callable | np.ndarray | morph_step, | ||
| Callable | None | prox_spectrum = None, | ||
| float | floor = 1e-20 ) |
Definition at line 669 of file parametric.py.
|
protected |
The 2D image of the morphology
This callable generates an image of the morphology
in the given frame.
Parameters
----------
frame:
The frame (bounding box, pixel grid) that the image is
placed in.
Returns
-------
result:
The image of the morphology in the `frame`.
Definition at line 727 of file parametric.py.
|
inherited |
The bands in the component model
Definition at line 71 of file component.py.
|
inherited |
The bounding box that contains the component in the full image
Definition at line 66 of file component.py.
| CartesianFrame lsst.scarlet.lite.models.parametric.ParametricComponent.frame | ( | self | ) |
The coordinate system that contains the model
Reimplemented in lsst.scarlet.lite.models.parametric.EllipticalParametricComponent.
Definition at line 718 of file parametric.py.
| Image lsst.scarlet.lite.models.parametric.ParametricComponent.get_model | ( | self, | |
| CartesianFrame | None | frame = None ) |
Generate the full model for this component
Reimplemented from lsst.scarlet.lite.component.Component.
Definition at line 772 of file parametric.py.
| Callable lsst.scarlet.lite.models.parametric.ParametricComponent.grad_morph | ( | self | ) |
The function that calculates the gradient of the morphological model
Definition at line 759 of file parametric.py.
| np.ndarray lsst.scarlet.lite.models.parametric.ParametricComponent.grad_spectrum | ( | self, | |
| np.ndarray | input_grad, | ||
| np.ndarray | spectrum, | ||
| np.ndarray | morph ) |
Gradient of the spectrum wrt. the component model
Parameters
----------
input_grad:
Gradient of the likelihood wrt the component model
spectrum:
The model of the spectrum.
morph:
The model of the morphology.
Returns
-------
result:
The gradient of the likelihood wrt. the spectrum.
Definition at line 789 of file parametric.py.
| np.ndarray lsst.scarlet.lite.models.parametric.ParametricComponent.morph | ( | self, | |
| CartesianFrame | None | frame = None ) |
The morphological model
Definition at line 749 of file parametric.py.
| Callable lsst.scarlet.lite.models.parametric.ParametricComponent.morph_step | ( | self | ) |
The function that calculates the gradient of the morphological model
Definition at line 766 of file parametric.py.
| None lsst.scarlet.lite.models.parametric.ParametricComponent.parameterize | ( | self, | |
| Callable | parameterization ) |
Convert the component parameter arrays into Parameter instances
Reimplemented from lsst.scarlet.lite.component.Component.
Definition at line 832 of file parametric.py.
| tuple[float, float] lsst.scarlet.lite.models.parametric.ParametricComponent.peak | ( | self | ) |
The center of the component
Definition at line 698 of file parametric.py.
| Callable lsst.scarlet.lite.models.parametric.ParametricComponent.prox_morph | ( | self | ) |
The function used to constrain the morphological model
Definition at line 754 of file parametric.py.
| np.ndarray lsst.scarlet.lite.models.parametric.ParametricComponent.prox_spectrum | ( | self, | |
| np.ndarray | spectrum ) |
Apply a prox-like update to the spectrum
Parameters
----------
spectrum:
The spectrum of the model.
Definition at line 777 of file parametric.py.
| np.ndarray lsst.scarlet.lite.models.parametric.ParametricComponent.radial_params | ( | self | ) |
The parameters used to model the radial function
Reimplemented in lsst.scarlet.lite.models.parametric.EllipticalParametricComponent.
Definition at line 723 of file parametric.py.
| bool lsst.scarlet.lite.models.parametric.ParametricComponent.resize | ( | self, | |
| Box | model_box ) |
Resize the box that contains the model Not yet implemented, so for now the model box does not grow. If this is ever implemented in production, in the long run this will be based on a cutoff value for the model.
Reimplemented from lsst.scarlet.lite.component.Component.
Definition at line 823 of file parametric.py.
| np.ndarray lsst.scarlet.lite.models.parametric.ParametricComponent.spectrum | ( | self | ) |
The array of spectrum values
Definition at line 713 of file parametric.py.
| ScarletComponentBaseData lsst.scarlet.lite.models.parametric.ParametricComponent.to_data | ( | self | ) |
Convert the component to persistable ScarletComponentBaseData
Returns
-------
component_data: ScarletComponentBaseData
The data object containing the component information
Reimplemented from lsst.scarlet.lite.component.Component.
Definition at line 842 of file parametric.py.
| lsst.scarlet.lite.models.parametric.ParametricComponent.update | ( | self, | |
| int | it, | ||
| np.ndarray | input_grad ) |
Update the component parameters from an input gradient
Parameters
----------
it:
The current iteration of the optimizer.
input_grad:
Gradient of the likelihood wrt the component model
Reimplemented from lsst.scarlet.lite.component.Component.
Reimplemented in lsst.scarlet.lite.models.parametric.EllipticalParametricComponent.
Definition at line 808 of file parametric.py.
| float lsst.scarlet.lite.models.parametric.ParametricComponent.x0 | ( | self | ) |
The x-center of the component
Definition at line 708 of file parametric.py.
| float lsst.scarlet.lite.models.parametric.ParametricComponent.y0 | ( | self | ) |
The y-center of the component
Definition at line 703 of file parametric.py.
|
protectedinherited |
Definition at line 62 of file component.py.
Definition at line 63 of file component.py.
|
protected |
Definition at line 686 of file parametric.py.
|
protected |
Definition at line 687 of file parametric.py.
|
protected |
Definition at line 688 of file parametric.py.
|
protected |
Definition at line 689 of file parametric.py.
|
protected |
Definition at line 685 of file parametric.py.
|
protected |
Definition at line 692 of file parametric.py.
Definition at line 684 of file parametric.py.
| lsst.scarlet.lite.models.parametric.ParametricComponent.floor = floor |
Definition at line 695 of file parametric.py.
| lsst.scarlet.lite.models.parametric.ParametricComponent.frame |
Reimplemented in lsst.scarlet.lite.models.parametric.EllipticalParametricComponent.
Definition at line 821 of file parametric.py.
| lsst.scarlet.lite.models.parametric.ParametricComponent.radial_params |
Reimplemented in lsst.scarlet.lite.models.parametric.EllipticalParametricComponent.
Definition at line 746 of file parametric.py.
| lsst.scarlet.lite.models.parametric.ParametricComponent.y0 |
Definition at line 700 of file parametric.py.